fix invoice

This commit is contained in:
edmondlang
2023-09-06 23:03:44 +08:00
parent 6755a5e30f
commit fe26d7fdad
+2 -4
View File
@@ -107,13 +107,11 @@ class RegenerateInvoice extends Command
$existing_invoice_bill_no->forceDelete();
}
$invoiceProcessor = App()->make(CreateInvoiceTransactionProcessorWithInvoiceNo::class);
$invoiceProcessor->execute($booking, $bill_no);
$this->createInvoiceTransactionProcessorWithInvoiceNo->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 {
$invoiceProcessor = App()->make(CreateInvoiceTransactionProcessor::class);
$invoiceProcessor->execute($booking);
$this->createInvoiceTransactionProcessor->execute($booking);
$logMessage = 'Regenerated new invoice. Booking Marking - ' . $booking->marking;
$this->printAndLog($logMessage);
}