mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-23 14:34:19 +00:00
customer report
This commit is contained in:
+4
-3
@@ -143,8 +143,9 @@ Route::get('/report', function(){
|
||||
|
||||
$total += $cbm;
|
||||
$marking = $packingList->owner->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
if(!$customers->has($marking)){
|
||||
if(!$customers->has($packingList->owner->id)){
|
||||
$customers->put($marking, collect([
|
||||
'marking' => $marking,
|
||||
'cbm' => $cbm,
|
||||
'packages' => $packingList->packages->sum('quantity')
|
||||
]));
|
||||
@@ -152,8 +153,8 @@ Route::get('/report', function(){
|
||||
continue;
|
||||
}
|
||||
|
||||
$customers[$packingList->owner->id]['cbm'] += $cbm;
|
||||
$customers[$packingList->owner->id]['packages'] += $packingList->packages->sum('quantity');
|
||||
$customers[$marking]['cbm'] += $cbm;
|
||||
$customers[$marking]['packages'] += $packingList->packages->sum('quantity');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user