调试商品入库到门店
This commit is contained in:
parent
d5e9bbec9a
commit
5eeffb91d3
@ -274,6 +274,9 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
if ($_order['deduction_price'] > 0) {
|
if ($_order['deduction_price'] > 0) {
|
||||||
$_order['pay_price'] = bcsub($_order['pay_price'], $_order['deduction_price'], 2);
|
$_order['pay_price'] = bcsub($_order['pay_price'], $_order['deduction_price'], 2);
|
||||||
|
if ($_order['pay_price'] < 0.01) {
|
||||||
|
throw new BusinessException('支付金额不能小于0.01元');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$_order['uid'] = $uid;
|
$_order['uid'] = $uid;
|
||||||
$_order['spread_uid'] = 0;
|
$_order['spread_uid'] = 0;
|
||||||
|
@ -515,7 +515,7 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
'unit' => $product['unit'],
|
'unit' => $product['unit'],
|
||||||
'cart_num' => $product['nums'],
|
'cart_num' => $product['nums'],
|
||||||
'accept_num' => $product['nums'],
|
'accept_num' => $product['nums'],
|
||||||
'mark' => $product['mark'],
|
'mark' => $product['mark'] ?? '',
|
||||||
'is_buyer' => 1,
|
'is_buyer' => 1,
|
||||||
'procurement_order_id' => $procurementOrder['id'],
|
'procurement_order_id' => $procurementOrder['id'],
|
||||||
'total_price' => bcmul($product['price'], $product['nums'], 2),
|
'total_price' => bcmul($product['price'], $product['nums'], 2),
|
||||||
@ -533,7 +533,7 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
'unit' => $product['unit'],
|
'unit' => $product['unit'],
|
||||||
'is_buyer' => 1,
|
'is_buyer' => 1,
|
||||||
'need_num' => $product['nums'],
|
'need_num' => $product['nums'],
|
||||||
'mark' => $product['mark'],
|
'mark' => $product['mark'] ?? '',
|
||||||
'buyer_id' => $params['buyer_id'],
|
'buyer_id' => $params['buyer_id'],
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'source_order_info' => [
|
'source_order_info' => [
|
||||||
@ -541,7 +541,7 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
'source_order_id' => $procurementOrder['id'],
|
'source_order_id' => $procurementOrder['id'],
|
||||||
'product_id' => $product['product_id'],
|
'product_id' => $product['product_id'],
|
||||||
'need_num' => $product['nums'],
|
'need_num' => $product['nums'],
|
||||||
'mark' => $product['mark'],
|
'mark' => $product['mark'] ?? '',
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
@ -293,6 +293,9 @@ class OrderLogic extends BaseLogic
|
|||||||
if (isset($params['deduction_price']) && $params['deduction_price'] > 0) {
|
if (isset($params['deduction_price']) && $params['deduction_price'] > 0) {
|
||||||
$_order['deduction_price'] = $params['deduction_price'];
|
$_order['deduction_price'] = $params['deduction_price'];
|
||||||
$_order['pay_price'] = bcsub($_order['pay_price'], $_order['deduction_price'], 2);
|
$_order['pay_price'] = bcsub($_order['pay_price'], $_order['deduction_price'], 2);
|
||||||
|
if ($_order['pay_price'] < 0.01) {
|
||||||
|
throw new BusinessException('支付金额不能小于0.01元');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uid > 0) {
|
if ($uid > 0) {
|
||||||
|
@ -630,7 +630,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($order['source'] != OrderEnum::SOURCE_20) {
|
if ($order['source'] != OrderEnum::SOURCE_20 || $order['store_id'] == 3) {
|
||||||
if ($branchProduct) {
|
if ($branchProduct) {
|
||||||
$stock = bcsub($branchProduct['stock'], $v['cart_num'], 2);
|
$stock = bcsub($branchProduct['stock'], $v['cart_num'], 2);
|
||||||
StoreBranchProduct::update([
|
StoreBranchProduct::update([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user