add over weight cbm to yd

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