From f3c0833b2dc734636c2d22b899abdd2b9b396fe0 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 27 Jan 2026 14:41:34 +0800 Subject: [PATCH 1/3] Fix a problem reported by Enqi for few transfers from 1 customer appear at wrong tab (customer view) --- .../ControllersLogic/UpdateBookingAmountLogic.php | 9 ++++++++- .../ControllersLogic/UpdateBookingAmountWithPOLogic.php | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php index a6d0432c..bf48cbd5 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php @@ -139,7 +139,14 @@ class UpdateBookingAmountLogic extends AbstractControllerLogic $this->updatesBookingInvoiceStatus->execute($booking, $updateBookingInvoiceStatusObject); } else{ - $this->createInvoiceTransactionProcessor->execute($booking); + // $this->createInvoiceTransactionProcessor->execute($booking); + $this->createInvoiceTransactionProcessor->execute($booking, "", null, [ + 'generateEInvoice' => false, + 'generateEInvoiceWithNormalInvoiceTemplate' => false, + 'generateEInvoiceRefund' => false, + 'bookingOriginalStatus' => $booking->status + ] + ); } return $this->resourceResponse(new BookingResource($booking)); diff --git a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php index 48cc7d94..88b3d2fb 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php @@ -130,7 +130,14 @@ class UpdateBookingAmountWithPOLogic extends AbstractControllerLogic $this->updatesBookingInvoiceStatus->execute($booking, $updateBookingInvoiceStatusObject); } else{ - $this->createInvoiceTransactionProcessor->execute($booking); + // $this->createInvoiceTransactionProcessor->execute($booking); + $this->createInvoiceTransactionProcessor->execute($booking, "", null, [ + 'generateEInvoice' => false, + 'generateEInvoiceWithNormalInvoiceTemplate' => false, + 'generateEInvoiceRefund' => false, + 'bookingOriginalStatus' => $booking->status + ] + ); } $request->merge(['is_privilleged_update' => true]); From fa8059d3eaa16bcc0f3b0905cf20443b281a056d Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 27 Jan 2026 14:55:51 +0800 Subject: [PATCH 2/3] E-Invoice - minor update on Sales Invoice Report Export data --- .../Modules/Exports/Services/ExportsSalesInvoiceReport.php | 2 +- .../Exports/Services/ExportsSalesInvoiceWithRefundReport.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php index a7c170b7..3ff71759 100644 --- a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php +++ b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php @@ -216,7 +216,7 @@ class ExportsSalesInvoiceReport implements FromQuery, WithHeadings, WithHeadingR $company->debtor, $invoiceTransaction ? $invoiceTransaction->bill_no : '', $booking->marking, - $category === 'Compensation Voucher' ? '1000-000' : '949-2000', + $category === 'Compensation Voucher' ? '920-0000' : '949-2000', 'PRODUCT NAME :', $voucher->code, '022', diff --git a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceWithRefundReport.php b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceWithRefundReport.php index c6ac49cf..816b20ea 100644 --- a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceWithRefundReport.php +++ b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceWithRefundReport.php @@ -216,7 +216,7 @@ class ExportsSalesInvoiceWithRefundReport implements FromQuery, WithHeadings, Wi $company->debtor, $invoiceTransaction ? $invoiceTransaction->bill_no : '', $booking->marking, - $category === 'Compensation Voucher' ? '1000-000' : '949-2000', + $category === 'Compensation Voucher' ? '920-0000' : '949-2000', 'PRODUCT NAME :', $voucher->code, '022', From 17622f4c93b393925ff008ba8ddb5950f07ea68d Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Wed, 28 Jan 2026 13:34:46 +0800 Subject: [PATCH 3/3] Fix an issue reported by Joanne on banking invoice cannot be downloaded --- app/Http/Resources/BookingResource.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Resources/BookingResource.php b/app/Http/Resources/BookingResource.php index e118f2e9..cdc46d71 100644 --- a/app/Http/Resources/BookingResource.php +++ b/app/Http/Resources/BookingResource.php @@ -66,6 +66,8 @@ class BookingResource extends JsonResource 'supplier_delivery_order' => new DocumentResource($this->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->latest()->first()), 'proforma_invoice' => new DocumentResource($this->documents()->where('document_type', DocumentType::PROFORMA_INVOICE)->whereNotIn('status', [ApprovalStatus::REJECTED, ApprovalStatus::EXPIRED])->latest()->first()), 'ecommerce_purchase_order' => new DocumentResource($this->documents()->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER)->latest()->first()), + 'banking_invoice' => new DocumentResource($this->documents()->where('document_type', DocumentType::BANKING_INVOICE)->whereNotIn('status', [ApprovalStatus::REJECTED, ApprovalStatus::EXPIRED])->orderByDesc('id')->first()), + 'delivery_order_banking' => new DocumentResource($this->documents()->where('document_type', DocumentType::DELIVER_ORDER_BANKING)->orderByDesc('id')->first()), ], 'order_reference_no' => $this->modelAttributes()->where('name', BookingAttributeNames::ORDER_REFERENCE_NO)->get()->map(function ($attr) { return [