list yiwu to sabah or srawak orders

This commit is contained in:
omair saleh
2021-12-03 14:00:50 +08:00
parent e8c33e46c4
commit 5256d5b2f9
2 changed files with 3 additions and 1 deletions
@@ -32,7 +32,7 @@ final class WarehouseReferences {
11 => self::VT_KLANG,
12 => self::VT_KLANG,
13 => self::VT_SABAH,
14 => self::VT_KLANG,
14 => self::VT_SARAWAK,
15 => self::VT_KLANG,
16 => self::VT_KLANG,
];
+2
View File
@@ -135,6 +135,8 @@ Route::group(['prefix' => 'template', 'as' => 'template.'], function () {
Route::get('/yiwu', function () {
$orders = \App\Models\Order::whereHas('OrderRoles', function($query){
return $query->where('role_id', \App\Classes\ValueObjects\Constants\OrderRoleTypes::ORIGIN_WAREHOUSE)->where('company_module_id', 4);
})->whereHas('addresses', function($query){
return $query->whereIn('state_id', [5, 13, 14]);
})->get();
foreach ($orders as $order){