add over weight cbm to yd

This commit is contained in:
omair saleh
2022-01-28 12:05:22 +08:00
parent f75d2235a2
commit 1bfc44c1e0
+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()->whereNot('type', 2)->sum('quantity'),
'packages_count' => $this->packages()->where('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,