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