Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023061Openbravo ERP03. Procurement managementpublic2013-02-13 09:472013-02-20 04:50
mirurita 
eduardo_Argal 
normalmajoralways
closedfixed 
20Community Appliance
pi 
3.0MP20 
mirurita
Core
Production - QA Approved
2012-12-13
https://code.openbravo.com/erp/devel/pi/rev/dc211cf0ad600ca95beca6deab04dea7967e929b [^]
No
0023061: Goods Receipt accounting is wrong when using breakdown records and product configured as "Book Using Purchase Order Price"
Goods Receipt accounting is wrong when using breakdown records and product configured as "Book Using Purchase Order Price".

It is multiplying breakdown lines with the quantity of the line instead of the quantity of the breakdown.
1) Login as System Administrator
2) Go to Purchase Order || Accounting dimension tab and change:
  - UI Pattern: Standard
  - Active: true
3) Login as F&B International Group Admin
4) Create 2 projects
  - MyProject1
  - MyProject2
5) Enable project dimension to be displayed at purchase order line breakdown
6) Go to Product window and update
     - Cerveza Ale 0,5L
          - Product Type: expense type
          - Sale: false
          - Book Using Purchase Order Price: true
     - Vino Blanco 0,75L
          - Product Type: expense type
          - Sale: false
          - Book Using Purchase Order Price: true
7) Create new Purchase Order
  Header
   - Organization: F&B España - Región Norte
   - Business Partner: Bebidas Alegres, S.L.

   * Line
     - Line No: 10
     - Product: Cerveza Ale 0,5L
     - Ordered Quantity: 100
     - Net Unit Price: 1.36
     - Tax: Compras exentas

      * Accounting dimension 1
        - Line: 10
        - Amount: 100
        - Project: MyProject1
      * Accounting dimension
        - Line: 20
        - Amount: 36
        - Project: MyProject2

   * Line
     - Line No: 20
     - Product: Vino Blanco 0,75L
     - Ordered Quantity: 1
     - Net Unit Price: 3.55
     - Tax: Compras exentas
8) Go to Pending Goods receipts and receive the full order
9) Enable goods receipt accounting (General Ledger Configuration || Active Tables)
10) Go to created Goods Receipt document and post
11) Realize that the generated accounting is wrong. See Accounting tab.

(see attached screenshot)
see attached the proposed solution
No tags attached.
related to defect 0035499 closed mcobas Currency conversion problem when product is configured as "Book Using Purchase Order Price" 
png DocInOut_Accounting_Breakdown.png (140,047) 2013-02-13 09:47
https://issues.openbravo.com/file_download.php?file_id=5973&type=bug
png

diff DocInOut_Breakdown.diff (733) 2013-02-13 09:48
https://issues.openbravo.com/file_download.php?file_id=5974&type=bug
diff other_proposed_change.diff (2,723) 2013-02-14 15:47
https://issues.openbravo.com/file_download.php?file_id=5982&type=bug
Issue History
2013-02-13 09:47miruritaNew Issue
2013-02-13 09:47miruritaAssigned To => dmiguelez
2013-02-13 09:47miruritaFile Added: DocInOut_Accounting_Breakdown.png
2013-02-13 09:47miruritaModules => Core
2013-02-13 09:47miruritaTriggers an Emergency Pack => No
2013-02-13 09:48miruritaFile Added: DocInOut_Breakdown.diff
2013-02-13 09:49miruritaRegression level => Production - QA Approved
2013-02-13 09:49miruritaRegression date => 2012-12-13
2013-02-13 09:49miruritaRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/dc211cf0ad600ca95beca6deab04dea7967e929b [^]
2013-02-13 13:06eduardo_ArgalAssigned Todmiguelez => eduardo_Argal
2013-02-13 17:26eduardo_ArgalStatusnew => scheduled
2013-02-13 17:26eduardo_Argalfix_in_branch => pi
2013-02-14 12:32hgbotCheckin
2013-02-14 12:32hgbotNote Added: 0056438
2013-02-14 12:32hgbotStatusscheduled => resolved
2013-02-14 12:32hgbotResolutionopen => fixed
2013-02-14 12:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3c767e36278c9df506e4ebe109f78737d57da964 [^]
2013-02-14 15:47miruritaNote Added: 0056447
2013-02-14 15:47miruritaStatusresolved => new
2013-02-14 15:47miruritaResolutionfixed => open
2013-02-14 15:47miruritaFile Added: other_proposed_change.diff
2013-02-15 11:29eduardo_ArgalStatusnew => scheduled
2013-02-15 11:31hgbotCheckin
2013-02-15 11:31hgbotNote Added: 0056487
2013-02-15 11:31hgbotStatusscheduled => resolved
2013-02-15 11:31hgbotResolutionopen => fixed
2013-02-15 11:31hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/3c767e36278c9df506e4ebe109f78737d57da964 [^] => http://code.openbravo.com/erp/devel/pi/rev/b32799632a82fed7c36f356e6751e2861b35b416 [^]
2013-02-15 17:53miruritaReview Assigned To => mirurita
2013-02-15 17:53miruritaNote Added: 0056495
2013-02-15 17:53miruritaStatusresolved => closed
2013-02-15 17:53miruritaFixed in Version => 3.0MP20
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056600
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056607
2017-03-23 13:16aferrazRelationship addedrelated to 0035499

Notes
(0056438)
hgbot   
2013-02-14 12:32   
Repository: erp/devel/pi
Changeset: 3c767e36278c9df506e4ebe109f78737d57da964
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Thu Feb 14 12:31:52 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3c767e36278c9df506e4ebe109f78737d57da964 [^]

Fixes bug 23061

---
M src/org/openbravo/erpCommon/ad_forms/DocInOut.java
---
(0056447)
mirurita   
2013-02-14 15:47   
Not working if the product is not marked as "Book Using Purchase Order Price". The cost is calculated based only in the line quantity, not breakdown quantity.

see attached diff as starting point.
(0056487)
hgbot   
2013-02-15 11:31   
Repository: erp/devel/pi
Changeset: b32799632a82fed7c36f356e6751e2861b35b416
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Fri Feb 15 11:31:06 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b32799632a82fed7c36f356e6751e2861b35b416 [^]

Fixes bug 23061

---
M src/org/openbravo/erpCommon/ad_forms/DocInOut.java
M src/org/openbravo/erpCommon/ad_forms/DocLineInOut_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocLine_Material.java
---
(0056495)
mirurita   
2013-02-15 17:53   
code review + testing OK

Testing Plans:
1) Scenario described in the issue.
2) Same as 1) but both products not flagged as "Book Using Purchase Order Price"
3) Same as 2) but without breakdown records
4) Sames as 1) but both products not flagged as "Book Using Purchase Order Price"
(0056600)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test
(0056607)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test