Fixes issue 40199: Line Net Amount of Invoice lines rounded to std precision default tip
authorMark Molina <mark.molina@doceleguas.com>
Mon, 18 Feb 2019 01:02:59 -0300
changeset 35457 5501b3c3b7bd
parent 35456 f6bb7df76d9b
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.
src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml
--- a/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml	Mon Feb 18 09:38:41 2019 +0100
+++ b/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml	Mon Feb 18 01:02:59 2019 -0300
@@ -19,7 +19,7 @@
   * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
   * All Rights Reserved.
   * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2001-2017 Openbravo, S.L.U.
+  * Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
   *
   * Specifically, this derivative work is based upon the following Compiere
   * file and version.
@@ -273,7 +273,7 @@
               SELECT COALESCE(MAX(PriceList), 0),
                 COALESCE(MAX(PriceActual), 0),
                 COALESCE(MAX(PriceLimit), 0),
-                COALESCE(MAX(CUR_ShipmentLines.movementqty*priceactual),0),
+                COALESCE(MAX(ROUND(CUR_ShipmentLines.movementqty*priceactual, v_stdprecision)),0),
                 COALESCE(MAX(gross_unit_price), 0),
                 COALESCE(MAX(line_gross_amount), 0),
                 COALESCE(MAX(grosspricestd), 0),