先查出没有审核的转账单
---------------------------------
select * from FAM_TransferBill where Code='转账单号'
再利用转账单号,查出对应的凭证单号
--------------------------------------
SELECT * FROM FAM_CredenceBill WHERE BusinessBillCode='转账单号'
SELECT * FROM FAM_CredenceBillDetail WHERE PARENTBILLCODE='凭证单号'
修改未审核的转账单的状态,不可更新、不可删除、已审核、审核时间、审核人编号及名称
-----------------------------------------------------------------------------------
UPDATE FAM_TransferBill SET CanUpdate=0,CanDelete=0,IsChecked=1,Sys4CheckTime='2016-10-25 14:27:19',CheckUserCode='员工编号',Acc4CheckUserName='员工姓名' WHERE Code='转账单号'
总部下发指令,同步更新到对应门店,修改该门店数据
-----------------------------------------------------------
exec sys_sYNCPushtoShop_InsertAsSql 111,'UPDATE FAM_TransferBill SET CanUpdate=0,CanDelete=0,IsChecked=1,Sys4CheckTime=''2016-10-25 14:27:19'',CheckUserCode=''员工编号'',Acc4CheckUserName=''员工姓名'' WHERE Code=''转账单号''',0,10