|
@@ -1231,7 +1231,7 @@ class OrderInv extends BaseController{
|
|
|
}
|
|
|
$invinfo = Db::name("invoice_pool")->where(["invNo"=>$redinfo['invNo'],"is_del"=>0])->findOrEmpty();
|
|
|
if(empty($invinfo)) return error_show(1004,"红冲发票原票信息未找到");
|
|
|
- $invpoolinfo = Db::name("invoice_pool_info")->where(["invNo"=>$redinfo['invNo']])->findOrEmpty();
|
|
|
+ $invpoolinfo = Db::name("invoice_ticket")->where(["invNo"=>$redinfo['invNo'],"status"=>1,"is_del"=>0])->findOrEmpty();
|
|
|
if(empty($invpoolinfo)) return error_show(1004,"红冲发票开票信息未找到");
|
|
|
Db::startTrans();
|
|
|
try{
|
|
@@ -1254,19 +1254,19 @@ class OrderInv extends BaseController{
|
|
|
"GMFLX"=>$invinfo['company_type'],
|
|
|
"GMFSJH"=>"",
|
|
|
"GMFDZYX"=>$invinfo['email'],
|
|
|
- "KPR"=>$invpoolinfo['drawer'],
|
|
|
- "SKR"=>$invpoolinfo['payee'],
|
|
|
+ "KPR"=>$invpoolinfo['issuer'],
|
|
|
+ "SKR"=>$invpoolinfo['reciver'],
|
|
|
"FHR"=>$invpoolinfo['reviewer'],
|
|
|
"QDBZ"=>"",
|
|
|
"YFPDM"=>$redinfo['YFPDM'],
|
|
|
"YFPHM"=>$redinfo['YFPHM'],
|
|
|
- "YFPLX"=>$redinfo['FPLXDM'],
|
|
|
- "YFPKPRQ"=>$redinfo['YFPKPRQ'],
|
|
|
- "CHYY"=>$redreason,
|
|
|
+ "YFPLX"=>$invpoolinfo['inv_type'] == '004' || $invpoolinfo['inv_type'] == '028' ? '':$invpoolinfo['inv_type'],
|
|
|
+ "YFPKPRQ"=>$invpoolinfo['inv_type'] == '004' || $invpoolinfo['inv_type'] == '028' ? '':date("Y-m-d",strtotime($redinfo['YFPKPRQ'])),
|
|
|
+ "CHYY"=>$invpoolinfo['inv_type'] == '004' || $invpoolinfo['inv_type'] == '028' ? '':$redreason,
|
|
|
"TSCHBZ"=>"",
|
|
|
- "JSHJ"=>"-".$invinfo['inv_value'],
|
|
|
- "HJJE"=>$redinfo['HJJE'],
|
|
|
- "HJSE"=>$redinfo['HJSE'],
|
|
|
+ "JSHJ"=>"-".$invpoolinfo['inv_total'],
|
|
|
+ "HJJE"=>$invpoolinfo['inv_subtotal'],
|
|
|
+ "HJSE"=>$invpoolinfo['tax_fee'],
|
|
|
"BZ"=>"",
|
|
|
"DDMXXX"=>$redinfo['DDMXXX'],
|
|
|
"FPLXDM"=>$redinfo['FPLXDM'],
|