Programmer:Debtor Aging (19)

From AutoCount Resource Center
Jump to navigation Jump to search

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

Prog.AR.AgingDataSet.png

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.

Prog.AR.AgingDetailTable.png

See Also Report API

Category Reporting
AR
AP
Stock
Sales
Purchase

Go to menu

IconAC81.png Go to top
ProgrammerGo.jpg Resources For AutoCount Software Developers