mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
customer report
This commit is contained in:
+2
-3
@@ -123,7 +123,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
*/
|
||||
public function execute(?Carbon $start = null, ?Carbon $end = null){
|
||||
|
||||
// DB::beginTransaction();
|
||||
DB::beginTransaction();
|
||||
try {
|
||||
$start = $start ? $start : Carbon::now()->subDays(5);
|
||||
|
||||
@@ -216,7 +216,6 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
}
|
||||
|
||||
}
|
||||
dd('inserted');
|
||||
|
||||
}
|
||||
} catch (\Exception $exception){
|
||||
@@ -224,7 +223,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
}
|
||||
|
||||
|
||||
// DB::commit();
|
||||
DB::commit();
|
||||
return [];
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -130,7 +130,7 @@ Route::group(['prefix' => 'template', 'as' => 'template.'], function () {
|
||||
});
|
||||
|
||||
Route::get('/report', function(){
|
||||
$containers = Container::whereMonth('loading_date', '=', '09')->whereYear('loading_date', '=', '2021')->get();
|
||||
$containers = Container::whereMonth('loading_date', '=', '09')->whereYear('loading_date', '=', '2021')->orderBy('loading_date')->get();
|
||||
|
||||
$total = 0;
|
||||
$customers = collect();
|
||||
@@ -140,7 +140,7 @@ Route::get('/report', function(){
|
||||
return $packingList->packages->sum(function ($package){
|
||||
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
|
||||
});
|
||||
}).'CBM <br><br>';
|
||||
}).'CBM ('. $container->loading_date->format('d-m-Y') .')<br><br>';
|
||||
foreach($container->packingLists as $packingList){
|
||||
$cbm = $packingList->packages->sum(function ($package){
|
||||
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
|
||||
|
||||
Reference in New Issue
Block a user