Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034784Openbravo ERP07. Sales managementpublic2016-12-20 12:132017-06-09 02:49
psanjuan 
collazoandy4 
urgentmajoralways
closedfixed 
20Professional Appliance
 
3.0PR17Q3 
dmiguelez
Core
No
0034784: Return Material Receipt is not properly managing Pending and Receiving quanitties if Alternative UOM is used
Return Material Receipt is not properly managing Pending and Receiving quanitties if Alternative UOM is used
1. Log in as Openbravo,Sytem Admin role
2. Go to Unit of Measure window
3. Create a new record with below setup:
Orbanization = *
EDI Code = PC
Name = Pack
Standard Precision = 2
Costing Precision = 2
Symbol = PC
4. Save it
5. Create another record with below setup:
Orbanization = *
EDI Code = PA
Name = Pallet
Standard Precision = 2
Costing Precision = 2
Symbol = PA
7. Go to ""Unit"" Unit of Measure and verify its standdar precision = 0. Change it to 2
8. Save it.
9. Log out and Log in"

1. Log in as Openbravo, F&B International Group Admint role
2. Go to Product window and create a new record with below setup:
Organization = F&B España
Name = Search Key = Purchase PA11 & Sales PK12
Product Type = Item
UOM = Unit
3. Go to Price tab and select
Tarifa Bebidas Alegres. Enter 100.00 as Unit/List Price
Tarfa de ventas. Enter 150.00 as Unit/List Price
4. Go to Alternate UOM tab and enter below setup:
UOM = Pack, with a conversion rate = 12, set as Primary for Sales and Secondary for Purchase
UOM = Pallet, with a converion rate = 11, set as Primary for Purchase and secondary for Sales.
In both cases set Logistics as "Not Applicable.

1. Go to Purchase Order window and create a new one for F&B España, Bebidas Alegres business Partner.
2. Go to lines and create a new one for the just created product.
3. Enter an Operative Quanity = 10, Alternative UOM = Pallet, Ordered Quantity = 110 Units.
4. Book the order.

1. Go to Goods Receipt window and receipt the order. 110 units are received.

1. Go to Sales Order window and create a new order for F&B España, Alimentos y Supermercados business partner.
2. Enter an Operative Quantity of 4, Alternative UOM = Pack, Ordered Quantity = 48 unit.
3. Book the order.

1. Go to Goods Shipment and ship the order created. 48 units are shipped.

1. Go to Return from Customer window and create a new one for F&B España, Alimentos y Supermercados business partner
2. Click on Pick/Edit Lines
3. Select shipment just created, ie.1000223
4. Select the line.
5. Enter a returned qty = 0.5 pack for product "Purchase PA11 & Sales PK12""
7. Press Done"

1. Go to Return Material Receipt window and create a new one for F&B España, Alimentos y Supermercados business partner.
2. Click on Pick/Edit Lines
3. Select RM order just created.

Verify that below data is shown:
Returned = 6
UOM = Unit
Operative Quantity = 0.5
Altenative UOM = 0.5
Pending 6
Receiving 6
Returned UOM = Pack

Above is not correct because only 0.5 packs or 6 units can be received, or are pending to be received.

No tags attached.
related to defect 0034805 closed collazoandy4 Operative Quantity needs to be updated to 0 same as Ordered/Return quanity if the corresponding order is closed (not delivered) 
Issue History
2016-12-20 12:13psanjuanNew Issue
2016-12-20 12:13psanjuanAssigned To => Triage Finance
2016-12-20 12:13psanjuanModules => Core
2016-12-20 12:13psanjuanTriggers an Emergency Pack => No
2016-12-20 12:18psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14076#r14076
2016-12-20 12:25psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14077#r14077
2016-12-20 12:28psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14078#r14078
2016-12-23 16:22markmm82Assigned ToTriage Finance => collazoandy4
2016-12-23 16:31collazoandy4Statusnew => scheduled
2016-12-27 18:25collazoandy4Note Added: 0093030
2017-01-03 11:17psanjuanNote Edited: 0093030bug_revision_view_page.php?bugnote_id=0093030#r14182
2017-01-03 11:19psanjuanNote Edited: 0093030bug_revision_view_page.php?bugnote_id=0093030#r14183
2017-01-03 11:19psanjuanNote Edited: 0093030bug_revision_view_page.php?bugnote_id=0093030#r14184
2017-01-03 12:10psanjuanNote Added: 0093121
2017-01-04 11:50psanjuanNote Added: 0093167
2017-01-27 12:32psanjuanRelationship addedrelated to 0034805
2017-01-27 12:47psanjuanNote Edited: 0093121bug_revision_view_page.php?bugnote_id=0093121#r14360
2017-03-30 18:04aferrazRelationship deletedrelated to 0034805
2017-03-30 18:04aferrazRelationship addedblocks 0034805
2017-04-06 19:57aferrazRelationship deletedblocks 0034805
2017-04-06 19:57aferrazRelationship addedrelated to 0034805
2017-04-06 19:58aferrazStatusscheduled => feedback
2017-04-06 19:58aferrazStatusfeedback => scheduled
2017-06-08 11:40hgbotCheckin
2017-06-08 11:40hgbotNote Added: 0097207
2017-06-08 11:40hgbotStatusscheduled => resolved
2017-06-08 11:40hgbotResolutionopen => fixed
2017-06-08 11:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6a7d52c75508509ed83486c21aa05c84c866c110 [^]
2017-06-08 11:40hgbotCheckin
2017-06-08 11:40hgbotNote Added: 0097208
2017-06-08 11:48dmiguelezReview Assigned To => dmiguelez
2017-06-08 11:48dmiguelezNote Added: 0097211
2017-06-08 11:48dmiguelezStatusresolved => closed
2017-06-08 11:57aferrazNote Deleted: 0093167
2017-06-08 11:58aferrazFixed in Version => 3.0PR17Q3
2017-06-09 02:49hudsonbotCheckin
2017-06-09 02:49hudsonbotNote Added: 0097258
2017-06-09 02:49hudsonbotCheckin
2017-06-09 02:49hudsonbotNote Added: 0097259

Notes
(0093030)
collazoandy4   
2016-12-27 18:25   
(edited on: 2017-01-03 11:19)
Test Case 1 - Return from Customer 100% delivered.

  As System Admin Role
    Go to Unit of Measure window
    Create a new record with below setup:
      Organization = *
      EDI Code = PC
      Name = Pack
      Standard Precision = 2
      Costing Precision = 2
      Symbol = PC
      Save it
    Create another record with below setup:
       Orbanization = *
       EDI Code = PA
       Name = Pallet
       Standard Precision = 2
       Costing Precision = 2
       Symbol = PA
       Save it.
    Go to Preference
    Create a new record with below setup:
       Property = Enable UOM Management
       Value = Y
    Log out and Log in as F&B International Group
    Go to Product window and create a new record with below setup:
       Organization = F&B España
       Name = Search Key = Purchase PA11 & Sales PK12
       Product Type = Item
        UOM = Unit
    Go to Price tab and select
    Tarifa Bebidas Alegres. Enter 100.00 as Unit/List Price
    Tarifa de ventas. Enter 150.00 as Unit/List Price
    Go to Alternate UOM tab and enter below setup:
       UOM = Pack, with a conversion rate = 12, set as Primary for Sales and Secondary for Purchase and Logistics as "Not Applicable"
       UOM = Pallet, with a converion rate = 11, set as Primary for Purchase and secondary for Sales and Logistics as "Not Applicable".

Go to Purchase Order window and create a new one for F&B España, Bebidas Alegres business Partner.
    Create a new line for the just created product.
    Enter an Operative Quantity = 10, Alternative UOM = Pallet, Ordered Quantity = 110 Units.
    Book the order.
    Go to Goods Receipt window and and create a new one for F&B España, Bebidas Alegres business Partner.
    Clic on Create Lines From button
    Select the order created. Clic on OK button
    Complete de document.

Go to Sales Order window and create a new order for F&B España, Alimentos y Supermercados business partner.
    Enter an Operative Quantity of 4, Alternative UOM = Pack, Ordered Quantity = 48 unit. Book the order.
    Go to Goods Shipment window and and create a new one for F&B España, Bebidas Alegres business Partner.
    Clic on Create Lines From button
    Select the order created. Clic on OK button
    Complete de document.

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 shipment just created
    Select the line.
    Enter a returned qty = 0.5 pack for product "Purchase PA11 & Sales PK12""
    Press Done and book the document.

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.
Select RM order just created.

Verify that Pending = 0.5 = Receiving 0.5. Returned UOM = Pack.

Press Done. Complete Return Material Receipt with an operative quantity = 0.5 (pack ) and movement quantity = 6 (units).

(0093121)
psanjuan   
2017-01-03 12:10   
(edited on: 2017-01-27 12:47)
Test Case 3 - 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).

(0097207)
hgbot   
2017-06-08 11:40   
Repository: erp/devel/pi
Changeset: 6a7d52c75508509ed83486c21aa05c84c866c110
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue May 30 11:54:19 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/6a7d52c75508509ed83486c21aa05c84c866c110 [^]

Fixes issue 34784: Pending and Receiving quantities doesn't match returned AUOM

If a product have an Alternative Unit Of Measure, pending, receiving and operative
quantities doesn't match the return UOM. A check was add to the
m_rm_receipt_pick_edit and m_rm_shipment_pick_edit views checking the AUOM
preference value and if the line have an Alternative UOM, also the operativeqty
of the inout line is recalculated if the alternativeUOM is different from the
returnedUOM

---
M src-db/database/model/views/M_RM_RECEIPT_PICK_EDIT.xml
M src-db/database/model/views/M_RM_SHIPMENT_PICK_EDIT.xml
M src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java
---
(0097208)
hgbot   
2017-06-08 11:40   
Repository: erp/devel/pi
Changeset: 54c06cacc8d9ffe7236e87df8ca58f0883304d19
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jun 08 11:29:15 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/54c06cacc8d9ffe7236e87df8ca58f0883304d19 [^]

Related to Issue 34784. Code Review. Extracted code to private functions
to improve redability

---
M src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java
---
(0097211)
dmiguelez   
2017-06-08 11:48   
Code Review + Testing Ok
(0097258)
hudsonbot   
2017-06-09 02:49   
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/682983c2eead [^]
Maturity status: Test
(0097259)
hudsonbot   
2017-06-09 02:49   
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/682983c2eead [^]
Maturity status: Test