Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0012308 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 06. Material requirement planning (MRP) | major | always | 2010-02-16 19:16 | 2010-05-18 12:12 | |||
Reporter | mensenjh | View Status | public | |||||
Assigned To | harikrishnan | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 2.50MP15 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 00600b268925 | ||||
Projection | none | ETA | none | Target Version | 2.50MP17 | |||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | 2.50MP11 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0012308: Closed Purchase Orders in Purchasing Plan | |||||||
Description | 1) Closed Purchase Orders are included in the Purchasing Plan with a negative qty after completing purchase invoice. 2) Even though closed orders are included in the plan, the new suggested purchase quantity does not make sense. | |||||||
Steps To Reproduce | 1. Create procurement/sales material suitable for procurement planning. 2. Create sales order for material. 3. Create purchase plan and create purchase order 4. Create purchase plan: there is pending purchase order 5. Receive purchase order 6. Create purchase plan: there is no pending purchase order 7. Create purchase invoice: do not complete 8. Create purchase plan: there is no pending purchase order 9. Complete previous invoice 10. Create purchase plan: there is 1 pending purchase order with negative qty for previous purchase !!! | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0024490) adrianromero (viewer) 2010-02-17 13:39 |
Modified the severity and priority to follow the bug reporting guidelines: http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^] |
(0025066) adrianromero (viewer) 2010-03-04 19:20 |
Hello We are trying to reproduce this issue but we need a explanations in detail of the steps required to reproduce it. Please, could you provide it. |
(0025077) mensenjh (viewer) 2010-03-05 11:53 |
See trasnaction details below. I'm expecting knowledge on how to go through transactions and how to set up a material for planning. 1. Create procurement/sales material suitable for procurement planning. Master Data Management || Product || Product make sure set up for procurement and sales in header tab Planning method in tab Org specific that includes MRP, Pending sales order, Pending Purchase Order 2. Create sales order for material. Sales Management || Transactions || Sales Order || Header 3. Create purchase plan and create purchase order Material Requirement (MRP) || Transactions || Purchasing Plan || Header (& Line) 4. Create purchase plan: there is pending purchase order See step 3 5. Receive purchase order Procurement Management || Transactions || Pending Goods Receipts || Pending Goods Receipts 6. Create purchase plan: there is no pending purchase order See step 3 7. Create purchase invoice: do not complete Procurement Management || Transactions || Purchase Invoice || Header 8. Create purchase plan: there is no pending purchase order See step 3 9. Complete previous invoice See step 7 > Press complete 10. Create purchase plan: there is 1 pending purchase order with negative qty for previous purchase !!! This order is ctually already received but is displayed anyway and planning results are incorrect. See step 3 |
(0025190) adrianromero (viewer) 2010-03-09 18:40 |
There are instructions to setup MRP in the following document http://wiki.openbravo.com/wiki/HOW_TO_MRP [^] The error is probably in the PL function MRP_RUN_INITIALIZE in the line starting by FOR Cur_OrderLine IN. The calculation to review in this line is (ol.QTYORDERED - COALESCE(ol.QTYDELIVERED, 0) - COALESCE(matchpo.qty,0)) AS qty |
(0025437) hgbot (developer) 2010-03-13 05:56 |
Repository: erp/devel/pi Changeset: 00600b268925e20657afec9148d19cc414e8cd28 Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com> Date: Sat Mar 13 10:31:41 2010 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/00600b268925e20657afec9148d19cc414e8cd28 [^] Fixes Issue 12308: Closed Purchase Orders in Purchasing Plan. --- M src-db/database/model/functions/MRP_RUN_INITIALIZE.xml --- |
(0025438) harikrishnan (viewer) 2010-03-13 06:57 |
Steps to test: # Create a Planner (Material Requirement (MRP) || Setup || Planner || Planner ) with the following data: 1. Name: Test Planner # Create a new Planning Method (Material Requirement (MRP) || Setup || Planning Method || Planning Method) with the following data: 1. Name: Test Planning Method 2. Lines: Pending Sales Orders with Days to End = 30 and Weighting = 1 3. Lines: Material Requirement with Days to End = 30 and Weighting = 1 4. Lines: Pending Purchase Orders with Days to End = 30 and Weighting = 1 #Create a new product(Master Data Management || Product || Product ) Product: *Name : Test Product *Dont select the production check box,Select only the sales and purchase. Purchasing (Master Data Management || Product || Product >> Purchasing ) Business Partner = Edison Min. Quantity Order = 4 Purchasing Lead Time = 5 Org Specific (Master Data Management || Product || Product >> Org Specific ) Organization = Main; Planning Method = Test Planning Method Planner = Test Planner Safety Stock = 12 Price (Master Data Management || Product || Product >> Price ). 1.Price List Version : Purchase 2006;List Price:100;Standard Price :75;Price Limit:70 2.Price List Version : Sales 2006;List Price:110;Standard Price :90;Price Limit:80 #Create a new standard sales order. Header (Sales Management || Transactions || Sales Order || Header ) Business Partner : McGiver Supplies Transaction Document :Standard Order Order Date : take any date further (eg:30/03/2010) Lines (Sales Management || Transactions || Sales Order || Header >> Lines ) Product : Test Product Complete the order #Create a new purchasing plan. Header (Material Requirement (MRP) || Transactions || Purchasing Plan || Header ) Time Horizon:60 Safety Lead Time : 1 Product : Test Product Select blank to this fields :Product Category ,Business Partner Category Click the button "Process Purchase Plan". The lines are generated,with pending sales order and since their is no stock it ll suggest to create a purchase order. #Create a new purchase order Header (Procurement Management || Transactions || Purchase Order || Header ) Business partner : McGiver Supplies Lines (Procurement Management || Transactions || Purchase Order || Header >> Lines ) Product : Test Product Ordered Quantity : 10 REPEATED PHASE : Now go to Purchasing plan and delete all the lines.Then again run the purchasing plan. #Now you can notice the pending purchase order. #Now create a goods receipt for the above purchase order. #REPEATED PHASE #Now you can notice the pending purchase order will be removed. #Create a purchase invoice for the above receipt. #REPEATED PHASE #Now the negative quantity wont appear. |
(0025440) mensenjh (viewer) 2010-03-13 18:42 |
I added the corrected code manually and did ant compile.complete. I did the test but do not see the fix. What is missing in the note from harikrishnan is the step to complete the invoice. Now it seems it is only created. When I compelte the invoice I still see the pending order in the purchasing plan. Assuming I took the right steps to incorporate the fix manually, it is not yet fixed. |
(0025458) gorkaion (viewer) 2010-03-15 11:06 |
where did you correct the code. If you have changed the xml file you have to run 'ant update.database' to apply the fix in the database. If you have changed something in core you should do before an 'ant export.database'. |
(0025520) hudsonbot (viewer) 2010-03-16 08:41 |
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/00600b268925 [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/3e52c5b52d67 [^] Tests: http://builds.openbravo.com/view/devel-int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16713.obx [^] |
(0025537) mensenjh (viewer) 2010-03-16 13:02 |
I changed the xml file and now did ant update.database with force enabled. Now when I run procurement plan I get the error: cache lookup failed for function 34650 (see attchment). Did I corrupt my database or is this related to the fix? |
(0025955) adrianromero (viewer) 2010-04-07 17:58 |
Hello. Could you please test the same path to reproduce this error in our nigthly builds enviroment? http://live.builds.openbravo.com/erp_devel_pi-full-oracle [^] http://live.builds.openbravo.com/erp_devel_pi-full-pgsql [^] This way we can differenciate whether the issue you get is an issue related to the fix or related to your environment. Thanks. |
(0026059) mensenjh (viewer) 2010-04-12 10:34 |
Checked on the nightly (pgsql) build with product beer. Everything A-OK. Thanks. |
(0026324) sureshbabu (viewer) 2010-04-16 18:49 |
Tested working fine |
![]() |
|||
Date Modified | Username | Field | Change |
2010-02-16 19:16 | mensenjh | New Issue | |
2010-02-16 19:16 | mensenjh | Assigned To | => adrianromero |
2010-02-16 19:16 | mensenjh | File Added: MRP_ClosedOrders.odt | |
2010-02-16 19:17 | mensenjh | Issue Monitored: mensenjh | |
2010-02-17 13:39 | adrianromero | OBNetwork customer | => No |
2010-02-17 13:39 | adrianromero | Note Added: 0024490 | |
2010-02-17 13:39 | adrianromero | Priority | immediate => normal |
2010-02-17 13:39 | adrianromero | Severity | critical => minor |
2010-02-17 21:22 | pjuvara | Priority | normal => high |
2010-02-17 21:22 | pjuvara | Severity | minor => major |
2010-02-18 09:47 | adrianromero | Status | new => scheduled |
2010-02-18 09:47 | adrianromero | fix_in_branch | => pi |
2010-02-18 09:47 | adrianromero | Target Version | => 2.50MP14 |
2010-02-18 09:47 | adrianromero | fix_in_branch | pi => |
2010-03-02 04:25 | eintelau | Issue Monitored: eintelau | |
2010-03-04 19:20 | adrianromero | Note Added: 0025066 | |
2010-03-04 19:20 | adrianromero | Status | scheduled => feedback |
2010-03-05 11:53 | mensenjh | Note Added: 0025077 | |
2010-03-08 16:05 | jpabloae | Target Version | 2.50MP14 => 2.50MP15 |
2010-03-09 18:40 | adrianromero | Note Added: 0025190 | |
2010-03-13 05:54 | harikrishnan | Assigned To | adrianromero => harikrishnan |
2010-03-13 05:56 | hgbot | Checkin | |
2010-03-13 05:56 | hgbot | Note Added: 0025437 | |
2010-03-13 05:56 | hgbot | Status | feedback => resolved |
2010-03-13 05:56 | hgbot | Resolution | open => fixed |
2010-03-13 05:56 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/00600b268925e20657afec9148d19cc414e8cd28 [^] |
2010-03-13 06:57 | harikrishnan | Note Added: 0025438 | |
2010-03-13 18:42 | mensenjh | Note Added: 0025440 | |
2010-03-15 11:06 | gorkaion | Note Added: 0025458 | |
2010-03-16 08:41 | hudsonbot | Checkin | |
2010-03-16 08:41 | hudsonbot | Note Added: 0025520 | |
2010-03-16 10:25 | rafaroda | Issue Monitored: rafaroda | |
2010-03-16 13:02 | mensenjh | Note Added: 0025537 | |
2010-04-07 16:28 | pjuvara | Issue Monitored: pjuvara | |
2010-04-07 17:58 | adrianromero | Note Added: 0025955 | |
2010-04-12 10:34 | mensenjh | Note Added: 0026059 | |
2010-04-16 18:49 | sureshbabu | Note Added: 0026324 | |
2010-04-16 18:49 | sureshbabu | Status | resolved => closed |
2010-04-16 18:49 | sureshbabu | Fixed in Version | => 2.50MP15 |
2010-04-17 00:00 | anonymous | sf_bug_id | 0 => 2988596 |
2010-04-26 18:49 | adrianromero | Relationship added | has duplicate 0011268 |
2010-05-18 12:12 | gorka_gil | Target Version | 2.50MP15 => 2.50MP17 |
Copyright © 2000 - 2009 MantisBT Group |