Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012997
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 05. Production managementminorhave not tried2010-04-15 09:492010-05-18 21:44
ReporternetworkbView Statuspublic 
Assigned Tosivaraman 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision9745eaee4d2a
ProjectionnoneETAnoneTarget Version2.50MP17
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP14SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012997: The callout associated to the Process Quantity field on the work requirement header should not round the quantity

DescriptionThe 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 Reproducesee the file attached to know how to configure the process plan to get this error.
TagsNo tags attached.
Attached Filesdoc file icon stepts_to_reproduct.doc [^] (949,760 bytes) 2010-04-15 09:49

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0026997)
adrianromero (manager)
2010-05-06 17:20

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
(0027045)
adrianromero (manager)
2010-05-07 12:44

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 (developer)
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
---
(0027083)
sivaraman (reporter)
2010-05-10 07:53

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.
(0027101)
adrianromero (manager)
2010-05-10 13:59

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 := .....
(0027235)
sureshbabu (reporter)
2010-05-14 12:13

@ siva can you update the steps to reproduce
(0027240)
sureshbabu (reporter)
2010-05-14 12:36

i am closing the issue, since the process needs to be whole number
(0027506)
hudsonbot (developer)
2010-05-18 21:44

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/9745eaee4d2a [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker