mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-29 01:13:59 +00:00
update customer's account
This commit is contained in:
+12
-12
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user