mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
Merge branch 'dillon/90-e-invoice-e-1' into vapor/development
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@
|
||||
<div class="row bg-white padding-10 m-b-10 rounded">
|
||||
<div class="col-3 fs-12">{{data.created_at}}</div>
|
||||
<div class="col fs-12"><span v-html="data.description"></span>
|
||||
<a target=”_blank” v-if="[9].includes(data.type)" @click="downloadTransaction(data)"><i class="fa fa-download fs-11 m-l-5 text-secondary hover-primary"></i></a>
|
||||
<!-- Allow Credit Note to be downloaded for company NOT opted in E-Invoice -->
|
||||
<a target=”_blank” v-if="[9].includes(data.type) && !data.einvoice" @click="downloadTransaction(data)"><i class="fa fa-download fs-11 m-l-5 text-secondary hover-primary"></i></a>
|
||||
<!-- cief todo: 90 - E Credit Note incomplete (for company opted in E-Invoice)-->
|
||||
</div>
|
||||
<div class="col-2 text-success text-center">{{[5, 9].includes(parseFloat(data.type)) ? formatValue(data.amount) : ''}}</div>
|
||||
<div class="col-2 text-danger text-center">{{[1, 11].includes(parseFloat(data.type)) ? '- ' + (formatValue(data.amount)) : ''}}</div>
|
||||
|
||||
Reference in New Issue
Block a user