fix(purchase): 采购前手单提交时增加入库仓库选择校验

- 在提交前手单之前,增加了对入库仓库的校验
- 如果未选择入库仓库,将抛出异常提示用户选择
This commit is contained in:
mkm 2024-11-15 19:54:47 +08:00
parent dcf7601285
commit be1860bddc

View File

@ -162,6 +162,9 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
$total_price= PurchaseProductOffer::where(['order_id' => $params['bhoid']])->sum('total_price');
$completed_amount= PurchaseProductOffer::where(['order_id' => $params['bhoid'],'pay_type'=>1])->sum('total_price');
$outstanding_amount= PurchaseProductOffer::where(['order_id' => $params['bhoid'],'pay_type'=>2])->sum('total_price');
if($params['warehouse_id']<=0){
throw new BusinessException('请选择入库仓库');
}
Db::startTrans();
try {
$code = getNewOrderId('RK');