mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-09-01 19:04:08 +00:00
fix bug with invoice showing that doesn't belong to the order
This commit is contained in:
@@ -51,7 +51,6 @@ class OrderResource extends JsonResource
|
||||
];
|
||||
}),
|
||||
'invoices' => $this->whenLoaded('packingLists', function() use ($orderId) {
|
||||
// return TransactionResource::collection(Transaction::whereHas('owner', function($query) use ($orderId) { return $query->where('owner_id', $orderId); })->get());
|
||||
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->where('transactions.type', TransactionType::SHIPPING_INVOICE)->get());
|
||||
}),
|
||||
'remarks' => RemarkResource::collection($this->remarks),
|
||||
|
||||
Reference in New Issue
Block a user