Package org.openbravo.costing
Class CostingAlgorithmAdjustmentImp
- java.lang.Object
-
- org.openbravo.costing.CostingAlgorithmAdjustmentImp
-
- Direct Known Subclasses:
AverageCostAdjustment
,StandardCostAdjustment
@Dependent public abstract class CostingAlgorithmAdjustmentImp extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
areBackdatedTrxFixed
protected boolean
checkNegativeStockCorrection
protected int
costCurPrecission
protected HashMap<CostingAlgorithm.CostDimension,String>
costDimensionIds
protected boolean
isManufacturingProduct
protected Long
nextLineNo
protected Date
startingDate
protected int
stdCurPrecission
protected String
strClientId
protected String
strCostAdjId
protected String
strCostAdjLineId
protected String
strCostCurrencyId
protected String
strCostingRuleId
protected String
strCostOrgId
protected String
strTransactionId
protected CostingServer.TrxType
trxType
-
Constructor Summary
Constructors Constructor Description CostingAlgorithmAdjustmentImp()
-
Method Summary
-
-
-
Field Detail
-
strCostAdjLineId
protected String strCostAdjLineId
-
strCostAdjId
protected String strCostAdjId
-
strTransactionId
protected String strTransactionId
-
strCostOrgId
protected String strCostOrgId
-
strCostCurrencyId
protected String strCostCurrencyId
-
costCurPrecission
protected int costCurPrecission
-
stdCurPrecission
protected int stdCurPrecission
-
trxType
protected CostingServer.TrxType trxType
-
strCostingRuleId
protected String strCostingRuleId
-
startingDate
protected Date startingDate
-
strClientId
protected String strClientId
-
isManufacturingProduct
protected boolean isManufacturingProduct
-
areBackdatedTrxFixed
protected boolean areBackdatedTrxFixed
-
checkNegativeStockCorrection
protected boolean checkNegativeStockCorrection
-
nextLineNo
protected Long nextLineNo
-
costDimensionIds
protected HashMap<CostingAlgorithm.CostDimension,String> costDimensionIds
-
-
Method Detail
-
init
protected void init(CostAdjustmentLine costAdjLine)
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.- Parameters:
costAdjLine
- The Cost Adjustment Line that it is processed.
-
searchRelatedTransactionCosts
protected void searchRelatedTransactionCosts(CostAdjustmentLine costAdjLine)
Process to include in the Cost Adjustment the required lines of transactions whose cost needs to be adjusted as a consequence of other lines already included.
-
addCostDependingTrx
protected void addCostDependingTrx(CostAdjustmentLine costAdjLine)
-
insertCostAdjustmentLine
protected CostAdjustmentLine insertCostAdjustmentLine(CostAdjustmentLineParameters lineParameters)
-
insertCostAdjustmentLine
@Deprecated protected CostAdjustmentLine insertCostAdjustmentLine(MaterialTransaction trx, BigDecimal adjustmentamt, CostAdjustmentLine parentLine)
Deprecated.
-
insertCostAdjustmentLine
protected CostAdjustmentLine insertCostAdjustmentLine(CostAdjustmentLineParameters lineParameters, CostAdjustmentLine parentLine)
Inserts a new cost adjustment line- Parameters:
parentLine
- Cost Adjustment Line
-
searchOpeningInventory
protected void searchOpeningInventory(CostAdjustmentLine costAdjLine)
When the cost of a Closing Inventory is adjusted it is needed to adjust with the same amount the related Opening Inventory.
-
searchManufacturingProduced
protected void searchManufacturingProduced(CostAdjustmentLine costAdjLine)
-
searchBOMProducts
protected void searchBOMProducts(CostAdjustmentLine costAdjLine)
-
searchVoidInternalConsumption
protected void searchVoidInternalConsumption(CostAdjustmentLine costAdjLine)
-
searchIntMovementTo
protected void searchIntMovementTo(CostAdjustmentLine costAdjLine)
-
searchVoidInOut
protected void searchVoidInOut(CostAdjustmentLine costAdjLine)
-
searchReturnShipments
protected void searchReturnShipments(CostAdjustmentLine costAdjLine)
-
calculateNegativeStockCorrectionAdjustmentAmount
protected abstract void calculateNegativeStockCorrectionAdjustmentAmount(CostAdjustmentLine costAdjLine)
-
getRelatedTransactionsByAlgorithm
protected abstract void getRelatedTransactionsByAlgorithm()
-
calculateBackdatedTrxAdjustment
protected void calculateBackdatedTrxAdjustment(CostAdjustmentLine costAdjLine)
-
getOutgoingBackdatedTrxAdjAmt
protected abstract BigDecimal getOutgoingBackdatedTrxAdjAmt(CostAdjustmentLine costAdjLine)
-
getDefaultCostDifference
protected BigDecimal getDefaultCostDifference(CostingServer.TrxType calTrxType, CostAdjustmentLine costAdjLine)
-
getCostAdjLine
public CostAdjustmentLine getCostAdjLine()
-
getCostAdj
public CostAdjustment getCostAdj()
-
getTransaction
public MaterialTransaction getTransaction()
-
getCostOrg
public Organization getCostOrg()
-
getCostCurrency
public Currency getCostCurrency()
-
getCostingRule
public CostingRule getCostingRule()
-
getCostDimensions
public HashMap<CostingAlgorithm.CostDimension,BaseOBObject> getCostDimensions()
-
-