mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 18:03:59 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/development
This commit is contained in:
@@ -47,9 +47,12 @@ class CreateInvoiceDocumentProcessor
|
||||
{
|
||||
// calculate current Paid Amount
|
||||
$booking = $transaction->owner_type == Booking::class ? $transaction->owner : null;
|
||||
if(!$booking){
|
||||
$booking = $transaction->owner->owner_type == Booking::class ? $transaction->owner->owner : null;
|
||||
}
|
||||
$currentPaidAmount = null;
|
||||
$brn = $supplier->documents->where('document_type', DocumentType::SSM_REGISTRATION)->first();
|
||||
$documentDate = $supplier->segments->whereIn('id', [23])->first() ? \Carbon\Carbon::now() : $purchaseOrder->booking->created_at;
|
||||
$documentDate = $supplier->segments->whereIn('id', [23])->first() ? \Carbon\Carbon::now() : $booking->created_at;
|
||||
$eInvoiceStartDate = Carbon::parse(env('E_INVOICE_START_DATE', '2025-07-01 00:00:00'));
|
||||
|
||||
if ($booking) {
|
||||
@@ -74,7 +77,7 @@ class CreateInvoiceDocumentProcessor
|
||||
|
||||
$lowercaseDocumentType = strtolower($document_type);
|
||||
|
||||
$order_pdf = LaravelMpdf::loadView('pages.pdfs.' . $lowercaseDocumentType, ['transaction' => $transaction, 'po_order_transaction' => $purchaseOrder, 'supplier' => $supplier, 'voucher_redemption' => $voucherRedemption, 'current_paid_amount' => $currentPaidAmount, 'document_date' => $documentDate, 'brn' => $brn, 'autocountId' => null]); //cief todo: 90 - autocount id to be updated
|
||||
$order_pdf = LaravelMpdf::loadView('pages.pdfs.' . $lowercaseDocumentType, ['transaction' => $transaction, 'booking' => $booking, 'supplier' => $supplier, 'voucher_redemption' => $voucherRedemption, 'current_paid_amount' => $currentPaidAmount, 'document_date' => $documentDate, 'brn' => $brn, 'autocountId' => null]); //cief todo: 90 - autocount id to be updated
|
||||
|
||||
if($purchaseOrder && $purchaseOrder->booking->service_id === 4) {
|
||||
$purchaseOrderDocuments = $purchaseOrder->booking->documents()->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER)->get();
|
||||
|
||||
@@ -512,7 +512,6 @@
|
||||
let vm = this;
|
||||
var TotalRequestedRefund = 0;
|
||||
this.data.transaction_refunds.forEach(function(refund) {
|
||||
console.log('refund: ' + JSON.stringify(refund));
|
||||
TotalRequestedRefund += refund.status === 1 ? refund.amount : 0;
|
||||
});
|
||||
// if (vm.data.booking.fixed_currency.id != 1 && this.data.transaction_refunds[0]) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<td class="header-details">
|
||||
<div class="title"><strong>Receipt Voucher</strong></div>
|
||||
<div class="number">EI#: {{ $transaction->bill_no }}</div>
|
||||
<div class="ref">Ref# {{ $po_order_transaction->owner->marking }}</div>
|
||||
<div class="ref">Ref# {{ $booking->marking ?? "-" }}</div>
|
||||
<div class="date">Date: {{ $transaction->created_at }}</div>
|
||||
<div> </div>
|
||||
</td>
|
||||
@@ -97,7 +97,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>PAYMENT FOR REF. {{ $po_order_transaction->owner->marking ?? 'N/A' }}</td>
|
||||
<td>PAYMENT FOR REF. {{ $booking->marking ?? 'N/A' }}</td>
|
||||
<td style="text-align:right;">{{ number_format($total, 2) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user