【脚本】修正会计科目余额
2018-08-23    易林江
1877 1
通过凭证单据和科目余额的借贷发生总额,对比出实际科目余额与凭证单据发生额是否一致,若有差异,利用脚本指令修正
  • 查询指令

    select * from  FAM_Account where  Code ='科目编号'

    select * from FAM_AccountHistory where  Code ='科目编号' and shopcode='门店编号' order by Accpid

    select * from FAM_CredenceBillDetail where  AccountCode='科目编号' and shopcode='门店编号'

    select sum(Debit) as sumvalue from FAM_CredenceBillDetail where  AccountCode='科目编号' and shopcode='门店编号'
    select sum(credit) as sumvalue from FAM_CredenceBillDetail where  AccountCode='科目编号' and shopcode='门店编号'
    select sum(Debit) as sumvalue from FAM_AccountHistory where  Code='科目编号' and shopcode='门店编号'
    select sum(credit) as sumvalue from FAM_AccountHistory where  Code='科目编号' and shopcode='门店编号'


    若非连锁门店,则“门店编号”可填写为 0。

  • 修正指令

    update FAM_AccountHistory  set debit=debit-数值,credit=credit-数值,pebalance=pebalance-数值,debit4year=debit4year-数值,credit4year=credit4year-数值 where Code='科目编号' and shopcode='门店编号' and AccPid='会计期间'

    update FAM_AccountHistory  set psbalance=psbalance-数值,debit=debit-数值,credit=credit-数值,pebalance=pebalance-数值,debit4year=debit4year-数值,credit4year=credit4year-数值 where Code='科目编号' and shopcode='门店编号' and AccPid='会计期间'

  • 同步指令

    exec SYS_SyncPushToShop_InsertAsSQL 门店编号,'update FAM_AccountHistory  set debit=debit-数值,Credit=Credit-数值,pebalance=pebalance-数值,Credit4Year=Credit4Year+数值 where Code=''科目编号'' and shopcode=''门店编号'' and AccPid=''会计期间''',0,10

该文章对您有用吗?

非常感谢,您的反馈对我们很有价值!

客服电话

4006757966

微信公众号

联系我们

印特3系演示版

申请

印特5系演示版

申请

免费试用

印特软件标准演示版下载申请

请您填写您的一些信息,提交您的申请后,我们会在两个工作日内进行处理,并回复您一封邮件,内附下载链接,请您注意查收。
*
请输入正确的公司名称
*
请输入正确的联络人员
*
请输入正确的联络电话
提交申请
关闭