Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040199Openbravo ERP03. Procurement managementpublic2019-02-14 14:242019-03-28 14:56
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q2 
Sandrahuguet
Core
No
0040199: Line Net Amount of Invoice lines not rounded to standard precision if it is created from goods receipt and have a related order
Line Net Amount of Invoice lines not rounded to standard precision if it is created from goods receipt and have a related order
Configure the Format.xml to accept 3 decimals in prices

As System admin role:
   Set EUR currency's price precision to 3

As group admin role:
   Create a new purchase order, add a line to it, set one unit of a product with a price of 3 decimals and book it
   Go to Pending Goods Receipt window and create the goods receipt from the order
   Go to Goods Receipt window and launch the 'Generate Invoice From Receipt' process

   Go to the Purchase Invoice and complete it
   Check through database that the linenetamt column has 3 decimals
The problem is in the M_INOUT_CREATEINVOICE database function, in the following query line net amount is not being rounded:

SELECT COALESCE(MAX(PriceList), 0),
                COALESCE(MAX(PriceActual), 0),
                COALESCE(MAX(PriceLimit), 0),
                COALESCE(MAX(CUR_ShipmentLines.movementqty*priceactual),0),
                COALESCE(MAX(gross_unit_price), 0),
                COALESCE(MAX(line_gross_amount), 0),
                COALESCE(MAX(grosspricestd), 0),
                COALESCE(MAX(grosspricelist), 0),
                MAX(c_tax_id)
              INTO v_PriceList,
                v_PriceActual,
                v_PriceLimit,
                v_LineNetAmt,
                v_gross_unit_price,
                v_line_gross_amount,
                v_grosspricestd,
                v_grosspricelist,
                v_c_Tax_ID
              FROM C_ORDERLINE
              WHERE C_OrderLine_ID=CUR_ShipmentLines.C_OrderLine_ID;
No tags attached.
Issue History
2019-02-14 14:24ngarciaNew Issue
2019-02-14 14:24ngarciaAssigned To => Triage Finance
2019-02-14 14:24ngarciaModules => Core
2019-02-14 14:24ngarciaResolution time => 1551913200
2019-02-14 14:24ngarciaTriggers an Emergency Pack => No
2019-02-14 14:27ngarciaProposed Solution updated
2019-02-14 14:27ngarciaIssue Monitored: networkb
2019-02-14 15:21SandrahuguetAssigned ToTriage Finance => markmm82
2019-02-15 04:19markmm82Statusnew => scheduled
2019-02-18 05:04markmm82Note Added: 0109886
2019-02-18 05:05markmm82Note Added: 0109887
2019-02-19 11:57hgbotCheckin
2019-02-19 11:57hgbotNote Added: 0109929
2019-02-19 11:57hgbotStatusscheduled => resolved
2019-02-19 11:57hgbotResolutionopen => fixed
2019-02-19 11:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5501b3c3b7bd87b3155ad7c87c15fc0cd4358551 [^]
2019-02-19 11:57SandrahuguetReview Assigned To => Sandrahuguet
2019-02-19 11:57SandrahuguetNote Added: 0109930
2019-02-19 11:57SandrahuguetStatusresolved => closed
2019-02-19 11:57SandrahuguetFixed in Version => 3.0PR19Q2
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110823

Notes
(0109886)
markmm82   
2019-02-18 05:04   
Test plan:
Configure the Format.xml to accept 3 decimals in prices

As System admin role:
   Set EUR currency's price precision to 3

As group admin role:
   Create a new purchase order, add a line to it, set one unit of a product with a price of 3 decimals and book it
   Go to Pending Goods Receipt window and create the goods receipt from the order
   Go to Goods Receipt window and launch the 'Generate Invoice From Receipt' process

   Go to the Purchase Invoice and complete it
   Check through database that the linenetamt column has 2 decimals
(0109887)
markmm82   
2019-02-18 05:05   
Test plan 2:
Configure the Format.xml to accept 3 decimals in prices

As System admin role:
   Set EUR currency's price precision to 3
   Set EUR currency's standard precision to 3

As group admin role:
   Create a new purchase order, add a line to it, set one unit of a product with a price of 3 decimals and book it
   Go to Pending Goods Receipt window and create the goods receipt from the order
   Go to Goods Receipt window and launch the 'Generate Invoice From Receipt' process

   Go to the Purchase Invoice and complete it
    Check through database that the linenetamt column has 3 decimals
(0109929)
hgbot   
2019-02-19 11:57   
Repository: erp/devel/pi
Changeset: 5501b3c3b7bd87b3155ad7c87c15fc0cd4358551
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Mon Feb 18 01:02:59 2019 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/5501b3c3b7bd87b3155ad7c87c15fc0cd4358551 [^]

Fixes issue 40199: Line Net Amount of Invoice lines rounded to std precision

Line Net Amount of Invoice lines was not rounded to standard precision if it is
created from goods receipt and have a related order.

Now it is rounded to the standard precision of the currency.

---
M src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml
---
(0109930)
Sandrahuguet   
2019-02-19 11:57   
Code review + testing OK
(0110823)
hudsonbot   
2019-03-28 14:56   
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/b2fbc1588df4 [^]
Maturity status: Test