修改预订单录入的错误

This commit is contained in:
lewis 2025-03-06 16:16:06 +08:00
parent 8ef42fc024
commit a00173be2e
2 changed files with 4 additions and 2 deletions

View File

@ -89,6 +89,8 @@ class BeforehandOrderLogic extends BaseLogic
unset($params['product_arr'][$k]);
continue;
}
$v['price'] = trim($v['price']);
$v['nums'] = trim($v['nums']);
$total_prices = bcmul($v['price'], $v['nums'], 2);
$datas[$k]['purchase'] = $v['purchase'];
$datas[$k]['mark'] = $v['mark'] ?? '';

View File

@ -498,11 +498,11 @@ class PurchaseProductOfferLogic extends BaseLogic
$purchaseOffer = [];
$cartInfo = [];
foreach ($params['product_arr'] as $product) {
$product['price'] = trim($product['price']);
$product['nums'] = trim($product['nums']);
if ($product['product_id'] <= 0) {
continue;
}
$product['price'] = trim($product['price']);
$product['nums'] = trim($product['nums']);
$cartInfo[] = [
'bhoid' => $procurementOrder['id'],
'product_id' => $product['product_id'],