diff --git a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php index c7510bea..c55c97ad 100644 --- a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php +++ b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php @@ -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(); diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index c99feaf2..56988889 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -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();