Programmer:Get Stock Cost v2: Difference between revisions
(Created page with "==References of AutoCount Accounting version 2.0== {{BaseReferenceAC20}} '''AutoCount.StockMaint.dll''' '''AutoCount.Stock.dll''' ==Standard Cost== ===Get Standard Cost wit...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
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"> |
||
Line 59: | Line 65: | ||
<br/><br/><br/><br/><br/><br/> |
<br/><br/><br/><br/><br/><br/> |
||
{{SeeAlsoStock}} |
{{SeeAlsoStock}} |
||
{{SeeAlsoAPIReport}} |
|||
[[Category:Programmer]] |
[[Category:Programmer]] |
||
[[Category:API]] |
[[Category:API]] |
Latest revision as of 10:08, 15 January 2019
References of AutoCount Accounting version 2.0
AutoCount.Accounting.dll AutoCount.Accounting.UI.dll AutoCount.dll AutoCount.MainEntry.dll AutoCount.UI.dll AutoCount.StockMaint.dll AutoCount.Stock.dll
Standard Cost
Get Standard Cost with ItemRecord
public decimal GetItemStandardCostWithItemRecord(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom)
{
AutoCount.Data.ItemRecord itemRec = AutoCount.Data.RecordUtils.GetItem(dbSetting, itemCode, uom);
return itemRec == null ? 0 : itemRec.Cost ?? 0;
}
Get Standard Cost with StockHelper
public decimal GetItemStandardCostWithStockHelper(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom)
{
AutoCount.Stock.StockHelper stkHelper = 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(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom, string loc, string batchNo)
{
AutoCount.Stock.UTDCostHelper costHelper =
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;
}
Up-to-date Cost
public decimal GetUpToDateUnitCost(AutoCount.Data.DBSetting dbSetting, string itemCode, string uom, string location, string batchNo, decimal qty, DateTime date)
{
AutoCount.Stock.StockHelper stkHelper = AutoCount.Stock.StockHelper.Create(dbSetting);
return stkHelper.GetUpToDateUnitCost(itemCode, uom, location, batchNo, qty, date);
}
Items' Stock Balance, Quantity and Costing Table
public System.Data.DataTable GetStockBalanceCostTable(AutoCount.Authentication.UserSession userSession)
{
AutoCount.Stock.StockBalance.StockBalanceHelper sbHelper = new AutoCount.Stock.StockBalance.StockBalanceHelper(userSession);
sbHelper.Inquire(DateTime.Today.Date);
return sbHelper.ResultTable;
}
See Also
- Item Group
- Stock Item (Item Maintenance)
- Stock Adjustment
- Stock Transfer
- Stock Assembly
- Stock Balance with Costing - [1.8, 1.9] [2.0]
- Item Opening Balance Maintenance - [1.8, 1.9] [2.0]
See Also Report API
Category | Reporting | |||
---|---|---|---|---|
AR |
| |||
AP |
| |||
Stock |
| |||
Sales |
| |||
Purchase |
|
Go to top
|
Resources For AutoCount Software Developers
|