Browse Source

bugfix

pull/3/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
348e56c798
  1. 2
      app/Http/Controllers/DashboardBoDController.php

2
app/Http/Controllers/DashboardBoDController.php

@ -386,7 +386,7 @@ class DashboardBoDController extends Controller
->groupBy('activity_id')
->first();
try {
$sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning;
$sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan ?? 0)*$keyActualM->bobot_planning;
} catch (\DivisionByZeroError $e) {
return response()->json(['message' => $e->getMessage()]);
}

Loading…
Cancel
Save