| @@ -781,20 +781,34 @@ | |||||
| )/100,2),0) payOut, | )/100,2),0) payOut, | ||||
| (ifnull(round( | (ifnull(round( | ||||
| (select sum(bill.receive_pay) from ( | |||||
| select merchant_id,receive_pay from wx_bill_rent where is_preview = 0 and status not in(3,6) | |||||
| (select sum(bill.receive_pay)+sum(bill.late_pay_price)+bill.receivePay from ( | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,late_pay_price from wx_bill_rent | |||||
| where is_preview = 0 and status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_rent_deposit where status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,0 late_pay_price from | |||||
| wx_bill_rent_deposit where status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_property where is_preview = 0 and status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,late_pay_price from | |||||
| wx_bill_property where is_preview = 0 and status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_property_deposit where status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,0 late_pay_price from | |||||
| wx_bill_property_deposit where status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_daily where type in(1,2,3) and status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,0 late_pay_price from | |||||
| wx_bill_daily where type in(1,2,3) and status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_other where status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,0 late_pay_price from | |||||
| wx_bill_other where status not in(3,6) | |||||
| union all | union all | ||||
| select merchant_id,receive_pay from wx_bill_other_deposit where status not in(3,6) | |||||
| select merchant_id,receive_pay,if(service_charge_pay>0,service_charge_pay,receive_pay/10000*(select | |||||
| service_charge_rate from wx_pay_account_bill where tenant_id=456)) receivePay,0 late_pay_price from | |||||
| wx_bill_other_deposit where status not in(3,6) | |||||
| ) bill where bill.merchant_id = m.id | ) bill where bill.merchant_id = m.id | ||||
| )/100,2),0)- | )/100,2),0)- | ||||
| ifnull(round( | ifnull(round( | ||||