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); 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)) : ''}}