remove the exempted customer list from yd warehouse

This commit is contained in:
omair saleh
2022-01-11 18:03:43 +08:00
parent 440271bc27
commit 394eadf6a2
3 changed files with 5 additions and 10 deletions
@@ -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());
@@ -32,7 +32,7 @@
</div>
</div>
</div>
<chinese-new-year-memo-component v-if="!['1290CSW', '769SMC', '1200KJH', '1152AAT'].includes(company.company_module.marking)"></chinese-new-year-memo-component>
<chinese-new-year-memo-component></chinese-new-year-memo-component>
</div>
</div>
<div class="row m-b-30 relative">
@@ -48,8 +48,7 @@
<p class="m-b-0">仓库截止收货日期/LAST DAY RECEIVE GOODS:</p>
</div>
<div class="col-auto p-l-0">
<span class="bold text-success" v-if="!['1290CSW', '769SMC', '1200KJH', '1152AAT'].includes(company.company_module.marking)">{{parameters.warehouse_id === 4 ? '23':'25'}}/01/2022</span>
<span class="bold text-success" v-if="['1290CSW', '769SMC', '1200KJH', '1152AAT'].includes(company.company_module.marking)">18/01/2022</span>
<span class="bold text-success">{{parameters.warehouse_id === 4 ? '23':'25'}}/01/2022</span>
</div>
</div>
</div>