财务单反审核提示“一批审核,一批核销,必须一批反审核”原创
8人赞赏了该文章
228次浏览
编辑于2024年01月30日 22:55:38
引起此报错的原因是财务应收单应付单的单据编号和开票核销记录中的单据编号不一致,即在审核且核销后有修改过该单的“单据编号”。需要做数据修复处理,并建议后续要避免这样的操作。
--应收开票核销记录中 单号与单据编号不一致 MERGE INTO T_AR_BILLINGMATCHLOGENTRY T1 USING( SELECT A.FENTRYID,A.FID,B.FBILLNO,C.FVERIFYDATE,B.FSETACCOUNTTYPE FROM T_AR_BILLINGMATCHLOGENTRY A LEFT JOIN T_AR_BILLINGMATCHLOG C ON A.FID=C.FID LEFT JOIN T_AR_RECEIVABLE B ON A.FSRCBILLID=B.FID WHERE UPPER(A.FSOURCEFROMID)='AR_RECEIVABLE' AND A.FSRCBILLNO<>B.FBILLNO ) T2 ON (T1.FENTRYID=T2.FENTRYID) WHEN MATCHED THEN UPDATE SET T1.FSRCBILLNO=T2.FBILLNO; ------------------------------------------------------------------------------ --应付开票核销记录中 单号与单据编号不一致 MERGE INTO T_AP_BILLINGMATCHLOGENTRY T1 USING( SELECT A.FENTRYID,A.FID,B.FBILLNO,C.FVERIFYDATE,B.FSETACCOUNTTYPE FROM T_AP_BILLINGMATCHLOGENTRY A LEFT JOIN T_AP_BILLINGMATCHLOG C ON A.FID=C.FID LEFT JOIN T_AP_PAYABLE B ON A.FSRCBILLID=B.FID WHERE UPPER(FSOURCEFROMID)='AP_PAYABLE' AND A.FSRCBILLNO<>B.FBILLNO ) T2 ON (T1.FENTRYID=T2.FENTRYID) WHEN MATCHED THEN UPDATE SET T1.FSRCBILLNO=T2.FBILLNO;