|
@@ -71,19 +71,20 @@ class ComonQrd
|
|
|
|
|
|
protected function invComon($data){
|
|
|
$invinfo =InvoicePool::where(['invNo'=>$data['invNo']])->findOrEmpty();
|
|
|
+
|
|
|
if($invinfo->isEmpty())return;
|
|
|
if($invinfo->status!=4 ||$invinfo->is_comon!=1 )return;
|
|
|
$invpay =InvoicePay::where(['invNo'=>$data['invNo']])->findOrEmpty();
|
|
|
- if($invinfo->isEmpty())return;
|
|
|
- if($invinfo->status!=0 )return;
|
|
|
+ if($invpay->isEmpty())return;
|
|
|
+ if($invpay->status!=0 )return;
|
|
|
$payinfo = Pay::where('payNo',$invpay['payNo'])->findOrEmpty();
|
|
|
if($payinfo->isEmpty()) return;
|
|
|
if($payinfo->is_comon!=1)return;
|
|
|
$ticket =InvoiceTicket::where(["invNo"=>$data['invNo'],"type"=>0])->findOrEmpty();
|
|
|
if($ticket->isEmpty())return;
|
|
|
$pay_fee=0;
|
|
|
- if($payinfo->winv_fee >=$ticket->inv_value){
|
|
|
- $pay_fee = $ticket->inv_value;
|
|
|
+ if($payinfo->winv_fee >=$invinfo->inv_value){
|
|
|
+ $pay_fee = $invinfo->inv_value;
|
|
|
}else{
|
|
|
$pay_fee = $payinfo->winv_fee;
|
|
|
}
|