Programmer:Debtor Aging (21)

From AutoCount Resource Center

References of AutoCount Accounting version 2.1

Minimum NuGet Package required

AutoCount2.Accounting

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

class ARAging
{
    private UserSession myUserSession;

    public ARAging(UserSession userSession)
    {
        myUserSession = userSession;
    }

    public System.Data.DataSet GetDebtorAgingDataSet()
    {
        AutoCount.ARAP.DebtorAging.DebtorAging aging = AutoCount.ARAP.DebtorAging.DebtorAging.Create(myUserSession);
        AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new 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()
{
    AutoCount.ARAP.DebtorAging.DebtorAging aging = AutoCount.ARAP.DebtorAging.DebtorAging.Create(myUserSession);
    AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new 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