Browse Source

zero division handling

pull/3/head
wahyu 1 year ago
parent
commit
95b78bda1d
  1. 2
      app/Helpers/MasterFunctionsHelper.php

2
app/Helpers/MasterFunctionsHelper.php

@ -375,7 +375,7 @@ class MasterFunctionsHelper
// } // }
$totalACWP += $keyActualM->biaya_actual / $keyActualM->duration; $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0;
} catch (\DivisionByZeroError $e) { } catch (\DivisionByZeroError $e) {
return response()->json(['message' => $e->getMessage()]); return response()->json(['message' => $e->getMessage()]);
} }

Loading…
Cancel
Save