|
@@ -989,9 +989,17 @@ class OrderInv extends BaseController{
|
|
|
$return['ownerPlace'] = $poolinfo['ownerPlace']??'';
|
|
|
$orderList =Db::name("invoice_good")->where(["invNo"=>$return['invNo'],"is_del"=>0])->select()->toArray();
|
|
|
$return['goodList']=$orderList;
|
|
|
- $info =Db::name("invoice_ticket")->where(["invNo"=>$return['invNo'],"type"=>0]) ->field("inv_number,inv_code")->find();
|
|
|
+ $info =Db::name("invoice_ticket")->where(["invNo"=>$return['invNo'],"is_del"=>0,"type"=>0]) ->field("inv_number,inv_code,open_date")->find();
|
|
|
$return['inv_number']=$info['inv_number']??"";
|
|
|
$return['inv_code']=$info['inv_code']??"";
|
|
|
+ if(!in_array($return['status'],[2,3,4,5])){
|
|
|
+ $opendate =$info['open_date']??"";;
|
|
|
+ if($opendate!=''){
|
|
|
+ $open_month =date("Y-m",strtotime($opendate));
|
|
|
+ $return['is_out_month']= $open_month==date("Y-m")?0:1;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
return app_show(0,"获取成功",$return);
|
|
|
}
|
|
|
/**
|
|
@@ -1173,6 +1181,14 @@ class OrderInv extends BaseController{
|
|
|
foreach ($list as &$value){
|
|
|
$company =Db::name("company_info")->where(["companyNo"=>$value['inv_out']])->find();
|
|
|
$value['companyName'] = $company['company_name']??"";
|
|
|
+ if(!in_array($value['status'],[2,3,4,5])){
|
|
|
+ $opendate =Db::name("invoice_ticket")->where(["invNo"=>$value['invNo'],"is_del"=>0,"type"=>0])->value("open_date","");
|
|
|
+ if($opendate!=''){
|
|
|
+ $open_month =date("Y-m",strtotime($opendate));
|
|
|
+ $value['is_out_month']= $open_month==date("Y-m")?0:1;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|