From 7642f6e9d30cb06f4d998abb74cf23c16fd57f3c Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 30 Dec 2022 17:35:28 +0800 Subject: [PATCH] regenerate invoices for specific customers --- routes/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 97bce58e..3ff3072e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -658,8 +658,8 @@ Route::get('/invoices/fix', function(){ foreach ($orders as $order){ $invoices = $order->transactions()->where('transactions.type', \App\Classes\ValueObjects\Constants\TransactionType::SHIPPING_INVOICE)->get(); foreach ($invoices as $invoice){ -dd($invoices); - $invoices->documents()->delete(); + + $invoice->documents()->delete(); $transaction_invoice_pdf = LaravelMpdf::loadView('pages.pdfs.shipping_invoice', ['invoice_transaction' => $invoice]);