diff --git a/app/admin/controller/beforehand_order/BeforehandOrderController.php b/app/admin/controller/beforehand_order/BeforehandOrderController.php index c7a40e5d4..7603d98ab 100644 --- a/app/admin/controller/beforehand_order/BeforehandOrderController.php +++ b/app/admin/controller/beforehand_order/BeforehandOrderController.php @@ -84,7 +84,7 @@ class BeforehandOrderController extends BaseAdminController 'regional_manager' => $params['regional_manager'] ?? '', ]; $params['other_data'] = $other_data; - if ($params['order_type'] == 7) { + if (in_array($params['order_type'], [7, 9])) { PurchaseProductOfferLogic::batchCreate($params); } else { BeforehandOrderLogic::add($params); diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index 9446b81c9..5b20a2066 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -490,7 +490,7 @@ class PurchaseProductOfferLogic extends BaseLogic $procurementOrder->order_id = getNewOrderId('CG'); $procurementOrder->buyer_id = $params['buyer_id']; $procurementOrder->admin_id = $params['admin_id']; - $procurementOrder->order_type = 7; + $procurementOrder->order_type = $params['order_type']; $procurementOrder->total_price = 0; $procurementOrder->pay_price = 0; $procurementOrder->save();