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

This commit is contained in:
Dillon Ngo
2025-07-11 16:13:02 +08:00
2 changed files with 2 additions and 2 deletions
@@ -63,7 +63,7 @@ class DeleteGroupLogic extends AbstractControllerLogic
$payment = $bill->owner;
$group->transactions()->detach($bill->id);
$trns = $payment->transactions()->with('groupTransaction')->get();
$trns = $payment->transactions()->where('type', 3)->with('groupTransaction')->get();
if(count($trns) <= 1){
$this->updatesTransactionStatus->execute($payment, ApprovalStatus::APPROVED);
}
@@ -77,7 +77,7 @@ class CreateInvoiceDocumentProcessor
$lowercaseDocumentType = strtolower($document_type);
$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
$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, 'booking' => $booking]); //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();