应收与总账对账不平衡 问题描述:在应收管理模块中,进行“与总帐对帐”选择(客户+币种)对账时,出现对账不平衡,点击详细时,报“由于录入的期初单据或制单时改变了分录方向等造成对帐不平,无法展开成详细”,再改成‘科目+客户’时,为平衡。 问题原因:经过测试确实存在此问题,经过跟踪按‘客户+币种’程序所选择出: select cDwCode As WLCode,convert(varchar(100),'') As WLName,cexch_name,sum(case when dRegDate<'2005-01-01' or iPeriod=0 then iDAmount_s-iCAmount_s else 0 end) As BA_s,sum(case when (dRegDate<'2005-01-01' or iPeriod=0) and cexch_name<>'人民币' then iDAmount_f-iCAmount_f else 0 end) As BA_f,sum(case when dRegDate<'2005-01-01' or iPeriod=0 then iDAmount-iCAmount else 0 end) As BA,sum(case when dRegDate>='2005-01-01' then iDAmount_s else 0 end) As DA_s,sum(case when dRegDate>='2005-01-01' and cexch_name<>'人民币' then iDAmount_f else 0 end) As DA_f,sum(case when dRegDate>='2005-01-01' then iDAmount else 0 end) As DA,sum(case when dRegDate>='2005-01-01' then iCAmount_s else 0 end) As CA_s,sum(case when dRegDate>='2005-01-01' and cexch_name<>'人民币' then iCAmount_f else 0 end) As CA_f,sum(case when dRegDate>='2005-01-01' then iCAmount else 0 end) As CA,convert(money,0) As qc_s,convert(money,0) As qc_f,convert(money,0) As qc,convert(money,0) As jf_s,convert(money,0) As jf_f,convert(money,0) As jf,convert(money,0) As df_s,convert(money,0) As df_f,convert(money,0) As df INTO #tempDZ From Ap_Detail Where cFlag='AR' and iFlag<='2005-01-31' and dRegDate<='2005-01-31' Group by cDwCode,cExch_Name 按‘科目+客户’程序所选择出: select cDwCode As WLCode,convert(varchar(100),'') As WLName,sum(case when dRegDate<'2005-01-01' or iPeriod=0 then iDAmount_s-iCAmount_s else 0 end) As BA_s,sum(case when (dRegDate<'2005-01-01' or iPeriod=0) and cexch_name<>'人民币' then iDAmount_f-iCAmount_f else 0 end) As BA_f,sum(case when dRegDate<'2005-01-01' or iPeriod=0 then iDAmount-iCAmount else 0 end) As BA,sum(case when dRegDate>='2005-01-01' then iDAmount_s else 0 end) As DA_s,sum(case when dRegDate>='2005-01-01' and cexch_name<>'人民币' then iDAmount_f else 0 end) As DA_f,sum(case when dRegDate>='2005-01-01' then iDAmount else 0 end) As DA,sum(case when dRegDate>='2005-01-01' then iCAmount_s else 0 end) As CA_s,sum(case when dRegDate>='2005-01-01' and cexch_name<>'人民币' then iCAmount_f else 0 end) As CA_f,sum(case when dRegDate>='2005-01-01' then iCAmount else 0 end) As CA,convert(money,0) As qc_s,convert(money,0) As qc_f,convert(money,0) As qc,convert(money,0) As jf_s,convert(money,0) As jf_f,convert(money,0) As jf,convert(money,0) As df_s,convert(money,0) As df_f,convert(money,0) As df INTO #tempDZ From Ap_Detail Where cCode='1131' and iFlag<='2005-01-31' and dRegDate<='2005-01-31' Group by cDwCode 区别: iflag一个选择小于3的,一个选择小于5的所造成。 解决方案:游客无权查看 相关补丁:U852 应收应付最新补丁(全)模块:应收产品:U852----应收款管理问题名称:应收与总账对账不平衡更新时间:2005-06-28 00:00:00 有用 没用106 浏览 分类 U8知识库用友U8知识库(旧)畅捷通知识库用友NC知识库用友U9知识库用友政务知识库致远OA知识库U8Cloud知识库