Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021077Openbravo ERP09. Financial managementpublic2012-07-13 18:312012-07-18 10:23
psarobe 
gorkaion 
urgentmajoralways
closedfixed 
5
pi 
3.0MP133.0MP13 
Core
No
0021077: Add new field "Gross List Price" into Sales/Purchase Order and Sales/Purchase Invoice
Once this is done it will be necessary to change the behaviour of the Discount field for Price including taxes.

This behaviour will be different than when the prices don't include taxes. The behaviour will be the following:

Discount: The difference in percentage between Gross unit price and Gross List price

* If you change the gross unit price then the discount it's updated
* If you change the discount then the gross unit price is update
* If you change the gross list price then the discount changes
Order windows
1. Go to sales/purchase order. Create the header
2. Make sure you use a price list that includes taxes
3. Create a line in form view and see there is not the gross list price and discount. This is wrong

Invoice windows
1. Go to sales/purchase invoice. Create the header
2. Make sure you use a price list that includes taxes
3. Create a line in form view and see there is not the gross list price and discount. This is wrong
No tags attached.
blocks defect 0021122 closed alostale Retail Modules Populate gross list price and discount fields 
blocks defect 00212223.0MP14 closed gorkaion Openbravo ERP Price adjustments do not apply in sales order 
Issue History
2012-07-13 18:31psarobeNew Issue
2012-07-13 18:31psarobeAssigned To => gorkaion
2012-07-13 18:31psarobeModules => Core
2012-07-16 18:22hgbotCheckin
2012-07-16 18:22hgbotNote Added: 0050623
2012-07-16 18:22hgbotCheckin
2012-07-16 18:22hgbotNote Added: 0050624
2012-07-16 18:22hgbotCheckin
2012-07-16 18:22hgbotNote Added: 0050625
2012-07-16 18:22hgbotCheckin
2012-07-16 18:22hgbotNote Added: 0050626
2012-07-16 18:22hgbotCheckin
2012-07-16 18:22hgbotNote Added: 0050627
2012-07-16 18:23hgbotCheckin
2012-07-16 18:23hgbotNote Added: 0050628
2012-07-16 18:23hgbotCheckin
2012-07-16 18:23hgbotNote Added: 0050629
2012-07-16 19:19hgbotCheckin
2012-07-16 19:19hgbotNote Added: 0050634
2012-07-16 19:19hgbotCheckin
2012-07-16 19:19hgbotNote Added: 0050635
2012-07-16 19:19hgbotCheckin
2012-07-16 19:19hgbotNote Added: 0050636
2012-07-16 19:19hgbotStatusnew => resolved
2012-07-16 19:19hgbotResolutionopen => fixed
2012-07-16 19:19hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/70f3ddec1717fb0130f59d20becc66c630b9c81f [^]
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050650
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050651
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050652
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050653
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050654
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050655
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050656
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050657
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050658
2012-07-17 11:30hudsonbotCheckin
2012-07-17 11:30hudsonbotNote Added: 0050659
2012-07-17 12:10alostaleRelationship addedblocks 0021122
2012-07-17 12:33hgbotCheckin
2012-07-17 12:33hgbotNote Added: 0050665
2012-07-17 12:51hgbotCheckin
2012-07-17 12:51hgbotNote Added: 0050668
2012-07-17 16:38hgbotCheckin
2012-07-17 16:38hgbotNote Added: 0050673
2012-07-17 16:56miruritaNote Added: 0050674
2012-07-17 16:56miruritaStatusresolved => closed
2012-07-17 16:56miruritaFixed in Version => 3.0MP13
2012-07-18 05:19hudsonbotCheckin
2012-07-18 05:19hudsonbotNote Added: 0050695
2012-07-18 05:19hudsonbotCheckin
2012-07-18 05:19hudsonbotNote Added: 0050696
2012-07-18 05:19hudsonbotCheckin
2012-07-18 05:19hudsonbotNote Added: 0050697
2012-07-18 10:23miruritaNote Added: 0050713
2012-07-26 20:50jonalegriaesarteRelationship addedblocks 0021222

Notes
(0050623)
hgbot   
2012-07-16 18:22   
Repository: erp/devel/pi
Changeset: ac2a7ca14b205f05f912988f0fd6d11dcb351cb3
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 12:23:09 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ac2a7ca14b205f05f912988f0fd6d11dcb351cb3 [^]

Related to issue 21077.Add new column and fields.

---
M src-db/database/model/tables/C_ORDERLINE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0050624)
hgbot   
2012-07-16 18:22   
Repository: erp/devel/pi
Changeset: bd04b3561c937fe26a734d012e38ce9fa00004bc
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 12:23:41 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bd04b3561c937fe26a734d012e38ce9fa00004bc [^]

Related to issue 21077.Remove warnings and format code of SL_Order_Product.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
---
(0050625)
hgbot   
2012-07-16 18:22   
Repository: erp/devel/pi
Changeset: e65ac02cea6b79c07334941c0648e7d5888063ae
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 13:29:55 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e65ac02cea6b79c07334941c0648e7d5888063ae [^]

Related to issue 21077.Remove warnings and format code of SL_Order_Amt.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0050626)
hgbot   
2012-07-16 18:22   
Repository: erp/devel/pi
Changeset: cd961154b923fc38e1af8f0cde0243aac73323e2
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 13:31:08 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd961154b923fc38e1af8f0cde0243aac73323e2 [^]

Related to issue 21077.Calculate discount on product selector.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
---
(0050627)
hgbot   
2012-07-16 18:22   
Repository: erp/devel/pi
Changeset: 2b36a26159876ff42c779c74f87b61a600db789b
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 13:31:32 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2b36a26159876ff42c779c74f87b61a600db789b [^]

Related to issue 21077.Changes in readonly and display logics.

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0050628)
hgbot   
2012-07-16 18:23   
Repository: erp/devel/pi
Changeset: 33370af72d4dc7706c3c30d4b6af62bafde36e2a
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 16:58:18 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/33370af72d4dc7706c3c30d4b6af62bafde36e2a [^]

Related to issue 21077.Calculate discount on amount selector.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0050629)
hgbot   
2012-07-16 18:23   
Repository: erp/devel/pi
Changeset: b08c32e4e2643a9002710670c6d0eb654585528f
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 17:23:35 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b08c32e4e2643a9002710670c6d0eb654585528f [^]

Related to issue 21077.Remove warnings and format code of CopyFromPOOrder.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java
---
(0050634)
hgbot   
2012-07-16 19:19   
Repository: erp/devel/pi
Changeset: ade92a7ab29b0391d61e431084c06b91014de0ed
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 19:13:33 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ade92a7ab29b0391d61e431084c06b91014de0ed [^]

Related to issue 21077.Adapt copy buttons to calculate discount.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_data.xsql
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder_data.xsql
---
(0050635)
hgbot   
2012-07-16 19:19   
Repository: erp/devel/pi
Changeset: 5d5370eb46b5d4fe36381fdd20529c84e251f23a
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 19:13:51 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5d5370eb46b5d4fe36381fdd20529c84e251f23a [^]

Related to issue 21077.Set gross price list in return orders.

---
M src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
---
(0050636)
hgbot   
2012-07-16 19:19   
Repository: erp/devel/pi
Changeset: 70f3ddec1717fb0130f59d20becc66c630b9c81f
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jul 16 19:18:56 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/70f3ddec1717fb0130f59d20becc66c630b9c81f [^]

Fixed issue 21077.Fix net price list labels.

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0050650)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050651)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050652)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050653)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050654)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050655)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050656)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050657)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050658)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050659)
hudsonbot   
2012-07-17 11:30   
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/e0c03882496c [^]

Maturity status: Test
(0050665)
hgbot   
2012-07-17 12:33   
Repository: erp/devel/pi
Changeset: 6a37e436f20388691b067ce8845d3c5124273b90
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue Jul 17 12:32:49 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6a37e436f20388691b067ce8845d3c5124273b90 [^]

Related to issue 21077.Fix issue calculating gross line amt.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0050668)
hgbot   
2012-07-17 12:51   
Repository: erp/devel/pi
Changeset: 90c03ab79c8d3786bdeb0996ce6b4629ddb866fd
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue Jul 17 12:50:47 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/90c03ab79c8d3786bdeb0996ce6b4629ddb866fd [^]

Related to issue 21077.Properly set gross list price on RMA.

---
M src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
---
(0050673)
hgbot   
2012-07-17 16:38   
Repository: erp/devel/pi
Changeset: 85cf00e297e8a557c80de2d1abfdedb08011d739
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Tue Jul 17 16:37:50 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/85cf00e297e8a557c80de2d1abfdedb08011d739 [^]

Related to issue 21077.Recalculate net prices and amount after discount change.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0050674)
mirurita   
2012-07-17 16:56   
code review + testing OK

Testing Plan I
1) Create a new Price List for price including taxes (PIT)
  - Org: F&B España, S.A
  - Name: PIT - General Sales
  - Price Includes Tax: Y
  - Sales Price List: Y
2) Create a new Price List Version
  - Name: 17-07-2012
  - Valid From Date: 01-01-2012
3) Create a new product price
  - Agua sin Gas 1L
    + Unit Price: 8
    + List Price: 10
  - Cerveza Ale 0,5L
    + Unit Price: 6
    + List Price: 10
  - Cola de Cereza 0,5L
    + Unit Price: 0
    + List Price: 0
4) Create a new sales order
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - General Sales
3) Create a new sales order line
  - Product: Agua sin Gas 1L
  - Ordered Quantity: 2
4) Check values:
  - Net Unit Price: 6.78
  - Gross Unit Price: 8
  - Line Net Amount: 13.56
  - Line Gross Amount: 16
  - Gross List Price: 10
  - Discount: 20
6) Change the discount to 30
  - Net Unit Price: 5.93
  - Gross Unit Price: 7
  - Line Net Amount: 11.86
  - Line Gross Amount: 14
  - Gross List Price: 10
  - Discount: 30
7) Change the gross unit price to 5
  - Net Unit Price: 4.24
  - Gross Unit Price: 5
  - Line Net Amount: 8.48
  - Line Gross Amount: 10
  - Gross List Price: 10
  - Discount: 50
8) Create a new sales order line
  - Product: Cerveza Ale 0,5L
  - Ordered Quantity: 2
9) Check values:
  - Net Unit Price: 5.08
  - Gross Unit Price: 6
  - Line Net Amount: 10.16
  - Line Gross Amount: 12
  - Gross List Price: 10
  - Discount: 40
10) Create a new sales order line
  - Product: Cola de Cereza 0,5L
  - Ordered Quantity: 2
11) Check values:
  - Net Unit Price: 0
  - Gross Unit Price: 0
  - Line Net Amount: 0
  - Line Gross Amount: 0
  - Gross List Price: 0
  - Discount: 0


Testing Plan II
1) Create a new sales order
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - General Sales
2) Create a new sales order line
  - Product: Agua sin Gas 1L
  - Ordered Quantity: 2
3) Check values:
  - Net Unit Price: 8
  - Gross Unit Price: not displayed
  - Line Net Amount: 16
  - Line Gross Amount: not displayed
  - Gross List Price: not displayed
  - Net List Price: 10
  - Discount: 20
4) Change the discount to 30
  - Net Unit Price: 7
  - Gross Unit Price: not displayed
  - Line Net Amount: 14
  - Line Gross Amount: not displayed
  - Gross List Price: not displayed
  - Net List Price: 10
  - Discount: 30
5) Change the net unit price to 5
  - Net Unit Price: 5
  - Gross Unit Price: not displayed
  - Line Net Amount: 10
  - Line Gross Amount: not displayed
  - Gross List Price: not displayed
  - Net List Price: 10
  - Discount: 30 (the discount is not calculated if you change the net unit price, desired behaviour)
6) Create a new sales order line
  - Product: Cerveza Ale 0,5L
  - Ordered Quantity: 2
7) Check values:
  - Net Unit Price: 6
  - Gross Unit Price: not displayed
  - Line Net Amount: 12
  - Line Gross Amount: not displayed
  - Gross List Price: not displayed
  - Net List Price: 10
  - Discount: 40
8) Create a new sales order line
  - Product: Cola de Cereza 0,5L
  - Ordered Quantity: 2
9) Check values:
  - Net Unit Price: 0
  - Gross Unit Price: not displayed
  - Line Net Amount: 0
  - Line Gross Amount: not displayed
  - Gross List Price: not displayed
  - Net List Price: 0
  - Discount: 0

Testing Plan III
1) Create a new sales order
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - General Sales
2) Create a new sales order line
  - Product: Agua sin Gas 1L
  - Ordered Quantity: 2
3) Complete the Sales Order
4) Create a new sales order header
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - General Sales
5) Click on Copy Lines
6) Select previously created sales order line and quantity = 2
7) Check values:
  - Net Unit Price: 6.78
  - Gross Unit Price: 8
  - Line Net Amount: 13.56
  - Line Gross Amount: 16
  - Gross List Price: 10
  - Discount: 20
8) Remove the sales order line
9) Click on Copy from Order and select previously created the order
10) Check values:
  - Net Unit Price: 6.78
  - Gross Unit Price: 8
  - Line Net Amount: 13.56
  - Line Gross Amount: 16
  - Gross List Price: 10
  - Discount: 20

Testing Plan IV
1) Create a new sales order
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - General Sales
2) Create a new sales order line
  - Product: Agua sin Gas 1L
  - Ordered Quantity: 2
3) Complete the Sales Order
4) Create a new goods shipment for this sales order
5) Create a new return from customer
  - BP: Alimentos y Supermercados, S.A
  - Price List: PIT - Ventas Pamplona
6) Click on Pick/Edit Lines
7) Select the record in the grid and enter Returned = 2
8) Click on Done
9) Check values on return from customer line
  - Net Unit Price: 6.78
  - Gross Unit Price: 8
  - Line Net Amount: 13.56
  - Line Gross Amount: 16
  - Gross List Price: not displayed
  - Discount: not displayed
(0050695)
hudsonbot   
2012-07-18 05:19   
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/d76f48fbf254 [^]

Maturity status: Test
(0050696)
hudsonbot   
2012-07-18 05:19   
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/d76f48fbf254 [^]

Maturity status: Test
(0050697)
hudsonbot   
2012-07-18 05:19   
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/d76f48fbf254 [^]

Maturity status: Test
(0050713)
mirurita   
2012-07-18 10:23   
Gross List Price field has been included on:
- Sales Order
- Purchase Order
- Return from Customer
- Return to Vendor

It is only visible and read-only on:
- Sales Order
- Purchase Order

Invoices does not have this field.

Expected behavior:
- Using an standard price list (not price including taxes), when you change the net unit price the discount is not recalculated.