Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025837Openbravo ERP05. Production managementpublic2014-02-25 22:252014-03-12 14:59
chelipf 
dmiguelez 
lowtrivialalways
newopen 
30Debian Wheezy
2.50MP51 
 
Mozilla Firefox
Core
No
0025837: Generate production costs is not calculated properly
The order in which Openbravo computes the production cost is wrong. It is based on 2.40 version and below when primary key was an autonumeric type.
Execute generate production cost process.
Check out the attached patch.
No tags attached.
diff MA_PRODUCTION_COST_GENERATE.diff (772) 2014-02-25 22:25
https://issues.openbravo.com/file_download.php?file_id=6719&type=bug
Issue History
2014-02-25 22:25chelipfNew Issue
2014-02-25 22:25chelipfAssigned To => dmiguelez
2014-02-25 22:25chelipfFile Added: MA_PRODUCTION_COST_GENERATE.diff
2014-02-25 22:25chelipfWeb browser => Mozilla Firefox
2014-02-25 22:25chelipfModules => Core
2014-02-25 22:25chelipfTriggers an Emergency Pack => No
2014-03-12 10:16dmiguelezWeb browserMozilla Firefox => Mozilla Firefox
2014-03-12 10:16dmiguelezNote Added: 0065089
2014-03-12 10:16dmiguelezPriorityhigh => low
2014-03-12 10:16dmiguelezSeveritycritical => trivial
2014-03-12 14:59chelipfNote Added: 0065097

Notes
(0065089)
dmiguelez   
2014-03-12 10:16   
Dear Partner,

We appreciate your contribution by reporting an Issue and also by giving the solution to it, and we will include it in our Product as soon as we can.

But we've changed the severity status of the Issue from critical to trivial and the priority from high to low, and this is the reason why.

Although what you report is an Issue, and we will fix it, it is a minor Issue. It is true that using the Id column to order the data is not the best option, since it is an auto generated value and it is random.
But, please realize that we first order the query by movement date. And that is the only important column to order the query by.
The reason we also order by another column is that, if two records have the same movement date, it is not important which one comes first, but is important that they always return in the same order, no matter how many time the query is executed, that is why we added an additional column to the order clause, to maintain consistency.
As you report, this is not the best option due to the random nature of the id, and we will fix it with the document number as you propose. But, also keep in mind that the id is generated once when the record is inserted, so in with the same set of data, you will get the same order of records for the query all the times.

Thanks you four your contribution.
Regards.
(0065097)
chelipf   
2014-03-12 14:59   
Hi dminguelez, you are right in the context where you have not accounting process for goods receipt and goods shipments (m_inout) that is the case of Spain, but when you must post that kind of documents (the case of Ecuador), if yo don't use this fix and this other one[1] the accounting and the module data don't match. That's the reason why I set the priority to high and the severity to critical.


Thanks

[1]https://issues.openbravo.com/view.php?id=25717 [^]