add over weight cbm to yd

This commit is contained in:
omair saleh
2022-01-28 11:57:27 +08:00
parent 7f7101cce5
commit cd6d86fb4b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class ContainerResource extends JsonResource
'seal_reference' => $this->seal_reference,
'loading_date' => $this->loading_date ? $this->loading_date->format('d-m-Y') : $this->loading_date,
'transport' => new TransportResource($this->transports()->first()),
'packages_count' => $this->packages->sum('quantity'),
'packages_count' => $this->packages()->whereNot('type', 2)->sum('quantity'),
'total_cbm' => $this->packages()->sum(DB::raw('(width/100) * (height/100) * (length/100) * quantity')),
'remarks' => RemarkResource::collection($this->remarks),
'status' => $this->status,