diff --git a/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php b/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php index 5e7064b1..b43e2997 100644 --- a/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php +++ b/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php @@ -66,14 +66,10 @@ class CreateOrderLogic extends AbstractControllerLogic $originWarehouse = $this->fetchesCompanyModule->execute(['id' => $request->input('warehouse_id')]); - $marking = $company->companyModules()->importers()->first()->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference; + $originWarehouse = $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_GUANG_ZHOU]) : $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_YIWU]); - if(!in_array($marking, ['1290CSW', '769SMC', '1200KJH', '1152AAT'])){ - $originWarehouse = $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_GUANG_ZHOU]) : $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_YIWU]); - - if($originWarehouse->reference === WarehouseReferences::YD_YIWU && in_array($address->state_id, [5, 13, 14])) { - throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment due to the chinese new year\'s holiday. you can select our Guangzhou warehouse as an alternative.'); - } + if($originWarehouse->reference === WarehouseReferences::YD_YIWU && in_array($address->state_id, [5, 13, 14])) { + throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment due to the chinese new year\'s holiday. you can select our Guangzhou warehouse as an alternative.'); } $order = $this->createOrderProcessor->execute($company, $originWarehouse, $address, $this->generatesOrderNumber->execute()); diff --git a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue index a9d4b495..055097ed 100644 --- a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue +++ b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue @@ -32,7 +32,7 @@ - +
diff --git a/resources/assets/vue/components/orders/forms/OrderFormComponent.vue b/resources/assets/vue/components/orders/forms/OrderFormComponent.vue index a8949636..e833b05e 100644 --- a/resources/assets/vue/components/orders/forms/OrderFormComponent.vue +++ b/resources/assets/vue/components/orders/forms/OrderFormComponent.vue @@ -48,8 +48,7 @@

仓库截止收货日期/LAST DAY RECEIVE GOODS:

- {{parameters.warehouse_id === 4 ? '23':'25'}}/01/2022 - 18/01/2022 + {{parameters.warehouse_id === 4 ? '23':'25'}}/01/2022