diff --git a/routes/web.php b/routes/web.php index 411a0e71..702e98ac 100644 --- a/routes/web.php +++ b/routes/web.php @@ -457,18 +457,18 @@ Route::get('/1688/fix/{reference}', function($reference){ Route::get('/po/manual/fix', function(){ - $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){ - return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); - })->get(); - - foreach ($bookings as $booking){ - $booking->status = ApprovalStatus::APPROVED; - $booking->save(); - - $booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); - $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]); - - } +// $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){ +// return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); +// })->get(); +// +// foreach ($bookings as $booking){ +// $booking->status = ApprovalStatus::APPROVED; +// $booking->save(); +// +// $booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete(); +// $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]); +// +// } })->name('ecommerce.fix');