mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
loaded cbm monthly report
This commit is contained in:
+3
-2
@@ -130,8 +130,9 @@ Route::group(['prefix' => 'template', 'as' => 'template.'], function () {
|
||||
});
|
||||
|
||||
Route::get('/report', function(){
|
||||
$totalCbm = Container::whereMonth('loading_date', '=', '09')->whereYear('loading_date', '=', '2021')->get()->sum(function($container){
|
||||
$container->packingLists->sum(function($packing_list){
|
||||
$containers = Container::whereMonth('loading_date', '=', '09')->whereYear('loading_date', '=', '2021')->get();
|
||||
$totalCbm = $containers->sum(function($container){
|
||||
return $container->packingLists->sum(function($packing_list){
|
||||
return $packing_list->packages->sum(function ($package){
|
||||
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user