问题描述:
1211科目的8、9月的借方发生额和发票列表的金额不一致,都是在本月生成的凭证,也都生成了凭证了,请再帮忙查下。
问题回复:
出现此问题现象是由于9月份的采购发票,在8月份审核并生成凭证,具体的单据是0000000615 ----9月的单据凭证总值 select sum(md) from gl_accvouch where coutno_id in(select cPZid from Ap_Detail where iBVid in(select id from PurBillVouch p inner join PurBillVouchs ps on p.PBVID =ps.PBVID where YEAR (dpbvdate)=2014 and MONTH(dpbvdate)=9) and cflag='ap' ) and ccode='1211' --9月份的凭证 select * from gl_accvouch where ccode='1211' and iperiod =9 ----9月的单据的凭证明细 select * from gl_accvouch where coutno_id in(select cPZid from Ap_Detail where iBVid in(select id from PurBillVouch p inner join PurBillVouchs ps on p.PBVID =ps.PBVID where YEAR (dpbvdate)=2014 and MONTH(dpbvdate)=9) and cflag='ap' ) and ccode='1211'