Merge pull request 'fix(purchase): 采购前手单提交时增加入库仓库选择校验' (#340) from dev into main

Reviewed-on: #340
This commit is contained in:
mkm 2024-11-15 19:59:41 +08:00
commit a778c009bd

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');