wugg 4 maanden geleden
bovenliggende
commit
034ca5d6bf
3 gewijzigde bestanden met toevoegingen van 7 en 9 verwijderingen
  1. 0 4
      app/common/Youzan.php
  2. 4 3
      app/cxinv/controller/Stage.php
  3. 3 2
      app/cxinv/listener/ComonQrd.php

+ 0 - 4
app/common/Youzan.php

@@ -49,10 +49,6 @@ class Youzan {
     //youzan.ump.voucheractivity.query.3.0.2 根据活动查询选项查询活动详情信息
     //youzan.ump.voucheractivity.manage.info.search.1.0.1 :查询优惠券/码活动管理信息
     //'youzan.ump.voucheractivity.delete',//优惠码/券删除
-
-
-    ///packages/user/coupon/list/index?type=promocard
-    /// packages/user/coupon/detail/index?id=32175626&alias=u3dr326s&type=promocard&sign=50774af53403a0f4737989b98c7231bd&shopAutoEnter=1
     public function __construct()
     {
     	$this->clientId    =env('yz.clientid');

+ 4 - 3
app/cxinv/controller/Stage.php

@@ -6,7 +6,8 @@ namespace app\cxinv\controller;
 
 use app\cxinv\model\Pay;
 use app\cxinv\model\PayInfo;
-use app\cxinv\model\PaymentOrder;use app\cxinv\model\PayPayment;
+use app\cxinv\model\PaymentOrder;
+use app\cxinv\model\PayPayment;
 use app\cxinv\model\PayReturn;
 use app\cxinv\model\RoleAction;
 use app\user\model\AccountCompany;
@@ -35,7 +36,7 @@ class Stage extends Base{
         $val= Validate::rule([
             "sequenceNo|采购单号"=>"require|max:255",
             "rela_fee|关联付款金额"=>"require|float"]);
-        $total_fee=0;
+        $total_fee="0";
         $relaData=[];
         foreach ($params["cgdNos"] as $v){
             if(!$val->check($v)) return error($val->getError());
@@ -48,7 +49,7 @@ class Stage extends Base{
                 "rela_fee"=>$v["rela_fee"],
                 "status"=>0
             ];
-            $total_fee+=$v["rela_fee"];
+            $total_fee=bcadd($total_fee,$v['rela_fee'],2);
         }
         $ment =[
                 'payNo'=>$params['payNo'],

+ 3 - 2
app/cxinv/listener/ComonQrd.php

@@ -38,7 +38,7 @@ class ComonQrd
     public function InvToPay($data,$bool=True){
                 $invinfo =InvoicePool::with(["poolInfo"])->where(['invNo'=>$data['invNo']])->findOrEmpty();
             	if($invinfo->isEmpty())return;
-            	if($invinfo->buyer_code !=='911100006337468570')return;
+            	if($invinfo->buyer_code !='911100006337468570')return;
             	if($bool){
             		if($invinfo->status!=4 ||$invinfo->is_comon!=1 )return;
             		$assoc_status=2;
@@ -91,7 +91,8 @@ class ComonQrd
                         $tag_fee = ($item->pay_tag_fee>$payArr[$item->sequenceNo])?$payArr[$item->sequenceNo]:$item->pay_tag_fee;
                         $qrd['pay_tag_fee']=$item->pay_tag_fee-$tag_fee;
                         $qrd['wpay_fee'] = $item->wpay_fee+$tag_fee;
-                        $qrd['pay_status'] = ($qrd['wpay_fee']==0  &&$item->pay_fee==0) ? 3:($qrd['apay_fee']==0?2:1);
+                        $qrd['pay_status'] = ($qrd['apay_fee']==0  &&$item->pay_fee==0) ? 1:2;
+                        if($qrd['pay_tag_fee']==0) $qrd['pay_tag']=0;
 		            }
 		            $qrdSave[]=$qrd;
 		            $tag[]=$tag_temp;