Programmer:Get Stock Cost: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1:
==References of AutoCount Accounting version 1.8 / 1.9==
{{BaseReferenceAC18}}
'''BCE.AutoCount.StockMaint.dll'''
'''BCE.AutoCount.Stock.dll'''
 
==Standard Cost==
Line 20 ⟶ 24:
 
==Most Recent Cost==
*BatchNo can be assigned as null, if there is no BatchNo
<syntaxhighlight lang="csharp">
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, nullbatchNo, DateTime.Today.Date);
return costHelper.GetMostRecentlyCost().Cost;
}
Line 46 ⟶ 51:
BCE.AutoCount.Stock.StockBalance.StockBalanceHelper sbHelper = new BCE.AutoCount.Stock.StockBalance.StockBalanceHelper(dbSetting);
sbHelper.Inquire(DateTime.Today.Date);
 
//sbHelper.ResultDataSet returns 2 tables
//1. Master (Item Balance)
//2. ItemSerialNo (Serial Number)
//System.Data.DataSet dsBalanceWithSerial = sbHelper.ResultDataSet;
 
return sbHelper.ResultTable;
}
</syntaxhighlight>
[[File:Prog StkBalwQtyCost.png|left|1200px|thumb|Stock Balance Table with Quantity and Cost Balance]]<br/>
 
<br/><br/><br/><br/><br/><br/>
<br/>
{{SeeAlsoStock}}
{{SeeAlsoAPIReport}}
[[Category:Programmer]]
[[Category:API]]