order profile pagination

This commit is contained in:
Edmond Lang
2025-07-03 10:49:29 +08:00
parent 0ace9759f2
commit 64a5b02afb
+4 -2
View File
@@ -58,9 +58,11 @@ class OrderV2Resource extends JsonResource
: $this->whenLoaded('packingLists', function () {
return TransactionWithStorageResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->whereIn('transactions.type', [TransactionType::SHIPPING_INVOICE, TransactionType::STORAGE_INVOICE])->get());
}),
'storages' => $this->storages ? $this->storages : null, //from middleware
// 'storages' => $this->storages ? $this->storages : null, //from middleware
'storages' => null,
'remarks' => RemarkResource::collection($this->remarks),
'supplier_tax_rebate' => SupplierTaxRebateResource::collection($this->supplierTaxRebate),
// 'supplier_tax_rebate' => SupplierTaxRebateResource::collection($this->supplierTaxRebate),
'supplier_tax_rebate' => null,
'created_at' => $this->created_at->format('d-m-Y'),
// 'invoices_max_page' => $totalInvoices > 0 ? (int) ceil($totalInvoices / ($invoicePerPage < 1 ? 1 : $invoicePerPage)) : 1,
];