简体   繁体   English

从Sage Line 50数据库检索所有付款

[英]Retrieving All Payments From Sage Line 50 Database

I'm trying to retrieve a list of all payments received/entered into a Sage Line 50 database. 我正在尝试检索所有已收到/已输入Sage Line 50数据库的付款的列表。 The company I work for are members of the Sage developer program, so I have access to the SDK, help files and the like but I have been unable to find any specific information regarding payments. 我工作的公司是Sage开发人员计划的成员,因此我可以访问SDK,帮助文件等,但找不到任何有关付款的特定信息。

Some of the .dta files contain references to payments (SPLITS.DTA & HEADER.DTA) alongside Invoice rows. 一些.dta文件在发票行旁边包含对付款的引用(SPLITS.DTA和HEADER.DTA)。

Does anyone know whether or not there is a separate file which contains only payment information, and if so what is it? 有谁知道是否有一个单独的文件仅包含付款信息,如果是的话,那是什么? Alternatively, will I have to pull the full list of rows from the SPLITS/HEADER files and filter them by type? 或者,我是否必须从SPLITS / HEADER文件中提取行的完整列表并按类型进行过滤?

Many thanks in advance 提前谢谢了

I pulled data from the Header and Split files for a test customer this afternoon, and they contain (as near as I can tell) all customer activity - Invoices, Invoice payments and Credits are all reflected in both data files (the split data file containing more in depth data) and can be filtered by bank_code and transaction type. 我今天下午从Header和Split文件中提取了一个测试客户的数据,它们包含(据我所知)所有客户活动-发票,发票付款和贷方都反映在两个数据文件中(拆分数据文件包含更多深度数据),并可以按bank_code和交易类型进行过滤。

To get the data - first create a reference to a customer object and from there link to all of the header (assuming you have an existing connection and workspace). 要获取数据-首先创建对客户对象的引用,然后从那里链接到所有标头(假设您已有连接和工作空间)。

dynamic workspace = this._workspaces[workspaceName];
dynamic customer = workspace.CreateObject("SalesRecord");

bool added = customer.AddNew();

customer.MoveFirst(); //find first customer

dynamic headerObject = customer.Link;

bool headerFound = headerObject.MoveFirst(); //use .MoveNext() to cycle headers

You can then pull data from the header object using : 然后,您可以使用以下命令从标头对象中提取数据:

string AccountRef = headerObject.Fields.Item("ACCOUNT_REF").Value;

Where ACCOUNT_REF is a field in the HeaderData object. 其中ACCOUNT_REF是HeaderData对象中的字段。

Use the following code to get split data 使用以下代码获取拆分数据

dynamic splitObject = headerObject.Link;

bool splitFound = splitObject.MoveFirst()  //and so on

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM