| @@ -157,19 +157,22 @@ | |||||
| rentShopType from ( | rentShopType from ( | ||||
| select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' | select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' | ||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | ||||
| from wx_bill_rent where is_preview = 0 | |||||
| from wx_bill_rent where is_preview = 0 and rent_contract_id in (select id from wx_rent_contract where status in | |||||
| (2,3,4)) | |||||
| union | union | ||||
| select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' | select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' | ||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | ||||
| from wx_bill_rent_deposit | |||||
| from wx_bill_rent_deposit where rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) | |||||
| union | union | ||||
| select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' | select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' | ||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | ||||
| from wx_bill_property where is_preview = 0 | |||||
| from wx_bill_property where is_preview = 0 and property_contract_id in (select id from wx_property_contract | |||||
| where status in(2,3,4)) | |||||
| union | union | ||||
| select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' | select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' | ||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type | ||||
| from wx_bill_property_deposit | |||||
| from wx_bill_property_deposit where property_contract_id in (select id from wx_property_contract where status in | |||||
| (2,3,4)) | |||||
| union | union | ||||
| select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type, 0 as | select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type, 0 as | ||||
| need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | ||||
| @@ -179,7 +182,7 @@ | |||||
| need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | ||||
| from wx_bill_daily where type=2 | from wx_bill_daily where type=2 | ||||
| union | union | ||||
| select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as | |||||
| select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as | |||||
| need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type | ||||
| from wx_bill_other | from wx_bill_other | ||||
| union | union | ||||