Quellcode durchsuchen

【系统反馈2024070099】【银行现金余额刷新需要带上币别的条件】

wub vor 1 Monat
Ursprung
Commit
6485bce758

+ 2 - 2
src/com/uas/erp/service/fa/impl/AccountRegisterBankServiceImpl.java

@@ -1847,8 +1847,8 @@ public class AccountRegisterBankServiceImpl implements AccountRegisterBankServic
 	public void refreshQuery(String condition) {
 		int premonth = Integer.parseInt(voucherDao.getJustPeriods("MONTH-B").get("PreYearmonth").toString());
 		baseDao.execute(
-				"update category set ca_nowbalance=nvl((select am_nowbalance from ALMonth where ca_id=am_accountcode and am_yearmonth=?),0)+nvl((select sum(nvl(ar_deposit,0))-sum(nvl(ar_payment,0)) from accountregister where to_char(ar_date,'yyyymm')>? and ar_statuscode='POSTED' and ar_accountcode=ca_code),0) "
-						+ " where (abs(nvl(ca_isbank,0))=1 or abs(nvl(ca_iscash,0))=1) and exists (select 1 from almonth where ca_id=am_accountcode)",
+				"update category set ca_nowbalance=nvl((select am_nowbalance from ALMonth where ca_id=am_accountcode and CA_CURRENCY = AM_CURRENCY and am_yearmonth=?),0)+nvl((select sum(nvl(ar_deposit,0))-sum(nvl(ar_payment,0)) from accountregister where to_char(ar_date,'yyyymm')>? and ar_statuscode='POSTED' and ar_accountcode=ca_code),0) "
+				+ " where (abs(nvl(ca_isbank,0))=1 or abs(nvl(ca_iscash,0))=1) and exists (select 1 from almonth where ca_id=am_accountcode)",
 				premonth, premonth);
 	}