Programmer:Get Stock Cost v2: Difference between revisions
Content added Content deleted
(Created page with "==References of AutoCount Accounting version 2.0== {{BaseReferenceAC20}} '''AutoCount.StockMaint.dll''' '''AutoCount.Stock.dll''' ==Standard Cost== ===Get Standard Cost wit...") |
|||
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(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom, string loc) |
public decimal GetRecentStockCost(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom, string loc, string batchNo) |
||
{ |
{ |
||
AutoCount.Stock.UTDCostHelper costHelper = |
AutoCount.Stock.UTDCostHelper costHelper = |
||
AutoCount.Stock.UTDCostHelper.Create(dbSetting, itemCode, uom, loc, |
AutoCount.Stock.UTDCostHelper.Create(dbSetting, itemCode, uom, loc, batchNo, DateTime.Today.Date); |
||
//BatchNo can be assigned as null, if there is no BatchNo |
|||
//AutoCount.Stock.UTDCostHelper costHelper = |
|||
// AutoCount.Stock.UTDCostHelper.Create(dbSetting, itemCode, uom, loc, null, DateTime.Today.Date); |
|||
return costHelper.GetMostRecentlyCost().Cost; |
return costHelper.GetMostRecentlyCost().Cost; |
||
} |
} |
||
Line 34: | Line 39: | ||
<br/> |
<br/> |
||
==Up-to-date Cost== |
==Up-to-date Cost== |
||
<syntaxhighlight lang="csharp"> |
<syntaxhighlight lang="csharp"> |