details: https://code.openbravo.com/erp/devel/pi/rev/a5ee63cb510e changeset: 31709:a5ee63cb510e user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Mon Mar 20 19:09:50 2017 +0100 summary: Related to issue 32265: Code review improvements
diffstat: src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml | 6 ++++++ src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml | 8 ++++++++ src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml | 8 ++++++++ 3 files changed, 22 insertions(+), 0 deletions(-) diffs (52 lines): diff -r 9812b29fd4fa -r a5ee63cb510e src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml --- a/src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml Mon Mar 20 13:14:16 2017 -0400 +++ b/src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml Mon Mar 20 19:09:50 2017 +0100 @@ -30,6 +30,12 @@ * Contributor(s): ______________________________________. ************************************************************************/ +/* +* It returns the Net Amount calculated from the Gross Amount after applying the Tax. +* Net Amount will be rounded to p_stdprecision if not NULL, +* otherwise it will be rounded to a big precision (50) to avoid rounding issues. +*/ + v_ResultStr VARCHAR(2000) := ''; v_calcPrecision NUMBER:= 50; v_TaxAmount NUMBER; diff -r 9812b29fd4fa -r a5ee63cb510e src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml --- a/src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml Mon Mar 20 13:14:16 2017 -0400 +++ b/src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml Mon Mar 20 19:09:50 2017 +0100 @@ -26,6 +26,14 @@ * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ + +/* +* It rounds C_InvoiceLineTax and C_InvoiceTax TaxBaseAmt and adjusts C_InvoiceTax TaxAmt and C_InvoiceLine LineNetAmt +* when completing the p_invoice_id invoice. +* It removes C_InvoiceLineTax and C_InvoiceTax taxes and C_InvoiceLine and C_Invoice amounts and recalculates them again +* when reactivating the p_invoice_id invoice. +*/ + -- Variables v_taxAmt C_INVOICETAX.TaxAmt%TYPE; v_amount C_INVOICELINE.Line_Gross_Amount%TYPE; diff -r 9812b29fd4fa -r a5ee63cb510e src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml --- a/src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml Mon Mar 20 13:14:16 2017 -0400 +++ b/src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml Mon Mar 20 19:09:50 2017 +0100 @@ -26,6 +26,14 @@ * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ + +/* +* It rounds C_OrderLineTax and C_OrderTax TaxBaseAmt and adjusts C_OrderTax TaxAmt and C_OrderLine LineNetAmt +* when completing the p_order_id order. +* It removes C_OrderLineTax and C_OrderTax taxes and C_OrderLine and C_Order amounts and recalculates them again +* when reactivating the p_order_id order. +*/ + -- Variables v_amount C_ORDERLINE.Line_Gross_Amount%TYPE; TYPE RECORD IS REF CURSOR; ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits