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); }