Programmer:Get Stock Cost

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.StockMaint.dll
BCE.AutoCount.Stock.dll

Standard Cost

Get Standard Cost with ItemRecord

public decimal GetItemStandardCostWithItemRecord(BCE.Data.DBSetting dbSetting, string itemCode, string uom)
{
    BCE.AutoCount.Data.ItemRecord itemRec = BCE.AutoCount.Data.CommonRecordUtils.GetItem(dbSetting, itemCode, uom);
    return itemRec == null ? 0 : itemRec.Cost;
}

Get Standard Cost with StockHelper

public decimal GetItemStandardCostWithStockHelper(BCE.Data.DBSetting dbSetting, string itemCode, string uom)
{
    BCE.AutoCount.Stock.StockHelper stkHelper = BCE.AutoCount.Stock.StockHelper.Create(dbSetting);
    return stkHelper.GetFixedCost(itemCode, uom);
}

Most Recent Cost

  • BatchNo can be assigned as null, if there is no BatchNo
public decimal GetRecentStockCost(BCE.Data.DBSetting dbSetting, string itemCode, string uom, string loc, string batchNo)
{
    BCE.AutoCount.Stock.UTDCostHelper costHelper =
        BCE.AutoCount.Stock.UTDCostHelper.Create(dbSetting, itemCode, uom, loc, batchNo, DateTime.Today.Date);
    return costHelper.GetMostRecentlyCost().Cost;
}


Up-to-date Cost

public decimal GetUpToDateUnitCost(BCE.Data.DBSetting dbSetting, string itemCode, string uom, decimal qty, DateTime date)
{
    BCE.AutoCount.Stock.StockHelper stkHelper = BCE.AutoCount.Stock.StockHelper.Create(dbSetting);
    return stkHelper.GetUpToDateUnitCost(itemCode, uom, qty, date);
}


Items' Stock Balance, Quantity and Costing Table

public System.Data.DataTable GetStockBalanceCostTable(BCE.Data.DBSetting dbSetting)
{
    BCE.AutoCount.Stock.StockBalance.StockBalanceHelper sbHelper = new BCE.AutoCount.Stock.StockBalance.StockBalanceHelper(dbSetting);
    sbHelper.Inquire(DateTime.Today.Date);

    return sbHelper.ResultTable;
}
 
Stock Balance Table with Quantity and Cost Balance








See Also

See Also Report API

Category Reporting
AR
AP
Stock
Sales
Purchase

Go to menu

  Go to top
  Resources For AutoCount Software Developers