commit
d1f51031ef
@ -61,7 +61,7 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
||||
public static function appendAdd(array $params): bool
|
||||
{
|
||||
$order = BeforehandOrder::where('id', $params['id'])->find();
|
||||
if (!empty($order) && $order->is_confirm == 1 && empty($params['admin_id'])) {
|
||||
if ((!empty($order) && $order->is_confirm == 1 && empty($params['admin_id'])) || $order['is_outbound'] > 0) {
|
||||
throw new BusinessException('该订单已确认,不能追加商品');
|
||||
}
|
||||
Db::startTrans();
|
||||
|
@ -38,7 +38,7 @@ class WarehouseProductLogic extends BaseLogic
|
||||
// Db::startTrans();
|
||||
try {
|
||||
$after_nums = 0;
|
||||
if (!in_array($params['order_type'],[6,7,9])) {
|
||||
if (!in_array($params['order_type'],[6,9])) {
|
||||
$storege = WarehouseProductStorege::where('warehouse_id', $params['warehouse_id'])->where('product_id', $params['product_id'])->find();
|
||||
if ($storege) {
|
||||
$after_nums = $storege['nums'] + $params['nums'];
|
||||
@ -262,9 +262,9 @@ class WarehouseProductLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
if ($res['financial_pm'] == 1) {
|
||||
self::incProductDecStorege($res, $res['nums'], $admin_id);
|
||||
} elseif ($res['financial_pm'] == 0) {
|
||||
self::decProductIncStorege($res, $res['nums'], $admin_id);
|
||||
} elseif ($res['financial_pm'] == 0) {
|
||||
self::incProductDecStorege($res, $res['nums'], $admin_id);
|
||||
}
|
||||
$res->delete();
|
||||
Db::commit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user