From 5cf0a7a00e475fbc7a820329c3220c9e06074e34 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 6 Sep 2023 23:39:26 +0800 Subject: [PATCH] fix invoice --- app/Console/Commands/RegenerateInvoice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/RegenerateInvoice.php b/app/Console/Commands/RegenerateInvoice.php index aa017d29..b25d4548 100644 --- a/app/Console/Commands/RegenerateInvoice.php +++ b/app/Console/Commands/RegenerateInvoice.php @@ -107,11 +107,11 @@ class RegenerateInvoice extends Command $existing_invoice_bill_no->forceDelete(); } - $this->createInvoiceTransactionProcessorWithInvoiceNo->execute($booking, $bill_no); + (App()->make(CreateInvoiceTransactionProcessorWithInvoiceNo::class))->execute($booking, $bill_no); $logMessage = 'Regenerated invoice. Booking Marking - ' . $booking->marking . '. Bill_no - ' . $bill_no . '. Old bill_no - ' . $deletedInvoice->bill_no; $this->printAndLog($logMessage); } else { - $this->createInvoiceTransactionProcessor->execute($booking); + (App()->make(CreateInvoiceTransactionProcessor::class))->execute($booking); $logMessage = 'Regenerated new invoice. Booking Marking - ' . $booking->marking; $this->printAndLog($logMessage); }