From e88f0c8f0cbcfc8e2b81450973ca31e014553295 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Wed, 16 Aug 2023 15:42:37 +0800 Subject: [PATCH] regenerate invoices for 2023 --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index c4ae122a..324c03a9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -470,7 +470,7 @@ Route::get('/invoice/fix', function(){ foreach($bookings as $booking){ $booking->transactions()->whereIn('transactions.type', [TransactionType::INVOICE, TransactionType::SUPPLIER_DELIVER])->delete(); - $booking->documents()->whereIn('documents.type', [DocumentType::INVOICE, DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); + $booking->documents()->whereIn('document_type', [DocumentType::INVOICE, DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); $booking->status = ApprovalStatus::APPROVED; $booking->save();