Browse Source

Merge pull request 'division zero handle' (#211) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#211
pull/3/head
farhantock 1 year ago
parent
commit
4dafbbfe10
  1. 2
      app/Helpers/MasterFunctionsHelper.php

2
app/Helpers/MasterFunctionsHelper.php

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

Loading…
Cancel
Save