|
@@ -221,10 +221,12 @@ class ImportOrderFromCHandleData extends Command
|
|
|
}
|
|
|
if ($is_stock == 0) {
|
|
|
|
|
|
+ //非库存品
|
|
|
$bol = $this->createCgd($cgd, $rm, $ri);
|
|
|
if ($bol == false) throw new Exception('订单创建失败');
|
|
|
|
|
|
} else {
|
|
|
+ //库存品
|
|
|
$bol = $this->RelaCgd(['orderCode' => $orderCode, "good_num" => $good_num, "spuCode" => $spuCode, "companyNo" => $supplierNo]);
|
|
|
if ($bol == false) throw new Exception('库存商品关联采购单失败');
|
|
|
|
|
@@ -510,6 +512,7 @@ class ImportOrderFromCHandleData extends Command
|
|
|
//创建.....
|
|
|
private function RelaCgd(array $outinfo = [])
|
|
|
{
|
|
|
+ //备库单
|
|
|
$cgd = Db::name("order_bk")
|
|
|
->where([
|
|
|
["spuCode", "=", $outinfo['spuCode']],
|
|
@@ -557,7 +560,7 @@ class ImportOrderFromCHandleData extends Command
|
|
|
"send_num" => $outinfo['good_num'],
|
|
|
"wsend_num" => 0,
|
|
|
"remark" => $cgdinfo['remark'],
|
|
|
- "status" => 3,
|
|
|
+ "status" => 3,//入库完成
|
|
|
"lasttime" => $cgdinfo['lasttime'],
|
|
|
"is_del" => 0,
|
|
|
"order_type" => 5,
|