|
@@ -2,15 +2,18 @@
|
|
|
|
|
|
namespace App\Service;
|
|
namespace App\Service;
|
|
|
|
|
|
-use App\Model\Depart;
|
|
|
|
use App\Model\Employee;
|
|
use App\Model\Employee;
|
|
use App\Model\OrderInventoryStock;
|
|
use App\Model\OrderInventoryStock;
|
|
use App\Model\OutBoundOrder;
|
|
use App\Model\OutBoundOrder;
|
|
use App\Model\OutBoundOrderInfo;
|
|
use App\Model\OutBoundOrderInfo;
|
|
|
|
+use App\Model\Product;
|
|
|
|
+use App\Model\ProductInventorySet;
|
|
|
|
+use App\Model\PurchaseOrderInfoForOutBound;
|
|
use App\Model\ReturnExchangeOrder;
|
|
use App\Model\ReturnExchangeOrder;
|
|
use App\Model\ReturnExchangeOrderProductInfo;
|
|
use App\Model\ReturnExchangeOrderProductInfo;
|
|
use App\Model\SalesOrder;
|
|
use App\Model\SalesOrder;
|
|
use App\Model\SalesOrderProductInfo;
|
|
use App\Model\SalesOrderProductInfo;
|
|
|
|
+use App\Model\Setting;
|
|
use App\Model\Storehouse;
|
|
use App\Model\Storehouse;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
@@ -21,7 +24,9 @@ class OutBoundOrderService extends Service
|
|
if(! $status) return [$status,$msg];
|
|
if(! $status) return [$status,$msg];
|
|
|
|
|
|
try{
|
|
try{
|
|
|
|
+ $time = time();
|
|
DB::beginTransaction();
|
|
DB::beginTransaction();
|
|
|
|
+
|
|
$material_model = OutBoundOrder::where('order_number',$data['order_number'])->first();
|
|
$material_model = OutBoundOrder::where('order_number',$data['order_number'])->first();
|
|
$material_model->data_id = $data['data_id'];
|
|
$material_model->data_id = $data['data_id'];
|
|
$material_model->type = $data['type'];
|
|
$material_model->type = $data['type'];
|
|
@@ -58,6 +63,20 @@ class OutBoundOrderService extends Service
|
|
ProductInventoryService::changeLockNumber($user, $msg[0],$msg[1],$is_check_stock);
|
|
ProductInventoryService::changeLockNumber($user, $msg[0],$msg[1],$is_check_stock);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ PurchaseOrderInfoForOutBound::where('del_time',0)
|
|
|
|
+ ->where('data_id', $material_model->id)
|
|
|
|
+ ->where('type', PurchaseOrderInfoForOutBound::type_one)
|
|
|
|
+ ->update(['del_time' => $time]);
|
|
|
|
+
|
|
|
|
+ //增加采购占用
|
|
|
|
+ $purchase_return = $msg[2] ?? [];
|
|
|
|
+ if(! empty($purchase_return)){
|
|
|
|
+ foreach ($purchase_return as $key => $value){
|
|
|
|
+ $purchase_return[$key]['data_id'] = $material_model->id;
|
|
|
|
+ }
|
|
|
|
+ PurchaseOrderInfoForOutBound::insert($purchase_return);
|
|
|
|
+ }
|
|
|
|
+
|
|
DB::commit();
|
|
DB::commit();
|
|
}catch (\Throwable $e){
|
|
}catch (\Throwable $e){
|
|
DB::rollBack();
|
|
DB::rollBack();
|
|
@@ -116,6 +135,15 @@ class OutBoundOrderService extends Service
|
|
ProductInventoryService::changeLockNumber($user,$msg[0],[]);
|
|
ProductInventoryService::changeLockNumber($user,$msg[0],[]);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //增加采购占用
|
|
|
|
+ $purchase_return = $msg[2] ?? [];
|
|
|
|
+ if(! empty($purchase_return)){
|
|
|
|
+ foreach ($purchase_return as $key => $value){
|
|
|
|
+ $purchase_return[$key]['data_id'] = $material_model->id;
|
|
|
|
+ }
|
|
|
|
+ PurchaseOrderInfoForOutBound::insert($purchase_return);
|
|
|
|
+ }
|
|
|
|
+
|
|
//单据创建时是否校验库存
|
|
//单据创建时是否校验库存
|
|
(new CheckService())->orderInventoryInsert(['order_number' => $data['order_number'], 'is_check_stock' => $data['is_check_stock']]);
|
|
(new CheckService())->orderInventoryInsert(['order_number' => $data['order_number'], 'is_check_stock' => $data['is_check_stock']]);
|
|
|
|
|
|
@@ -135,7 +163,7 @@ class OutBoundOrderService extends Service
|
|
"opt_case" => CheckService::sixteen,
|
|
"opt_case" => CheckService::sixteen,
|
|
"menu_id" => $data['menu_id']
|
|
"menu_id" => $data['menu_id']
|
|
],$user);
|
|
],$user);
|
|
-// if(! $status) return [true, '保存成功,出库单确认失败,异常信息:' . $msg];
|
|
|
|
|
|
+ if(! $status) return [true, '保存成功,出库单确认失败,异常信息:' . $msg];
|
|
}
|
|
}
|
|
|
|
|
|
return [true, ''];
|
|
return [true, ''];
|
|
@@ -193,14 +221,19 @@ class OutBoundOrderService extends Service
|
|
if($order['state'] > OutBoundOrder::STATE_ZERO) return [false,'请确认出库单状态,删除失败'];
|
|
if($order['state'] > OutBoundOrder::STATE_ZERO) return [false,'请确认出库单状态,删除失败'];
|
|
|
|
|
|
$product_save = $this->getSaveDetail($data['id']);
|
|
$product_save = $this->getSaveDetail($data['id']);
|
|
|
|
+ $time = time();
|
|
try{
|
|
try{
|
|
DB::beginTransaction();
|
|
DB::beginTransaction();
|
|
OutBoundOrder::where('order_number',$data['order_number'])->update([
|
|
OutBoundOrder::where('order_number',$data['order_number'])->update([
|
|
- 'del_time'=>time()
|
|
|
|
|
|
+ 'del_time'=>$time
|
|
]);
|
|
]);
|
|
OutBoundOrderInfo::where('order_number',$data['order_number'])->update([
|
|
OutBoundOrderInfo::where('order_number',$data['order_number'])->update([
|
|
- 'del_time'=>time()
|
|
|
|
|
|
+ 'del_time'=>$time
|
|
]);
|
|
]);
|
|
|
|
+ PurchaseOrderInfoForOutBound::where('del_time',0)
|
|
|
|
+ ->where('data_id', $order['id'])
|
|
|
|
+ ->where('type', 1)
|
|
|
|
+ ->update(['del_time' => $time]);
|
|
// (new RangeService())->RangeDelete($order['id'],SeeRange::type_three);
|
|
// (new RangeService())->RangeDelete($order['id'],SeeRange::type_three);
|
|
|
|
|
|
$is_check_stock = OrderInventoryStock::where('order_number', $data['order_number'])
|
|
$is_check_stock = OrderInventoryStock::where('order_number', $data['order_number'])
|
|
@@ -290,6 +323,7 @@ class OutBoundOrderService extends Service
|
|
if(empty($value['number'])) return [false, '出库产品数量不能为空'];
|
|
if(empty($value['number'])) return [false, '出库产品数量不能为空'];
|
|
$res = $this->checkNumber($value['number']);
|
|
$res = $this->checkNumber($value['number']);
|
|
if(! $res) return [false,'请输入正确的产品数量'];
|
|
if(! $res) return [false,'请输入正确的产品数量'];
|
|
|
|
+
|
|
if(! isset($value['price'])) return [false, '出库产品单价不能为空'];
|
|
if(! isset($value['price'])) return [false, '出库产品单价不能为空'];
|
|
if(! isset($value['final_amount'])) return [false, '出库产品总价值不能为空'];
|
|
if(! isset($value['final_amount'])) return [false, '出库产品总价值不能为空'];
|
|
|
|
|
|
@@ -304,20 +338,27 @@ class OutBoundOrderService extends Service
|
|
|
|
|
|
//剩余能发
|
|
//剩余能发
|
|
$id = $data['id'] ?? 0;
|
|
$id = $data['id'] ?? 0;
|
|
- $s_product = [];
|
|
|
|
|
|
+ $purchase_return = [];
|
|
if($data['type'] == OutBoundOrder::out_type_one) {
|
|
if($data['type'] == OutBoundOrder::out_type_one) {
|
|
- $return = $this->getSalesProduct(['out_bound_id' => $id, 'data_id' => $data['data_id'], 'type' => $data['type']], $user);
|
|
|
|
|
|
+ list($status,$return) = $this->getSalesProduct(['out_bound_id' => $id, 'data_id' => $data['data_id'], 'type' => $data['type']], $user, $data['storehouse_id']);
|
|
|
|
+ if(! $status) return [false, $return];
|
|
$s_product = array_column($return,'number','product_id');
|
|
$s_product = array_column($return,'number','product_id');
|
|
- }
|
|
|
|
|
|
|
|
- //比较
|
|
|
|
- foreach ($product_submit as $pro => $number){
|
|
|
|
- $tmp = explode(',',$pro);
|
|
|
|
- $p = $tmp[0];
|
|
|
|
- if(! isset($s_product[$p])) return [false,'产品错误,合同中不存在该产品或产品出库已完成'];
|
|
|
|
- $s_number = $s_product[$p];
|
|
|
|
|
|
+ //比较
|
|
|
|
+ foreach ($product_submit as $pro => $number){
|
|
|
|
+ $tmp = explode(',',$pro);
|
|
|
|
+ $p = $tmp[0];
|
|
|
|
+ if(! isset($s_product[$p])) return [false,'产品错误,合同中不存在该产品或产品出库已完成'];
|
|
|
|
+ $s_number = $s_product[$p];
|
|
|
|
+
|
|
|
|
+ if($number > $s_number) return [false,'出库产品数量不能超过合同产品数量'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //校验采购单
|
|
|
|
+ list($status, $msg) = $this->checkPurchase($id,$data,$user);
|
|
|
|
+ if(! $status) return [false, $msg];
|
|
|
|
|
|
- if($number > $s_number) return [false,'出库产品数量不能超过合同产品数量'];
|
|
|
|
|
|
+ $purchase_return = $msg;
|
|
}
|
|
}
|
|
|
|
|
|
//已保存
|
|
//已保存
|
|
@@ -348,7 +389,7 @@ class OutBoundOrderService extends Service
|
|
if($order['state'] > OutBoundOrder::STATE_ZERO) return [false, '请确认出库单状态,编辑失败'];
|
|
if($order['state'] > OutBoundOrder::STATE_ZERO) return [false, '请确认出库单状态,编辑失败'];
|
|
}
|
|
}
|
|
|
|
|
|
- return [true, [$product_submit, $product_save]];
|
|
|
|
|
|
+ return [true, [$product_submit, $product_save, $purchase_return]];
|
|
}
|
|
}
|
|
|
|
|
|
public function outBoundGetProduct($data, $user){
|
|
public function outBoundGetProduct($data, $user){
|
|
@@ -369,11 +410,24 @@ class OutBoundOrderService extends Service
|
|
$return = [];
|
|
$return = [];
|
|
$data_id = $data['data_id'];
|
|
$data_id = $data['data_id'];
|
|
$out_bound_id = $data['out_bound_id'] ?? 0;
|
|
$out_bound_id = $data['out_bound_id'] ?? 0;
|
|
|
|
+ $sale = SalesOrder::where('del_time',0)
|
|
|
|
+ ->where('id', $data_id)
|
|
|
|
+ ->first();
|
|
|
|
+ if(empty($sale)) return [false, '合同不存在或已被删除'];
|
|
|
|
+ $sale = $sale->toArray();
|
|
|
|
+ //仓库ID
|
|
|
|
+ $storehouse = Storehouse::where('top_depart_id', $sale['top_depart_id'])->where('del_time',0)->value('id');
|
|
|
|
+
|
|
$product = SalesOrderProductInfo::where('del_time',0)
|
|
$product = SalesOrderProductInfo::where('del_time',0)
|
|
->where('sales_order_id', $data_id)
|
|
->where('sales_order_id', $data_id)
|
|
->select('product_id', 'number', 'final_amount','price')
|
|
->select('product_id', 'number', 'final_amount','price')
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
- $map = (new ProductService())->getProductDetail(array_column($product,'product_id'));
|
|
|
|
|
|
+ $product_id = array_column($product,'product_id');
|
|
|
|
+ $map = (new ProductService())->getProductDetail($product_id);
|
|
|
|
+
|
|
|
|
+ //采购单产品
|
|
|
|
+ $service = new PurchaseOrderService();
|
|
|
|
+ $purchase = $service->getPurchaseProduct($product_id, $storehouse);
|
|
|
|
|
|
//合同出库产品
|
|
//合同出库产品
|
|
$product_map = [];
|
|
$product_map = [];
|
|
@@ -421,7 +475,7 @@ class OutBoundOrderService extends Service
|
|
$p1 = $product_map[$value['product_id']] ?? 0;
|
|
$p1 = $product_map[$value['product_id']] ?? 0;
|
|
//合同退货产品
|
|
//合同退货产品
|
|
$p2 = $product_map2[$value['product_id']] ?? 0;
|
|
$p2 = $product_map2[$value['product_id']] ?? 0;
|
|
- $number = bcsub(bcsub($value['number'], $p1), $p2);
|
|
|
|
|
|
+ $number = bcsub(bcsub($value['number'], $p1,2), $p2,2);
|
|
|
|
|
|
if($p1 > 0) {
|
|
if($p1 > 0) {
|
|
$state = 2;
|
|
$state = 2;
|
|
@@ -450,16 +504,31 @@ class OutBoundOrderService extends Service
|
|
'code' => $tmp['code'] ?? "",
|
|
'code' => $tmp['code'] ?? "",
|
|
'size' => $tmp['size'] ?? "",
|
|
'size' => $tmp['size'] ?? "",
|
|
'unit' => $tmp['unit'] ?? "",
|
|
'unit' => $tmp['unit'] ?? "",
|
|
|
|
+ 'purchase_product' => $purchase[$value['product_id']] ?? [],
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
return $return;
|
|
return $return;
|
|
}
|
|
}
|
|
|
|
|
|
- public function getSalesProduct($data, $user){
|
|
|
|
|
|
+ public function getSalesProduct($data, $user, $storehouse_id = 0){
|
|
$return = [];
|
|
$return = [];
|
|
$data_id = $data['data_id'];
|
|
$data_id = $data['data_id'];
|
|
$out_bound_id = $data['out_bound_id'] ?? 0;
|
|
$out_bound_id = $data['out_bound_id'] ?? 0;
|
|
|
|
+ $sale = SalesOrder::where('del_time',0)
|
|
|
|
+ ->where('id', $data_id)
|
|
|
|
+ ->first();
|
|
|
|
+ if(empty($sale)) return [false, '合同不存在或已被删除'];
|
|
|
|
+ $sale = $sale->toArray();
|
|
|
|
+
|
|
|
|
+ $top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
+ $top_depart_id = $top_depart_id['depart_id'] ?? 0;
|
|
|
|
+ list($status, $msg) = $this->returnOrderEditErrorCommon($top_depart_id,$sale['top_depart_id']);
|
|
|
|
+ if(! $status) return [false, $msg];
|
|
|
|
+
|
|
|
|
+ $storehouse = Storehouse::where('top_depart_id', $sale['top_depart_id'])->where('del_time',0)->value('id');
|
|
|
|
+ if($storehouse_id && $storehouse_id != $storehouse) return [false, '出库仓库错误'];
|
|
|
|
+
|
|
$product = SalesOrderProductInfo::where('del_time',0)
|
|
$product = SalesOrderProductInfo::where('del_time',0)
|
|
->where('sales_order_id', $data_id)
|
|
->where('sales_order_id', $data_id)
|
|
->select('product_id', 'number', 'final_amount','price')
|
|
->select('product_id', 'number', 'final_amount','price')
|
|
@@ -526,7 +595,7 @@ class OutBoundOrderService extends Service
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
- return $return;
|
|
|
|
|
|
+ return [true, $return];
|
|
}
|
|
}
|
|
|
|
|
|
public function getSaveDetail($id){
|
|
public function getSaveDetail($id){
|
|
@@ -547,4 +616,145 @@ class OutBoundOrderService extends Service
|
|
|
|
|
|
return $product_save;
|
|
return $product_save;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public function checkPurchase($id, $data, $user){
|
|
|
|
+ //是否校验库存
|
|
|
|
+ if($id > 0){
|
|
|
|
+ $is_check_stock = OrderInventoryStock::where('order_number', $data['order_number'])
|
|
|
|
+ ->where('del_time',0)
|
|
|
|
+ ->value('is_check_stock') ?? 0;
|
|
|
|
+ }else{
|
|
|
|
+ $is_check_stock = $user['is_check_stock'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $purchase_product = [];
|
|
|
|
+ foreach ($data['product'] as $value){
|
|
|
|
+ $purchase = $value['purchase_product'] ?? [];
|
|
|
|
+ if(empty($purchase)) return [false, '出库操作时,请选择出库的产品来源采购单'];
|
|
|
|
+
|
|
|
|
+ foreach ($purchase as $p_v){
|
|
|
|
+ //必须校验的内容
|
|
|
|
+ if(empty($p_v['number'])) return [false, '采购单产品数量不能为空'];
|
|
|
|
+ $res = $this->checkNumber($p_v['number']);
|
|
|
|
+ if(! $res) return [false,'请输入正确的采购单产品数量'];
|
|
|
|
+ if(empty($p_v['product_id'])) return [false, '采购单产品ID不能为空'];
|
|
|
|
+
|
|
|
|
+ if($is_check_stock != ProductInventorySet::type_two){
|
|
|
|
+ //库存校验开启时 校验 需要采购单明细子表id
|
|
|
|
+ if(! isset($p_v['id'])) return [false, 'ID不能为空'];
|
|
|
|
+ if(! empty($p_v['id'])) {
|
|
|
|
+ list($status, $msg) = $this->limitingSendRequestBackgExpire("purchaseOrderInfo" . $p_v['id']);
|
|
|
|
+ if(! $status) return [false, '采购单产品处于出库操作中,请稍后'];
|
|
|
|
+ }
|
|
|
|
+ if(! isset($p_v['purchase_order_id'])) return [false, 'purchaseOrderId不能为空'];
|
|
|
|
+ if(! isset($p_v['price'])) return [false, '采购单产品单价不能为空'];
|
|
|
|
+ if(! isset($p_v['order_number'])) return [false, '采购单单号不能为空'];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $purchase_product[$value['product_id']] = [
|
|
|
|
+ "product_id" => $value['product_id'],
|
|
|
|
+ "total" => $value['number'],
|
|
|
|
+ "from" => $purchase,
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if($is_check_stock != ProductInventorySet::type_two){
|
|
|
|
+ //库存校验开启时 校验 需要采购单产品数量
|
|
|
|
+ list($status, $msg) = (new PurchaseOrderService())->checkPurchaseProductByPurchaseInfoID($id, $purchase_product);
|
|
|
|
+ if(! $status) return [false, $msg];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //返回产品对应数据
|
|
|
|
+ $return = $this->returnProductData($data['product'], $user, $data['storehouse_id']);
|
|
|
|
+
|
|
|
|
+ return [true, $return];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function returnProductData($product, $user, $storehouse_id){
|
|
|
|
+ $top_depart_id = $user['depart_top'][0] ?? [];
|
|
|
|
+ $my_top_depart_id = $top_depart_id['id'] ?? 0;
|
|
|
|
+ $basic_type_id = $top_depart_id['basic_type_id'] ?? 0;
|
|
|
|
+
|
|
|
|
+ //产品id
|
|
|
|
+ $product_id = array_column($product,'product_id');
|
|
|
|
+
|
|
|
|
+ //获取产品的采购成本 如果设置了分社价格
|
|
|
|
+ $service = new ProductService();
|
|
|
|
+ $detail_map = [];
|
|
|
|
+ if($basic_type_id) $detail_map = $service->getProductPrice($product_id,1, $basic_type_id);
|
|
|
|
+
|
|
|
|
+ //产品的成本 如果是 总社或者杭州旗舰店用cost 其它分社用retail_price
|
|
|
|
+ $product_array = Product::whereIn('id',$product_id)
|
|
|
|
+ ->where('del_time',0)
|
|
|
|
+ ->select('id','retail_price','cost')
|
|
|
|
+ ->get()->toArray();
|
|
|
|
+ $product_map = array_column($product_array,'retail_price','id');
|
|
|
|
+ $product_map_2 = array_column($product_array,'cost','id');
|
|
|
|
+
|
|
|
|
+ //需要所有数据的门店
|
|
|
|
+ $setting = Setting::where('setting_name','bt_top_depart_id')->first();
|
|
|
|
+ $bt_top_depart_id = $setting['setting_value'] ?? [];
|
|
|
|
+ $bt_top_depart_id = json_decode($bt_top_depart_id,true);
|
|
|
|
+
|
|
|
|
+ //产品使用价格
|
|
|
|
+ $product_use = [];
|
|
|
|
+ if(! empty($basic_type_id)){
|
|
|
|
+ foreach ($detail_map as $key => $value){
|
|
|
|
+ if(isset($value[$basic_type_id]) && ! empty($value[$basic_type_id]['price'])) {
|
|
|
|
+ $product_use[$key] = $value[$basic_type_id]['price'];
|
|
|
|
+ }else{
|
|
|
|
+ if(in_array($my_top_depart_id, $bt_top_depart_id)){
|
|
|
|
+ $product_use[$key] = $product_map_2[$key];
|
|
|
|
+ }else{
|
|
|
|
+ $product_use[$key] = $product_map[$key];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(in_array($my_top_depart_id, $bt_top_depart_id)){
|
|
|
|
+ $product_use = $product_map_2;
|
|
|
|
+ }else{
|
|
|
|
+ $product_use = $product_map;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $return = [];
|
|
|
|
+ foreach ($product as $value){
|
|
|
|
+ $product_id = $value['product_id'];
|
|
|
|
+// $total = $value['number'];
|
|
|
|
+ $purchase = $value['purchase_product'] ?? [];
|
|
|
|
+ $use_price = $product_use[$product_id] ?? 0;
|
|
|
|
+
|
|
|
|
+ foreach ($purchase as $p_v){
|
|
|
|
+ if(empty($p_v['id']) || empty($p_v['purchase_order_id'])){
|
|
|
|
+ $return[] = [
|
|
|
|
+ 'purchase_order_id' => 0,
|
|
|
|
+ 'purchase_order_info_id' => 0,
|
|
|
|
+ 'order_number' => "",
|
|
|
|
+ 'product_id' => $p_v['product_id'],
|
|
|
|
+ 'number' => $p_v['number'],
|
|
|
|
+ 'price' => $use_price,
|
|
|
|
+ 'storehouse_id' => $storehouse_id,
|
|
|
|
+ 'type' => PurchaseOrderInfoForOutBound::type_one,
|
|
|
|
+ 'is_use' => PurchaseOrderInfoForOutBound::is_not_use,
|
|
|
|
+ ];
|
|
|
|
+ }else{
|
|
|
|
+ $return[] = [
|
|
|
|
+ 'purchase_order_id' => $p_v['purchase_order_id'],
|
|
|
|
+ 'purchase_order_info_id' => $p_v['id'],
|
|
|
|
+ 'order_number' => $p_v['order_number'],
|
|
|
|
+ 'product_id' => $p_v['product_id'],
|
|
|
|
+ 'number' => $p_v['number'],
|
|
|
|
+ 'price' => $p_v['price'],
|
|
|
|
+ 'storehouse_id' => $storehouse_id,
|
|
|
|
+ 'type' => PurchaseOrderInfoForOutBound::type_one,
|
|
|
|
+ 'is_use' => PurchaseOrderInfoForOutBound::is_not_use,
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $return;
|
|
|
|
+ }
|
|
}
|
|
}
|