From b854fd5bdc5a72165ddb682543dc3329a864b32f Mon Sep 17 00:00:00 2001 From: edmondlang Date: Thu, 7 Sep 2023 00:39:21 +0800 Subject: [PATCH] fix invoice --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index c49648e1..a9e51a50 100644 --- a/routes/web.php +++ b/routes/web.php @@ -528,7 +528,7 @@ Route::get('/invoice/fix', function(){ $deletedInvoice->bill_no = $bill_no . '-deleted'; $deletedInvoice->save(); - $existing_invoice_bill_no = Transaction::where('bill_no', $bill_no)->first(); + $existing_invoice_bill_no = Transaction::withTrashed()->where('bill_no', $bill_no)->first(); if ($existing_invoice_bill_no) { Log::channel('regenerateInvoice')->info('Delete existing bill_no');