Merge pull request 'demand: tms-客户账单管理-超期回款预警-设置超期未收金额不能小于0 tms-定时任务-定时扫描未收款账单并通知对应责任人时,设置超期未收金额不能小于0' (#326) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/326
This commit is contained in:
heyu 2026-03-12 17:02:35 +08:00
commit edf68a26b3

View File

@ -590,7 +590,13 @@
ifnull(tbc.recdPayMoney,0) as recdPayMoney, 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, (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(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 ( from (
select salesmen,bill_month as billMonth, select salesmen,bill_month as billMonth,
ROUND(sum(rec_money),2) as recPayMoney, ROUND(sum(rec_money),2) as recPayMoney,