mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into rate-history-refactored
This commit is contained in:
@@ -9,6 +9,7 @@ Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Compani
|
||||
Route::put('/update/{id}', 'UpdateCompanyController@update')->name('update');
|
||||
Route::put('update/{id}/status', 'UpdateCompanyStatusController@update')->name('status.update');
|
||||
Route::delete('/delete/{id}', 'DeleteCompanyController@destroy')->name('delete');
|
||||
Route::put('/name-and-debtor/update/{id}', 'UpdateCompanyNameAndDebtorController@update')->name('update.nameAndDebtor');
|
||||
|
||||
Route::put('/update/debtor/{id}', 'UpdateCompanyDebtorController@update')->name('delete');
|
||||
|
||||
|
||||
+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