Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012308 | Openbravo ERP | 06. Material requirement planning (MRP) | public | 2010-02-16 19:16 | 2010-05-18 12:12 |
|
Reporter | mensenjh | |
Assigned To | harikrishnan | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | Community Appliance |
Product Version | 2.50MP11 | |
Target Version | 2.50MP17 | Fixed in Version | 2.50MP15 | |
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 !!!
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | defect | 0011268 | 2.50MP17 | closed | adrianromero | MRP: Purchasing plan is showing unexplainable negative quantities for Purchase Order lines that were already received |
|
Attached Files | MRP_ClosedOrders.odt (89,957) 2010-02-16 19:16 https://issues.openbravo.com/file_download.php?file_id=2226&type=bug |
|
Issue History |
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 |
Notes |
|
|
|
|
|
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.
|
|
|
|
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 |
|
|
|
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
|
2010-03-13 05:56
|
|
|
|
|
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. |
|
|
|
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. |
|
|
|
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'. |
|
|
|
|
|
|
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? |
|
|
|
|
|
|
Checked on the nightly (pgsql) build with product beer. Everything A-OK. Thanks. |
|
|
|
|