Programmer:Get Stock Cost: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
==References of AutoCount Accounting version 1.8==
==References of AutoCount Accounting version 1.8 / 1.9==
{{BaseReferenceAC18}}
{{BaseReferenceAC18}}
'''BCE.AutoCount.StockMaint.dll'''
'''BCE.AutoCount.StockMaint.dll'''
Line 24: Line 24:


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