mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
delete 1688 purchase order for special customers
This commit is contained in:
+5
-6
@@ -410,12 +410,11 @@ Route::get('/1688/fix/{reference}', function($reference){
|
||||
|
||||
Route::get('/po/manual/fix', function(){
|
||||
|
||||
$purchaseOrders = Transaction::where('type', TransactionType::PURCHASE_ORDER)->whereHas('owner', function($query){
|
||||
return $query->whereIn('company_id', [199, 510])->whereHas('documents', function($query){
|
||||
return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER);
|
||||
});
|
||||
})->first();
|
||||
dd($purchaseOrders);
|
||||
$bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){
|
||||
return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER);
|
||||
});
|
||||
|
||||
dd($bookings);
|
||||
foreach ($purchaseOrders as $purchaseOrder){
|
||||
$purchaseOrder->status = ApprovalStatus::PENDING_SUBMISSION;
|
||||
$purchaseOrder->save();
|
||||
|
||||
Reference in New Issue
Block a user