| @@ -731,7 +731,7 @@ | |||||
| select tt.* from ( | select tt.* from ( | ||||
| select m.tenant_id,m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | select m.tenant_id,m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | ||||
| xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.rent_shop_type, | xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.rent_shop_type, | ||||
| round( | |||||
| ifnull(round( | |||||
| (select sum(bill.receive_pay) from ( | (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 merchant_id,receive_pay from wx_bill_rent where is_preview = 0 and status not in(3,6) | ||||
| union all | union all | ||||
| @@ -747,8 +747,8 @@ | |||||
| 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 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) receivePay, | |||||
| round( | |||||
| )/100,2),0) receivePay, | |||||
| ifnull(round( | |||||
| (select sum(ss.money) from ( | (select sum(ss.money) from ( | ||||
| select ms.subsidy money,mm.id | select ms.subsidy money,mm.id | ||||
| from wx_merchant_subsidy ms | from wx_merchant_subsidy ms | ||||
| @@ -765,9 +765,9 @@ | |||||
| union all | union all | ||||
| select receive_pay money,merchant_id id from wx_bill_other_deposit where status = 3 | select receive_pay money,merchant_id id from wx_bill_other_deposit where status = 3 | ||||
| )ss where ss.id = m.id | )ss where ss.id = m.id | ||||
| )/100,2) payOut, | |||||
| (round( | |||||
| )/100,2),0) payOut, | |||||
| (ifnull(round( | |||||
| (select sum(bill.receive_pay) from ( | (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 merchant_id,receive_pay from wx_bill_rent where is_preview = 0 and status not in(3,6) | ||||
| union all | union all | ||||
| @@ -783,8 +783,8 @@ | |||||
| 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 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)- | |||||
| round( | |||||
| )/100,2),0)- | |||||
| ifnull(round( | |||||
| (select sum(ss.money) from ( | (select sum(ss.money) from ( | ||||
| select ms.subsidy money,mm.id | select ms.subsidy money,mm.id | ||||
| from wx_merchant_subsidy ms | from wx_merchant_subsidy ms | ||||
| @@ -801,7 +801,7 @@ | |||||
| union all | union all | ||||
| select receive_pay money,merchant_id id from wx_bill_other_deposit where status = 3 | select receive_pay money,merchant_id id from wx_bill_other_deposit where status = 3 | ||||
| )ss where ss.id = m.id | )ss where ss.id = m.id | ||||
| )/100,2)) balance | |||||
| )/100,2),0)) balance | |||||
| from wx_merchant m | from wx_merchant m | ||||
| left join (select ms.merchant_id,s.type,GROUP_CONCAT(s.shop_number) as shop_number | left join (select ms.merchant_id,s.type,GROUP_CONCAT(s.shop_number) as shop_number | ||||