demand: tms-客户账单管理-超期回款预警-设置超期未收金额不能小于0 tms-定时任务-定时扫描未收款账单并通知对应责任人时,设置超期未收金额不能小于0

This commit is contained in:
aike 2026-03-12 17:02:10 +08:00
parent 23e1173484
commit dd0cf10ca3

View File

@ -590,7 +590,13 @@
ifnull(tbc.recdPayMoney,0) as recdPayMoney,
(tba.recPayMoney-ifnull(tbc.recdPayMoney,0)-ifnull(tbd.expiredRecdPayMoney,0)-tba.totalSatisfyMoney-tba.totalAllowanceMoney-tba.totalDeductionMoney-tba.totalOtherMoney ) as noRecdPayMoney,
ifnull(tbd.expiredRecdPayMoney,0) as expiredRecdPayMoney,
( ifnull(tbe.expiredNoRecdPayMoney,0) - tba.totalSatisfyMoney-tba.totalAllowanceMoney-tba.totalDeductionMoney-tba.totalOtherMoney ) as expiredNoRecdPayMoney
(
case
when ( ifnull(tbe.expiredNoRecdPayMoney,0) - tba.totalSatisfyMoney-tba.totalAllowanceMoney-tba.totalDeductionMoney-tba.totalOtherMoney ) <![CDATA[ < ]]> 0
then 0
else ( ifnull(tbe.expiredNoRecdPayMoney,0) - tba.totalSatisfyMoney-tba.totalAllowanceMoney-tba.totalDeductionMoney-tba.totalOtherMoney )
end
) as expiredNoRecdPayMoney
from (
select salesmen,bill_month as billMonth,
ROUND(sum(rec_money),2) as recPayMoney,