Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012997 | Openbravo ERP | 05. Production management | public | 2010-04-15 09:49 | 2010-05-18 21:44 |
|
Reporter | networkb | |
Assigned To | sivaraman | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 2.50MP14 | |
Target Version | 2.50MP17 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0012997: The callout associated to the Process Quantity field on the work requirement header should not round the quantity |
Description | The callout associated to the Process Quantity field on the work requirement header should not round the quantity.
The quantity is rounded when it should be rounded if the product is defined
in the "Org specific" tab as exact.
This behaviour is correct in MRP but not in the workrequirement window. |
Steps To Reproduce | see the file attached to know how to configure the process plan to get this error. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | stepts_to_reproduct.doc (949,760) 2010-04-15 09:49 https://issues.openbravo.com/file_download.php?file_id=2443&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2010-04-15 09:49 | networkb | New Issue | |
2010-04-15 09:49 | networkb | Assigned To | => adrianromero |
2010-04-15 09:49 | networkb | File Added: stepts_to_reproduct.doc | |
2010-04-15 09:49 | networkb | OBNetwork customer | => Yes |
2010-04-15 11:23 | adrianromero | Status | new => scheduled |
2010-04-15 11:23 | adrianromero | fix_in_branch | => pi |
2010-05-06 17:20 | adrianromero | Note Added: 0026997 | |
2010-05-07 12:44 | adrianromero | Note Added: 0027045 | |
2010-05-10 07:22 | sivaraman | Assigned To | adrianromero => sivaraman |
2010-05-10 07:29 | hgbot | Checkin | |
2010-05-10 07:29 | hgbot | Note Added: 0027082 | |
2010-05-10 07:29 | hgbot | Status | scheduled => resolved |
2010-05-10 07:29 | hgbot | Resolution | open => fixed |
2010-05-10 07:29 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/9745eaee4d2af985749e2cc927c863c303de47b9 [^] |
2010-05-10 07:53 | sivaraman | Note Added: 0027083 | |
2010-05-10 13:59 | adrianromero | Note Added: 0027101 | |
2010-05-11 18:19 | jpabloae | Target Version | 2.50MP16 => 2.50MP17 |
2010-05-14 12:13 | sureshbabu | Note Added: 0027235 | |
2010-05-14 12:36 | sureshbabu | Note Added: 0027240 | |
2010-05-14 12:36 | sureshbabu | Status | resolved => closed |
2010-05-15 00:00 | anonymous | sf_bug_id | 0 => 3001854 |
2010-05-18 21:44 | hudsonbot | Checkin | |
2010-05-18 21:44 | hudsonbot | Note Added: 0027506 | |
Notes |
|
|
The callout associated is:org.openbravo.erpCommon.ad_callouts.SL_WorkRequirement_Conversion
Here you can see that the quantity is always rounded:
quantity = secondaryQty.divide(convRate, 0, BigDecimal.ROUND_HALF_UP);
It should be rounded only if the associated product is defined in the "Org specific" tab as exact. Otherwise it should not be rounded
In any case, the solution must be discussed with GDA |
|
|
|
In this specific case, the quantity must be always rounded to the next positive integer because the number of processes cannot be decimal.
So the rounding to use must be:
quantity = secondaryQty.divide(convRate, 0, BigDecimal.ROUND_CEILING ); |
|
|
(0027082)
|
hgbot
|
2010-05-10 07:29
|
|
Repository: erp/devel/pi
Changeset: 9745eaee4d2af985749e2cc927c863c303de47b9
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Mon May 10 10:58:26 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/9745eaee4d2af985749e2cc927c863c303de47b9 [^]
Fixes issue 12997: The Process Quantity callout should not round the quantity in work requirement window
---
M src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Conversion.java
---
|
|
|
|
Steps to test:
Kindly follow all the steps as given in the 'Steps To Reproduce' section
Root cause and solution:
As the quantity cannot be decimal in this case, it has been rounded to the next positive integer in it's corresponding callout class (SL_WorkRequirement_Conversion).
Impact:
It has been verified that the fix meets the expected result as described by adrian without any other impact. |
|
|
|
To perform the same rounding in the MRP process the following steps have to be done to fix it properly:
There will be needed to modify the PL/SQL MRP_PROCESSPLAN_PLAN.
There is needed to modify the SQL query of the cursor Cur_Lines adding the view MA_PROCESSPLAN_TOTALIZED and joining using M_PRODUCT.MA_PROCESSPLAN_ID = MA_PROCESSPLAN_TOTALIZED.MA_PROCESSPLAN_ID AND M_PRODUCT.M_PRODUCT_ID = MA_PROCESSPLAN_TOTALIZED.PRODUCED
This way you get the value PRODQTY and you can round the new quantity this way:
v_Qty_new := CEIL(v_qty_new/Cur_Lines.proqty)*Cur_Lines.proqty
Before the line
v_plannedorderdate_new := ..... |
|
|
|
@ siva can you update the steps to reproduce |
|
|
|
i am closing the issue, since the process needs to be whole number |
|
|
|
|