|
|
|
@@ -88,8 +88,10 @@ |
|
|
|
br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, |
|
|
|
br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,r.type rentType,r.pay_ratio payRatio, |
|
|
|
br.`revenue`,br.`late_pay_ratio` latePayRatio,br.`late_pay_time` latePayTime,br.`period`, |
|
|
|
br.`rent_contract_id` rentContractId,d.receive_pay deposit,case when br.late_pay_time is null then 0 else |
|
|
|
FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe) end latePayPrice, |
|
|
|
br.`rent_contract_id` rentContractId,d.receive_pay deposit,case when br.late_pay_status=2 |
|
|
|
then (case when br.late_pay_time is null then 0 |
|
|
|
else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) |
|
|
|
else br.late_pay_price end latePayPrice, |
|
|
|
(select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status` |
|
|
|
depositStatus,br.shop_info shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus |
|
|
|
from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id |
|
|
|
|