regenerate invoices for 2023

This commit is contained in:
Omair Saleh
2023-08-16 15:42:37 +08:00
parent 1ad4f3ea02
commit e88f0c8f0c
+1 -1
View File
@@ -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();