Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034805Openbravo ERP03. Procurement managementpublic2016-12-22 09:412017-05-29 17:43
psanjuan 
collazoandy4 
urgentmajoralways
closedfixed 
20Community Appliance
 
3.0PR17Q3 
aferraz
Core
No
0034805: Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered)
Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered)
Enable "Enable UOM Management" preference.

Go to Unit of Measure window and create a new UOM with below setup:
Edi Code = PA
Name = Pallet
Standard Precision = 2

Go to Product window and create a new one for F&B España with below setup:
Search key = Product 1
Name = Product 1
Go to price tab and select "Tarifa Bebidas Alegres" business partner.
Enter a unit price and a list price.
Go to Alternate UOM.
Enter Pallet, Conversion Rate = 10, Sales = Purchase = Primary. Logistics = Not applicable.
Save it.

Go to purchase order window and create one order for F&B España, Bebidas Alegres business partner, dated on today's date.
Go to lines and select Product 1.
Enter 55 in the field Operative Quantity.
Book the order
Close the order and verify that Ordered quantity changes to 0 Unit.

Run Purchase Order Report for Bebidas Alegres business partner and for today's date, in HTML.

Verify that close purchase order is shown as Qty IN AUM remains as 55 and that should not be the case.

Same applies in the case of a Sales order including a product having an alternative UOM. Same way if that sales order is not delivered but closed "Operative Quanity" does not change to 0

Same applies to:
Return to Vendor
Return from Customer
If a not delivered order is closed same way that Ordered/Returm Quantity field is changed to 0, Operative Quantity should also be changed to 0.
No tags attached.
depends on backport 00356923.0PR17Q2 closed collazoandy4 Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered) 
depends on backport 00356933.0PR17Q1.1 closed collazoandy4 Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered) 
related to defect 0035697 closed collazoandy4 Return qty not properly updated in a return to vendor partially delivered 
related to defect 0034784 closed collazoandy4 Return Material Receipt is not properly managing Pending and Receiving quanitties if Alternative UOM is used 
Issue History
2016-12-22 09:41psanjuanNew Issue
2016-12-22 09:41psanjuanAssigned To => Triage Finance
2016-12-22 09:41psanjuanModules => Core
2016-12-22 09:41psanjuanTriggers an Emergency Pack => No
2016-12-22 09:44psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14104#r14104
2016-12-22 09:49psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14105#r14105
2016-12-22 09:55psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14106#r14106
2016-12-22 09:55psanjuanProposed Solution updated
2016-12-22 09:57psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14107#r14107
2016-12-22 10:07psanjuanSummarySome reports info is not correct if an order including a product with an alternative UOM is closed => Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered)
2016-12-22 10:07psanjuanDescription Updatedbug_revision_view_page.php?rev_id=14109#r14109
2016-12-22 10:07psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14110#r14110
2016-12-22 10:07psanjuanProposed Solution updated
2016-12-22 18:05markmm82Assigned ToTriage Finance => rqueralta
2016-12-23 16:26nonofranciscoAssigned Torqueralta => nonofrancisco
2016-12-23 16:29nonofranciscoStatusnew => scheduled
2016-12-23 21:18nonofranciscoNote Added: 0092990
2017-01-03 10:06psanjuanNote Added: 0093116
2017-01-03 10:07psanjuanNote Edited: 0092990bug_revision_view_page.php?bugnote_id=0092990#r14171
2017-01-03 10:09psanjuanNote Edited: 0093116bug_revision_view_page.php?bugnote_id=0093116#r14173
2017-01-03 10:11psanjuanNote Added: 0093117
2017-01-03 10:12psanjuanNote Edited: 0093116bug_revision_view_page.php?bugnote_id=0093116#r14174
2017-01-03 10:13psanjuanNote Edited: 0093117bug_revision_view_page.php?bugnote_id=0093117#r14176
2017-01-03 10:20psanjuanNote Added: 0093118
2017-01-03 10:26psanjuanNote Edited: 0093118bug_revision_view_page.php?bugnote_id=0093118#r14178
2017-01-03 10:28psanjuanNote Edited: 0093118bug_revision_view_page.php?bugnote_id=0093118#r14179
2017-01-03 10:34psanjuanNote Added: 0093119
2017-01-03 10:50psanjuanNote Edited: 0093118bug_revision_view_page.php?bugnote_id=0093118#r14180
2017-01-03 12:29psanjuanNote Edited: 0093118bug_revision_view_page.php?bugnote_id=0093118#r14192
2017-01-03 12:30psanjuanNote Edited: 0093118bug_revision_view_page.php?bugnote_id=0093118#r14193
2017-01-03 12:36psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14195
2017-01-03 14:03psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14200
2017-01-04 11:51psanjuanNote Added: 0093168
2017-01-27 12:32psanjuanRelationship addedrelated to 0034784
2017-01-27 12:32psanjuanNote Added: 0093882
2017-01-27 12:34psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14353
2017-01-27 12:42psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14354
2017-01-27 12:45psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14355
2017-01-27 12:46psanjuanNote Edited: 0093119bug_revision_view_page.php?bugnote_id=0093119#r14356
2017-01-27 12:46psanjuanNote Edited: 0093882bug_revision_view_page.php?bugnote_id=0093882#r14358
2017-01-27 12:47psanjuanNote Added: 0093883
2017-03-30 18:04aferrazRelationship deletedrelated to 0034784
2017-03-30 18:04aferrazRelationship addeddepends on 0034784
2017-03-31 20:32collazoandy4Assigned Tononofrancisco => collazoandy4
2017-04-04 17:24aferrazStatusscheduled => feedback
2017-04-04 17:25aferrazStatusfeedback => scheduled
2017-04-04 19:11hgbotCheckin
2017-04-04 19:11hgbotNote Added: 0095828
2017-04-04 19:11hgbotStatusscheduled => resolved
2017-04-04 19:11hgbotResolutionopen => fixed
2017-04-04 19:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bd98803e01b5a17761d568dfcaafdc2d52d6dad8 [^]
2017-04-04 19:13aferrazReview Assigned To => aferraz
2017-04-04 19:13aferrazNote Added: 0095830
2017-04-04 19:13aferrazStatusresolved => closed
2017-04-04 19:13aferrazFixed in Version => 3.0PR17Q3
2017-04-04 21:01collazoandy4Relationship addedrelated to 0035697
2017-04-06 19:57aferrazRelationship deleteddepends on 0034784
2017-04-06 19:57aferrazRelationship addedrelated to 0034784
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096863

Notes
(0092990)
nonofrancisco   
2016-12-23 21:18   
(edited on: 2017-01-03 10:07)
Test Plan

1.- Enable "Enable UOM Management" preference at System level.

2.- Log as F&B International Group Admin
  Go to Unit of Measure window and create a new UOM with below setup:
  Edi Code = PA
  Name = Pallet
  Standard Precision = 2

3.- Go to Product window and create a new one for F&B España with below setup:
  Search key = Product 1
  Name = Product 1
  Go to price tab and select "Tarifa Bebidas Alegres" .
    Enter a unit price and a list price.
    Select also "Tarifa de ventas" and enter a unit price and a list price.
  Go to Alternate UOM.
    Enter Pallet, Conversion Rate = 10, Sales = Purchase = Primary. Logistics = Not applicable.
Save it.

4.- Go to purchase order window and create one order for F&B España, Bebidas Alegres business partner, dated on today's date.
  Go to lines and select Product 1.
    Enter 55 in the field Operative Quantity.
Book the order
Close the order
Verify that Ordered quantity = Operative Quantity = 0
Run Purchase Order Report for Bebidas Alegres business partner and for today's date, in HTML.
Verify that close purchase order is shown Ordered quantity = Operative Quantity = 0.

5.- Go to Goods Receipt window and create a new one for F&B España with below setup:
  BP: Bebidas Alegres, S.L.
  Go to the Lines tab and create a new one
    Product: Product 1
    Operative Quantity: 100
Complete de document

6.- Create a new Return To Vendor document for F&B España:
  BP: Bebidas Alegres, S.L.
  Add a line containing Product 1 with some quantity
Book the document
Close the document
Verify that Return = Operative Quantity = 0

7.- Create a new Sales Order for F&B España:
  BP: Alimentos y Supermercados, S.A
  Add a new Line
    Product: Product 1
    Operative Quantity: 10
Book the order

8.- Create a goods shipment based on the previous sales order.
9.- Create a new Return from Customer document for F&B España:
  BP: Alimentos y Supermercados, S.A
  Add a new line for Product 1 and some quantity
Book the document
Close the document
Verify that Returned quantity = Operative Quantity = 0.

(0093116)
psanjuan   
2017-01-03 10:06   
(edited on: 2017-01-03 10:12)
Test Case 1 - Purchase Order Close (not delivered)

Go to Product window and create a new one for F&B España with below setup:
Search key = Product 1
Name = Product 1
Go to price tab and select "Tarifa Bebidas Alegres" business partner.
Enter a unit price and a list price.
Go to Alternate UOM.
Enter Pallet, Conversion Rate = 10, Sales = Purchase = Primary. Logistics = Not applicable.
Save it.

Go to purchase order window and create one order for F&B España, Bebidas Alegres business partner, dated on today's date.
Go to lines and select Product 1.
Enter 55 in the field Operative Quantity.
Book the order
Close the order and verify that "Operative Quantity" and "Ordered quantity" change to 0 Unit.

Run Purchase Order Report for Bebidas Alegres business partner and for today's date, in HTML.

Verify that close purchase order shows Quantity = Qty in AUM = 0

Repeat same test case as above but this time receipt part of the order in a Goods Receipt. Close the order.
Verify that "Operative Quantity" (in AUM) and "Ordered Quantity" (In BUM) changes just to the quantity receipt.

(0093117)
psanjuan   
2017-01-03 10:11   
(edited on: 2017-01-03 10:13)
Test Case 2 - Sales Order Close (not delivered)

Go to sales order window and create one order for F&B España, Alimentos y supermercados business partner, dated on today's date.
Go to lines and select Product 1.
Enter 55 in the field Operative Quantity.
Book the order
Close the order and verify that "Operative Quantity" and "Ordered quantity" change to 0 Unit.

Run Sales Order Report for Alimentos y supermercados business partner and for today's date, in HTML.

Verify that close sales order shows Quantity = Quantity in AUM = 0

Repeat same test case as above but this time ship part of the order in a Goods Shipment. Close the order.
Verify that "Operative Quantity" (in AUM) and "Ordered Quantity" (In BUM) changes just to the quantity shipped.

(0093118)
psanjuan   
2017-01-03 10:20   
(edited on: 2017-01-03 12:30)
Test Case 3 - Return to Vendor Not delivered.

Go to Goods Receipt window and create a new one for F&B España with below setup:
BP: Bebidas Alegres, S.L.
Go to the Lines tab and create a new one
Product: Product 1
Operative Quantity: 50 (pallets)
Complete de document

Go to Return to Vendor window and create a new one for F&B España, Bebidas Alegres business partner. Click on Pick/Edit Lines.
Select the receipt just created showing 500 units and 50 pallets. Enter a Returned quantity = 10 (pallets), 100 units. Press Done.

Book the document.
Press Close.

Verify that Operative Quanity and Return are updated to 0.


Test Case 4 - Return to Vendor partially delivered.

Go to Return to Vendor window and create another new one for F&B España, Bebidas Alegres business partner. Click on Pick/Edit Lines.
Select the receipt just created showing 500 units and 50 pallets. Enter a Returned quantity = 10 (pallets), 100 units. Press Done.

Book the document. RTV Order 9

Go to Return to Vendor Shipment window and create a new one for F&B España, Bebidas Alegres Business partner. Click on Pick/Edit Lines.

Select the RM order just created, enter a ship Qty = 25. Press Done.

Verify that Operative Quantity = Movement Qty = 25
and Alternative UOM = UOM = Unit

Complete return to vendor shipment.

Go to back to Return to Vendor and close it.
Verify that Operative Quantity = 0 and Return = 0 but that is not correct.

Operative Quantity = 2.5 pallets.
Return = 25 (units)

Test Case 5 - Return to Vendor partially delivered. Returned UOM changed to Pallet

Go to Return to Vendor window and create another new one for F&B España, Bebidas Alegres business partner. Click on Pick/Edit Lines.
Select the receipt just created showing 500 units and 50 pallets. Enter a Returned quantity = 10 (pallets), 100 units. Press Done.

Book the document. RTV Order 10

Go to Return to Vendor Shipment window and create a new one for F&B España, Bebidas Alegres Business partner. Click on Pick/Edit Lines.

Select the RM order just created, enter a ship Qty = 1.5, and change Returned UOM to Pallet. Press Done.

Verify that Operative Quantity = 1.5
Alternative UOM = Pallet
Movement Qty = 15
UOM = Unit

Complete return to vendor shipment.

Go to back to Return to Vendor and close it.
Verify that Operative Quantity = 0 and Return = 0 but that is not correct.

Operative Quantity = 1.5 pallets.
Return = 15 (units)

(0093119)
psanjuan   
2017-01-03 10:34   
(edited on: 2017-01-27 12:46)
Test Case 6 - Return from Customer Not delivered.

Go to Sales order window and create a new one for F&B España, Alimentos y Supermercados.
Go to lines and select Product 1. Enter an operative qty= 15 (Pallet).
Book the order.

Go to Goods Shipment window and create a new one for F&B España, Alimentos y Supermercados. Use Create Lines From.
Select the order, enter an storage bin and select all the lines. Press OK.

Complete the shipment. Write down shipment number 224

Go to Return from Customer window and create a new one for F&B España, Alimentos y Supermercados business partner. Click on Pick/Edit Lines.
Select the shipment just created 224, showing 150 units and 15 pallets. Enter a Returned quantity = 10 (pallets), 100 units. Press Done.

Book the document.
Press Close.

Verify that Operative Quanity and Return are updated to 0.


Test Case 7 - Return from Customer partially delivered.

Go to Return from Customer window and create a new one for F&B España, Bebidas Alegres business partner. Click on Pick/Edit Lines.
Select the shipment just created 224, showing 150 units and 15 pallets. Enter a Returned quantity = 10 (pallets), 100 units. Press Done.

Book the document. Write down RFC number 8.

Go to Return Material Receipt window window and create a new one for F&B España, Bebidas Alegres Business partner. Click on Pick/Edit Lines.

Select the RM order just created, number 8.
Verify Pending = Receiving = 10 O
Returned UM = Pallet.

Change Receiving field to 5. Press Done.
Complete the document.

Go to back to Return from Customer 8 and close it.
Verify that Operative Quantity = 5 pallets.
Return = 50 (units)
This is correct.

(0093168)
psanjuan   
2017-01-04 11:51   
Fix need to be backported to 17Q1
(0093882)
psanjuan   
2017-01-27 12:32   
(edited on: 2017-01-27 12:46)
For the full test of this issue, mainly the part related a sales returns, I have need to get install fix of issue related 34784. See next test case 8.

Test Case 8 - Return from Customer (partially delivered) - Change to 0.5 units.

Create a Goods Shipment for F&B España, Alimentos y Supermercados business partner, for the product. Enter 50 Pallets (500 Units). Complete the shipment.

Go to Return from Customer window and create a new one for F&B España, Alimentos y Supermercados business partner. Click on Pick/Edit Lines and select the shipment. Enter 5 Pallets to be returned. Press OK and Book the order.

(Having 34872 fix applied) go to Return Material Receipt window and create a new one for F&B España, Alimentos y Supermercados business partner.
Click on Pick/Edit lines and select the just created RFC Order. Change Qty to 0.5 and to Units. Press OK.

Check that Return Material Receipt line is not properly created as Operative Quantity = 0.5 (pallet) same as Movement Quantity = 0.5 (units.)

Operative Quantity should have been = 0.05 (pallets).

Complete the document.

Go back to RFC order and close it.
Verify that Operative Quantity is updated to 0.05 which is correct and movement quantity ) 0.5 Units which is also correct.

(0093883)
psanjuan   
2017-01-27 12:47   
Test Plan above verified.
Issue can be code reviewed and close.
(0095828)
hgbot   
2017-04-04 19:11   
Repository: erp/devel/pi
Changeset: bd98803e01b5a17761d568dfcaafdc2d52d6dad8
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Mar 31 13:58:32 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/bd98803e01b5a17761d568dfcaafdc2d52d6dad8 [^]

Fixes issue 34805: Operative quantity should be updated when document is closed

When a Purchase Order/Return From Customer/Return to Vendor document is closed,
the Operative Quantity field is updated to the corresponding value, according to
the Product, Quantity and Aum of the line.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0095830)
aferraz   
2017-04-04 19:13   
Code review + Testing OK
(0096863)
hudsonbot   
2017-05-29 17:43   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^]
Maturity status: Test