Package org.openbravo.costing
Class AverageCostAdjustment
- java.lang.Object
-
- org.openbravo.costing.CostingAlgorithmAdjustmentImp
-
- org.openbravo.costing.AverageCostAdjustment
-
public class AverageCostAdjustment extends CostingAlgorithmAdjustmentImp
-
-
Field Summary
-
Fields inherited from class org.openbravo.costing.CostingAlgorithmAdjustmentImp
areBackdatedTrxFixed, checkNegativeStockCorrection, costCurPrecission, costDimensionIds, isManufacturingProduct, nextLineNo, startingDate, stdCurPrecission, strClientId, strCostAdjId, strCostAdjLineId, strCostCurrencyId, strCostingRuleId, strCostOrgId, strTransactionId, trxType
-
-
Constructor Summary
Constructors Constructor Description AverageCostAdjustment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateBackdatedTrxAdjustment(CostAdjustmentLine costAdjLine)
protected void
calculateNegativeStockCorrectionAdjustmentAmount(CostAdjustmentLine costAdjLine)
protected static Costing
getAvgCostOnMovementDate(MaterialTransaction trx, HashMap<CostingAlgorithm.CostDimension,BaseOBObject> costDimensions, Organization costOrg, boolean areBackdatedTrxFixed)
Calculates the average cost value of the transaction.protected BigDecimal
getDefaultCostDifference(CostingServer.TrxType calTrxType, CostAdjustmentLine costAdjLine)
protected BigDecimal
getOutgoingBackdatedTrxAdjAmt(CostAdjustmentLine costAdjLine)
protected void
getRelatedTransactionsByAlgorithm()
protected void
init(CostAdjustmentLine costAdjLine)
Initializes class variables to perform the cost adjustment process.-
Methods inherited from class org.openbravo.costing.CostingAlgorithmAdjustmentImp
addCostDependingTrx, getCostAdj, getCostAdjLine, getCostCurrency, getCostDimensions, getCostingRule, getCostOrg, getTransaction, insertCostAdjustmentLine, insertCostAdjustmentLine, insertCostAdjustmentLine, searchBOMProducts, searchIntMovementTo, searchManufacturingProduced, searchOpeningInventory, searchRelatedTransactionCosts, searchReturnShipments, searchVoidInOut, searchVoidInternalConsumption
-
-
-
-
Method Detail
-
init
protected void init(CostAdjustmentLine costAdjLine)
Description copied from class:CostingAlgorithmAdjustmentImp
Initializes class variables to perform the cost adjustment process. Variables are stored by the ids instead of the BaseOBObject to be safe of session clearing.- Overrides:
init
in classCostingAlgorithmAdjustmentImp
- Parameters:
costAdjLine
- The Cost Adjustment Line that it is processed.
-
getRelatedTransactionsByAlgorithm
protected void getRelatedTransactionsByAlgorithm()
- Specified by:
getRelatedTransactionsByAlgorithm
in classCostingAlgorithmAdjustmentImp
-
calculateBackdatedTrxAdjustment
protected void calculateBackdatedTrxAdjustment(CostAdjustmentLine costAdjLine)
- Overrides:
calculateBackdatedTrxAdjustment
in classCostingAlgorithmAdjustmentImp
-
getOutgoingBackdatedTrxAdjAmt
protected BigDecimal getOutgoingBackdatedTrxAdjAmt(CostAdjustmentLine costAdjLine)
- Specified by:
getOutgoingBackdatedTrxAdjAmt
in classCostingAlgorithmAdjustmentImp
-
getDefaultCostDifference
protected BigDecimal getDefaultCostDifference(CostingServer.TrxType calTrxType, CostAdjustmentLine costAdjLine)
- Overrides:
getDefaultCostDifference
in classCostingAlgorithmAdjustmentImp
-
calculateNegativeStockCorrectionAdjustmentAmount
protected void calculateNegativeStockCorrectionAdjustmentAmount(CostAdjustmentLine costAdjLine)
- Specified by:
calculateNegativeStockCorrectionAdjustmentAmount
in classCostingAlgorithmAdjustmentImp
-
getAvgCostOnMovementDate
protected static Costing getAvgCostOnMovementDate(MaterialTransaction trx, HashMap<CostingAlgorithm.CostDimension,BaseOBObject> costDimensions, Organization costOrg, boolean areBackdatedTrxFixed)
Calculates the average cost value of the transaction.
-
-