|
@@ -266,6 +266,12 @@ class Reorder extends \app\BaseController
|
|
|
$value['wsm_supplier'] =isset($wsmcode['name']) ? $wsmcode['name']:"";
|
|
|
$value['wsm_supplierNo'] =isset($wsmcode['code']) ? $wsmcode['code']:"";
|
|
|
}
|
|
|
+ $orderwsm = Db::name("sale_info")->where(["orderCode"=>$info["orderCode"],"wsm_code"=>$value["wsm_code"]])->find();
|
|
|
+ $value["wsm_total"] = isset($orderwsm["num"]) ? $orderwsm["num"]:0;
|
|
|
+ $send = Db::name("order_out")->where(["wsm_code" => $value['wsm_code'], 'orderCode' => $info['orderCode']])->sum("send_num");
|
|
|
+ $value['wsm_send'] = $send ?? 0;
|
|
|
+ $value['wsm_wsend'] = $value['wsm_total'] - $value['wsm_send'];
|
|
|
+
|
|
|
$wsm[]=$value;
|
|
|
}
|
|
|
}
|
|
@@ -282,6 +288,10 @@ class Reorder extends \app\BaseController
|
|
|
$value['post_fee']=isset($addrlist['post_fee'])?$addrlist['post_fee']:"";
|
|
|
$value['addive_time']=isset($addrlist['addive_time'])?$addrlist['addive_time']:"";
|
|
|
$value['customer_code']=isset($addrlist['customer_code']) ?$addrlist['customer_code']:"" ;
|
|
|
+ $value['receipt_quantity']=isset($addrlist['receipt_quantity']) ?$addrlist['receipt_quantity']:"" ;
|
|
|
+ $send = Db::name("order_out")->where(['addrid' => $addrlist['id'], 'orderCode' => $addrlist['orderCode']])->sum("send_num");
|
|
|
+ $value['addr_send'] = $send ?? 0;
|
|
|
+ $value['addr_wsend'] = $value['receipt_quantity'] - $value['addr_send'];
|
|
|
$customer = Db::name("customer_info")->where(['companyNo'=>$addrlist['customer_code']])->find();
|
|
|
$value['customer_name'] = isset($customer['companyName']) ? $customer['companyName']:"";
|
|
|
$addrinfo[]=$value;
|
|
@@ -384,7 +394,7 @@ class Reorder extends \app\BaseController
|
|
|
try{
|
|
|
$temp= $info['status'];
|
|
|
$info['status'] =$status;
|
|
|
- $info['remark'] =$remark;
|
|
|
+ $remark!=""? $info['remark'] =$remark:"";
|
|
|
$info["updatetime"]=date("Y-m-d H:i:s");
|
|
|
$up = Db::name("sale_return")->save($info);
|
|
|
if($up){
|