From 61c02c0806872478cc34a37b0929564a8a5e9281 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Wed, 15 Feb 2023 16:05:11 +0800 Subject: [PATCH] update customer's account --- routes/web.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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');