Merge branch 'dillon/90-e-invoice-e' into vapor/development

This commit is contained in:
Dillon Ngo
2025-11-27 13:32:29 +08:00
3 changed files with 9 additions and 3 deletions
@@ -67,7 +67,12 @@ class ApprovePurchaseOrderLogic extends AbstractControllerLogic
$this->updatesTransactionStatus->execute($purchaseOrder, ApprovalStatus::APPROVED);
$this->createInvoiceTransactionProcessor->execute($booking);
$this->createInvoiceTransactionProcessor->execute($booking, "", null, [
'generateEInvoice' => false,
'generateEInvoiceWithNormalInvoiceTemplate' => false,
'generateEInvoiceRefund' => false,
'bookingOriginalStatus' => $booking->status
]);
return $this->response([]);
}
+1
View File
@@ -100,6 +100,7 @@ class BookingResource extends JsonResource
})->latest()->get())
]),
'einvoice' => $eInvoice,
'is_invoice_generated' => $this->is_invoice_generated,
];
}
}
@@ -21,7 +21,7 @@
<div class="col-md col-sm-12 m-b-20">
<div class="row" v-if="booking">
<div class="col" v-if="showDownloadPDFButtons">
<div class="row m-b-50" v-if="booking.status === 3 || isBookingWithAFullRefund">
<div class="row m-b-50" v-if="(booking.status === 3 || booking.is_invoice_generated) || isBookingWithAFullRefund">
<div class="col no-padding">
<div class="row">
<div class="col">
@@ -137,7 +137,7 @@
</div>
</div>
</div>
<div class="row m-b-10" v-if="booking.status !== 3 && !isBookingWithAFullRefund">
<div class="row m-b-10" v-if="booking.status !== 3 && !booking.is_invoice_generated && !isBookingWithAFullRefund">
<div class="col">
<div class="row text-center m-b-15">
<div class="col">