|
@@ -37,13 +37,13 @@ class ComonQrd
|
|
public function InvToPay($data,$bool=True){
|
|
public function InvToPay($data,$bool=True){
|
|
$invinfo =InvoicePool::with(["poolInfo"])->where(['invNo'=>$data['invNo']])->findOrEmpty();
|
|
$invinfo =InvoicePool::with(["poolInfo"])->where(['invNo'=>$data['invNo']])->findOrEmpty();
|
|
if($invinfo->isEmpty())return;
|
|
if($invinfo->isEmpty())return;
|
|
- if($invinfo->buyer_code !=='911100006337468570')return;
|
|
|
|
|
|
+ if($invinfo->buyer_code !='911100006337468570')return;
|
|
if($bool){
|
|
if($bool){
|
|
if($invinfo->status!=4 ||$invinfo->is_comon!=1 )return;
|
|
if($invinfo->status!=4 ||$invinfo->is_comon!=1 )return;
|
|
$assoc_status=2;
|
|
$assoc_status=2;
|
|
}else{
|
|
}else{
|
|
$assoc_status=3;
|
|
$assoc_status=3;
|
|
- if(in_array($invinfo->status,[5,6,7,8,9])||$invinfo->is_comon!=1 )return;
|
|
|
|
|
|
+ if(!in_array($invinfo->status,[5,6,7,8,9])||$invinfo->is_comon!=1 )return;
|
|
}
|
|
}
|
|
|
|
|
|
$assoc = Assoc::where(["viceCode"=>$data['invNo'],"status"=>$assoc_status,"is_del"=>0,"type"=>1])->select();
|
|
$assoc = Assoc::where(["viceCode"=>$data['invNo'],"status"=>$assoc_status,"is_del"=>0,"type"=>1])->select();
|
|
@@ -90,7 +90,8 @@ class ComonQrd
|
|
$tag_fee = ($item->pay_tag_fee>$payArr[$item->sequenceNo])?$payArr[$item->sequenceNo]:$item->pay_tag_fee;
|
|
$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['pay_tag_fee']=$item->pay_tag_fee-$tag_fee;
|
|
$qrd['wpay_fee'] = $item->wpay_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;
|
|
$qrdSave[]=$qrd;
|
|
$tag[]=$tag_temp;
|
|
$tag[]=$tag_temp;
|