Sage 200数据库

时间:2016-07-04 12:37:30

标签: sql sage-erp

我注意到在许多Sage 200数据库中,查看销售方面,没有足够的分配来弥补表SLPostedCustomerTran中某些行记录的分配值。换句话说,以下查询为某些数据库返回非零结果:

SELECT count(*)
FROM SLPostedCustomerTran
   INNER JOIN SLAllocationTran on SLPostedCustomerTran.SLPostedCustomerTranID = SLAllocationTran.SLPostedCustomerTranID
GROUP BY SLPostedCustomerTran.SLPostedCustomerTranID, SLPostedCustomerTran.AllocatedValue
HAVING sum(SLAllocationTran.AllocationValue) <> SLPostedCustomerTran.AllocatedValue

是否还有另一个我应该关注的表,也许是一个包含清除数据的表?如果没有,数据库是否被破坏是公平的假设? (这些是属于某些公司的数据库,我不确切知道如何输入数据。)

1 个答案:

答案 0 :(得分:2)

SLPostedCustomerTran将Invoice / CreditNote / Payment / Receipt all作为正值。查看SysTraderTranType表,然后通过单个TranType过滤您的查询,以获得更有意义的结果。

会计系统管理员&gt; System Utilities&gt;平衡分类帐&gt;财务部门应通过分配纠正任何异常情况。

相关问题