Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0055836Openbravo ERP09. Financial managementpublic2024-06-25 13:262024-07-23 09:25
sdossantos 
aferraz 
highmajorunable to reproduce
closedno change required 
5
PR22Q2 
 
aferraz
Core
No
0055836: Processing order of cost adjustment lines
In the case of the price adjustment, the Cost Adjustment will be generated with the 2 lines of the good shipment that have the same transaction process date. So the process is going to take them according to line no. It will depend on the order in which they have been generated, whether they are taken in the same order in which they must be processed, taking into account whether the backdated ones are active, in that case they would have to be sorted first by movement date.

When a landed cost is processed, the lines are ordered as follows:
    critLines.addOrder(Order.asc("trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE));

    critLines.addOrder(Order.asc("ca." + CostAdjustment.PROPERTY_DOCUMENTNO));

    critLines.addOrder(Order.asc(CostAdjustmentLine.PROPERTY_LINENO));

    critLines.addOrder(Order.asc(CostAdjustmentLine.PROPERTY_ADJUSTMENTAMOUNT));

    critLines.addOrder(Order.asc("trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE));


By:
1. trxProcessData: OK
2 document no: (they should all have the same because it is filtered by cost adjustment id)
3. line not ok
4. adjustment amount (there should be no line not equal)
5. movement date (??)
Fix: they should be ordered by the same parameters as the transactions. And if you have 2 cost adjustment lines for the same transaction then order by line no.
No tags attached.
related to defect 0055837 closed aferraz Incorrect accumulated values ​​in CostAdjustmentUtils.getStockOnTransactionDat 
Issue History
2024-06-25 13:26sdossantosNew Issue
2024-06-25 13:26sdossantosAssigned To => Triage Omni OMS
2024-06-25 13:26sdossantosModules => Core
2024-06-25 13:26sdossantosTriggers an Emergency Pack => No
2024-06-25 13:51frank_gonzalezNote Added: 0166307
2024-06-25 13:56PracticsIssue Monitored: Practics
2024-07-05 08:49aferrazRelationship addedrelated to 0055837
2024-07-05 08:49aferrazAssigned ToTriage Omni OMS => igor_trebol
2024-07-05 10:34hgbotNote Added: 0166709
2024-07-12 10:04aferrazAssigned Toigor_trebol => aferraz
2024-07-18 14:56aferrazReview Assigned To => aferraz
2024-07-18 14:56aferrazNote Added: 0167134
2024-07-18 14:56aferrazStatusnew => closed
2024-07-18 14:56aferrazResolutionopen => no change required
2024-07-23 09:25hgbotNote Added: 0167253

Notes
(0166307)
frank_gonzalez   
2024-06-25 13:51   
Jira: https://openbravo.atlassian.net/browse/RM-14958 [^]
(0166709)
hgbot   
2024-07-05 10:34   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1294 [^]
(0167134)
aferraz   
2024-07-18 14:56   
The problem raised by the customer is reported and fixed in 0055837
(0167253)
hgbot   
2024-07-23 09:25   
Merge request closed: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1294 [^]