wugg 2 gadi atpakaļ
vecāks
revīzija
8f62d70497
2 mainītis faili ar 21 papildinājumiem un 9 dzēšanām
  1. 9 9
      app/admin/controller/OrderInv.php
  2. 12 0
      app/admin/controller/Payment.php

+ 9 - 9
app/admin/controller/OrderInv.php

@@ -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'],

+ 12 - 0
app/admin/controller/Payment.php

@@ -787,6 +787,18 @@ class Payment extends BaseController
         if($supplierNo!=""){
           $condition []=["supplierNo","like","%$supplierNo%"];
         }
+		  $cgder= isset($post['cgder']) && $post['cgder']!='' ? trim($post['cgder']) :"";
+        if($cgder!='') $condition []=["ownerName","like","%$cgder%"];
+        $cgderid= isset($post['cgderid']) && $post['cgderid']!='' ? trim($post['cgderid']) :"";
+        if($cgderid!='') $condition []=["ownerid","=",$cgderid];
+
+         $cgdtype= isset($post['cgdtype']) && $post['cgdtype']!='' ? intval($post['cgdtype']) :"";
+        if($cgdtype!='') $condition []=["cgdType","=",$cgdtype];
+         $cgdsource= isset($post['cgdsource']) && $post['cgdsource']!='' ? intval($post['cgdsource']) :"";
+        if($cgdsource!='') $condition []=["cgdSource","=",$cgdsource];
+         $sendstatus= isset($post['sendstatus']) && $post['sendstatus']!='' ? intval($post['sendstatus']) :"";
+        if($sendstatus!='') $condition []=["sendStatus","=",$sendstatus];
+
         $page =  isset($post['page'])&&$post['page']!="" ? intval($post['page']) :0;
         $size =  isset($post['size'])&&$post['size']!="" ? intval($post['size']) :10;
         $count =  Db::name("cgd_info")->where($condition)->count();