From f4dfadfb2942a81b228c380d82189aa6e7d15a08 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 9 Sep 2025 16:48:40 +0800 Subject: [PATCH 1/2] E-Invoice - PM request for E-Invoice to use amended document date when import with autocount data --- .../Jobs/Commands/V2/ProcessBookingForEInvoiceV2CommandJob.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Classes/Jobs/Commands/V2/ProcessBookingForEInvoiceV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessBookingForEInvoiceV2CommandJob.php index 1410776a..366bf163 100644 --- a/app/Classes/Jobs/Commands/V2/ProcessBookingForEInvoiceV2CommandJob.php +++ b/app/Classes/Jobs/Commands/V2/ProcessBookingForEInvoiceV2CommandJob.php @@ -35,7 +35,8 @@ class ProcessBookingForEInvoiceV2CommandJob implements ShouldQueue Log::info(Carbon::now() . ': Start job - Processing single booking for E-Invoice.'); $start = new Carbon(); - $documents = $this->booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::INVOICE, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->get(); + // $documents = $this->booking->documents()->whereIn('document_type', [DocumentType::INVOICE, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->get(); + $documents = $this->booking->documents()->whereIn('document_type', [DocumentType::EINVOICE])->get(); if ($documents->isEmpty()) { Log::info("Processing for E-Invoice, booking id : " . $this->booking->marking); From 58180472261f0818225bd3678c8cbcae399ae462 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Thu, 11 Sep 2025 23:44:39 +0800 Subject: [PATCH 2/2] E-Invoice - PM requested to hide Credit Note download for customer opted in for E-Invoice through wallet transaction history page --- app/Http/Resources/WalletTransactionResource.php | 7 +++++-- .../elements/CustomerWalletTransactionComponent.vue | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Http/Resources/WalletTransactionResource.php b/app/Http/Resources/WalletTransactionResource.php index ef3091fa..404a74c4 100644 --- a/app/Http/Resources/WalletTransactionResource.php +++ b/app/Http/Resources/WalletTransactionResource.php @@ -49,10 +49,12 @@ class WalletTransactionResource extends JsonResource } + $company = $this->owner->owner; + return [ 'id' => (int) $this->id, 'type' => (int) $this->type, - 'marking' => $this->owner->owner->reference, + 'marking' => $company->reference, 'bill_no' => $this->bill_no, 'reference' => $this->payment_reference, 'payment_method' => (float) $this->payment_method, @@ -65,7 +67,8 @@ class WalletTransactionResource extends JsonResource 'description' => $description, 'details' => TransactionDetailResource::collection($this->transactionDetails), 'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y h:i:s A'), - 'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A') + 'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A'), + 'einvoice' => $company->e_invoice, ]; } } diff --git a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue index c8220b04..25615d60 100644 --- a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue +++ b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue @@ -2,7 +2,9 @@
{{data.created_at}}
- + + +
{{[5, 9].includes(parseFloat(data.type)) ? formatValue(data.amount) : ''}}
{{[1, 11].includes(parseFloat(data.type)) ? '- ' + (formatValue(data.amount)) : ''}}