|
|
|
@ -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()]); |
|
|
|
|
} |
|
|
|
|