|
@@ -1143,7 +1143,7 @@ class Reorder extends Base
|
|
|
return error_show(1005,"未找到退货原因数据");
|
|
|
}
|
|
|
$remark =isset($this->post['remark']) &&$this->post['remark']!=''?trim($this->post['remark']) :"";
|
|
|
- $addr =Db::name("order_addr")->where([["order_code","=",$orderCode],["is_del","=",0]])->select()->toArray();
|
|
|
+ $addr =Db::name("order_addr")->where([["orderCode","=",$orderCode],["is_del","=",0]])->select()->toArray();
|
|
|
$ordernum = Db::name("order_num")->where(['orderCode' => $orderCode])->find();
|
|
|
if ($ordernum == false) {
|
|
|
return error_show(1005, '未找到关联采购单');
|
|
@@ -1188,7 +1188,7 @@ class Reorder extends Base
|
|
|
$process=["order_code"=>$returnCode,"order_id"=>$create,"order_status"=>$in['status'],"order_type"=>'XSTHD',"before_status"=>0];
|
|
|
ProcessOrder::AddProcess(["id"=>$this->uid,"nickname"=>$this->uname],$process);
|
|
|
//维护台账信息
|
|
|
- Db::execute("UPDATE `wsm_standing_book` SET `returnGoodCode`=CONCAT(IFNULL(`returnGoodCode`,''),',{$returnCode}'),`updatetime`='" . date('Y-m-d H:i:s') . "' WHERE `orderCode`='{$ordeCode}'");
|
|
|
+ Db::execute("UPDATE `wsm_standing_book` SET `returnGoodCode`=CONCAT(IFNULL(`returnGoodCode`,''),',{$returnCode}'),`updatetime`='" . date('Y-m-d H:i:s') . "' WHERE `orderCode`='{$orderCode}'");
|
|
|
if(count($addr)!=0){
|
|
|
$inf=[];
|
|
|
foreach ($addr as $val){
|
|
@@ -1234,7 +1234,7 @@ class Reorder extends Base
|
|
|
}
|
|
|
}
|
|
|
$temp['returnCode']=$returnCode;
|
|
|
- $temp['orderCode']=$ordeCode;
|
|
|
+ $temp['orderCode']=$orderCode;
|
|
|
$temp['outCode']=isset($send['outCode'])?$send['outCode']:"";
|
|
|
$temp['addrid']=$val['id'];
|
|
|
$temp['send_num']=$val['receipt_quantity'];
|
|
@@ -1342,7 +1342,7 @@ class Reorder extends Base
|
|
|
$good_data[]= ['good_log_code' => $returnCode, "stock_id" => isset($stock['id']) ? $stock['id'] : Db::name("good_stock")->getLastInsID(), "type" => 2, 'stock' => $thnum, "stock_name" => "wait_out_stock"];
|
|
|
GoodLog::LogAdd(["id"=>$this->uid,"nickname"=>$this->uname], $good_data, 'XSTHD');
|
|
|
$data=[
|
|
|
- "orderCode"=>$ordeCode,
|
|
|
+ "orderCode"=>$orderCode,
|
|
|
"th_type"=>1,
|
|
|
"th_num"=>$thnum,
|
|
|
"th_fee"=>round($order['sale_price']*$thnum,2),
|