Programmer:Debtor Aging (19): Difference between revisions

From AutoCount Resource Center
Content added Content deleted
No edit summary
No edit summary
 
Line 4: Line 4:


==Extract data of AR Debtor Aging with API==
==Extract data of AR Debtor Aging with API==
The sample code below shows how to retrieve DataSet or DataTable of Debtor Aging.
Examples below shows how to retrieve DataSet or DataTable of Debtor Aging.
It filters result of:
It filters result of:
#Up to Today's date;
#Up to Today's date;
Line 10: Line 10:
#and does not include debtor whom the balance is zero.
#and does not include debtor whom the balance is zero.


===Aging DataSet===
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
public System.Data.DataSet DebtorAgingDataSet(BCE.Data.DBSetting dbSetting)
public System.Data.DataSet DebtorAgingDataSet(BCE.Data.DBSetting dbSetting)
Line 35: Line 36:


* Tables in Aging DataSet
* Tables in Aging DataSet
[[File:Prog.AR.AgingDataSet.png]]
[[File:Prog.AR.AgingDataSet.png|link=]]


===Aging Detail Table===
<br/><br/>
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
public System.Data.DataTable DebtorAgingTable(BCE.Data.DBSetting dbSetting)
public System.Data.DataTable DebtorAgingTable(BCE.Data.DBSetting dbSetting)

Latest revision as of 02:28, 23 July 2019

References of AutoCount Accounting version 1.8 / 1.9

BCE.AutoCount.dll
BCE.AutoCount.CommonAccounting.dll
BCE.AutoCount.MainEntry.dll
BCE.Utils.dll
BCE.Utils.UI.dll
BCE.AutoCount.ARAP.dll

Extract data of AR Debtor Aging with API

Examples below shows how to retrieve DataSet or DataTable of Debtor Aging. It filters result of:

  1. Up to Today's date;
  2. Debtor code range of "300-A001" and "300-C999";
  3. and does not include debtor whom the balance is zero.

Aging DataSet

public System.Data.DataSet DebtorAgingDataSet(BCE.Data.DBSetting dbSetting)
{
    BCE.AutoCount.ARAP.DebtorAging.DebtorAging aging = BCE.AutoCount.ARAP.DebtorAging.DebtorAging.Create(dbSetting);
    BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria();

    //There are many more criteria to filter the result
    crit.ReportDate = DateTime.Today.Date;
    crit.DebtorFilter.ByRange("300-A001", "300-C999");
    crit.IncludeZeroBalance = false;

    //The return table is "Master"
    DataTable tblAging = aging.Inquire(crit);

    //DataSet consists of many tables, and "Master" table
    return aging.ResultDataSet;

    //If only the master table is needed, programmer can return only DataTable of the master table
    //tblAging table and aging.ResultDataTable are the same
    //return tblAging;
    //return aging.ResultDataTable;
}
  • Tables in Aging DataSet

Aging Detail Table

public System.Data.DataTable DebtorAgingTable(BCE.Data.DBSetting dbSetting)
{
    BCE.AutoCount.ARAP.DebtorAging.DebtorAging aging = BCE.AutoCount.ARAP.DebtorAging.DebtorAging.Create(dbSetting);
    BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria();

    //There are many more criteria to filter the result
    crit.ReportDate = DateTime.Today.Date;
    crit.DebtorFilter.ByRange("300-A001", "300-C999");
    crit.IncludeZeroBalance = false;

    //The return table is "Master"
    DataTable tblAging = aging.Inquire(crit);

    return aging.ResultDataSet.Tables["Detail"];
}
  • Columns in Aging.Detail Table.

See Also Report API

Category Reporting
AR
AP
Stock
Sales
Purchase

Go to menu

Go to top
Resources For AutoCount Software Developers