Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038207Openbravo ERP09. Financial managementpublic2018-03-22 20:532018-03-26 18:33
markmm82 
markmm82 
highmajorhave not tried
closedfixed 
5
 
3.0PR18Q23.0PR18Q2 
aferraz
Core
No
0038207: API change is required due to solution of issue 38163
The fix of issue 38163 causes an API change due to some changes in the database functions.

1- C_INVOICELINETAX_ROUNDING:
   1.1 - Removed the "p_linefrom" as it is always using its default value (0) and the condition (and line > p_linefrom) where it is used is always true.
   1.2 - Added the new "p_stdprecision" parameter to use the standard precision of the document currency to round the taxes correctly when searching for the tax line adjustment that stays closest to the original amount.

2- C_INVOICELINETAX_ROUNDING_AMT:
   2.1 - Removed the "p_linefrom" as it is always using its default value (0) and the condition (and line > p_linefrom) where it is used is always true.

3- C_INVOICETAX_ROUNDING:
   3.1 - Created the new "p_stdprecision" parameter to use the standard precision of the document currency to round the taxes correctly when searching for the tax line adjustment that stays closest to the original amount.

4- C_ORDERLINETAX_ROUNDING:
   4.1 - Removed the "p_linefrom" as it is always using its default value (0) and the condition (and line > p_linefrom) where it is used it is always true.
   4.2 - Created the new "p_stdprecision" parameter to use the standard precision of the document currency to round the taxes correctly when searching for the tax line adjustment that stays closest to the original amount.

5- C_ORDERLINETAX_ROUNDING_AMT:
   5.1 - Removed the "p_linefrom" as it is always using its default value (0) and the condition (and line > p_linefrom) where it is used it is always true.

6- C_ORDERTAX_ROUNDING:
   6.1 - Created the new "p_stdprecision" parameter to use the standard precision of the document currency to round the taxes correctly when searching for the tax line adjustment that stays closest to the original amount.
N/A
Remove the "p_linefrom" parameter from those functions are using it.
Add the new "p_stdprecision" parameter to those functions will using it.
Approved
blocks design defect 00381633.0PR18Q2 closed markmm82 Tax calculation adjustment must be done in the highest variance tax 
diff 38163.diff (17,815) 2018-03-22 20:55
https://issues.openbravo.com/file_download.php?file_id=11670&type=bug
Issue History
2018-03-22 20:53markmm82New Issue
2018-03-22 20:53markmm82Assigned To => Triage Finance
2018-03-22 20:53markmm82Modules => Core
2018-03-22 20:53markmm82Triggers an Emergency Pack => No
2018-03-22 20:54markmm82Relationship addedcaused by 0038163
2018-03-22 20:55markmm82File Added: 38163.diff
2018-03-22 20:58markmm82Note Added: 0103446
2018-03-23 09:25aferrazDescription Updatedbug_revision_view_page.php?rev_id=16923#r16923
2018-03-23 09:25aferrazNote Edited: 0103446bug_revision_view_page.php?bugnote_id=0103446#r16925
2018-03-23 09:43aferrazNote Added: 0103465
2018-03-23 11:28aferrazRelationship replaceddepends on 0038163
2018-03-23 11:30aferrazAssigned ToTriage Finance => dmitry_mezentsev
2018-03-23 11:30aferrazCategoryZ. Others => 09. Financial management
2018-03-23 19:22dmitry_mezentsevTag Attached: Approved
2018-03-26 12:34aferrazAssigned Todmitry_mezentsev => markmm82
2018-03-26 18:16hgbotCheckin
2018-03-26 18:16hgbotNote Added: 0103536
2018-03-26 18:16hgbotStatusnew => resolved
2018-03-26 18:16hgbotResolutionopen => fixed
2018-03-26 18:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/api-checks/rev/25d8ddb5f22a2d5a7b6ddaee0bfee43e0f4e6edb [^]
2018-03-26 18:17aferrazRelationship replacedblocks 0038163
2018-03-26 18:33aferrazReview Assigned To => aferraz
2018-03-26 18:33aferrazNote Added: 0103544
2018-03-26 18:33aferrazStatusresolved => closed
2018-03-26 18:33aferrazFixed in Version => 3.0PR18Q2
2018-03-26 18:33aferrazTarget Version => 3.0PR18Q2

Notes
(0103446)
markmm82   
2018-03-22 20:58   
(edited on: 2018-03-23 09:25)
Try-API failure:
https://ci.openbravo.com/view/try/job/try-api/5894/console [^]

[checkAPI] 11474 ERROR -
 [checkAPI]
 [checkAPI] 11477 ERROR - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 11481 ERROR - Errors in API model validation
 [checkAPI] 11484 ERROR - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 11488 ERROR - Changed parameters for function: C_INVOICELINETAX_ROUNDING_AMT from C_INVOICELINETAX_ROUNDING_AMT(VARCHAR, VARCHAR, NUMERIC, NUMERIC) to C_INVOICELINETAX_ROUNDING_AMT(VARCHAR, VARCHAR, NUMERIC)
 [checkAPI] 11492 ERROR - Changed parameters for function: C_INVOICETAX_ROUNDING from C_INVOICETAX_ROUNDING(VARCHAR, NUMERIC, NUMERIC) to C_INVOICETAX_ROUNDING(VARCHAR, NUMERIC, NUMERIC, NUMERIC)
 [checkAPI] 11495 ERROR - Changed parameters for function: C_ORDERLINETAX_ROUNDING_AMT from C_ORDERLINETAX_ROUNDING_AMT(VARCHAR, VARCHAR, NUMERIC, NUMERIC) to C_ORDERLINETAX_ROUNDING_AMT(VARCHAR, VARCHAR, NUMERIC)
 [checkAPI] 11498 ERROR - Changed parameters for function: C_ORDERTAX_ROUNDING from C_ORDERTAX_ROUNDING(VARCHAR, NUMERIC, NUMERIC) to C_ORDERTAX_ROUNDING(VARCHAR, NUMERIC, NUMERIC, NUMERIC)
 [checkAPI] 11502 ERROR -
 [checkAPI]

(0103465)
aferraz   
2018-03-23 09:43   
Searching for updated functions in forge modules:

openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_INVOICELINETAX_ROUNDING" .
openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_INVOICELINETAX_ROUNDING_AMT" .
openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_INVOICETAX_ROUNDING" .
openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_ORDERLINETAX_ROUNDING" .
./fr.phidias.openbravo.countermark/src-db/database/model/functions/PHCTMK_ORDER_COMPLETE.xml: C_ORDERLINETAX_ROUNDING(Cur_Tax.C_OrderLine_ID, Cur_Tax.line_gross_amount, Cur_Tax.LineNetAmt);
Binary file ./it.extrasys.uomcp/build/classes/it/extrasys/uomcp/UpdateConvert.class matches
./it.extrasys.uomcp/src-util/modulescript/src/it/extrasys/uomcp/UpdateConvert.java: + " PERFORM C_ORDERLINETAX_ROUNDING(Cur_Tax.C_OrderLine_ID, Cur_Tax.line_gross_amount, Cur_Tax.LineNetAmt);"
openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_ORDERLINETAX_ROUNDING_AMT" .
openbravo@por0965:~/workspace/pi_forge_modules$ grep -ri "C_ORDERTAX_ROUNDING" .
./fr.phidias.openbravo.countermark/src-db/database/model/functions/PHCTMK_ORDER_COMPLETE.xml: C_ORDERTAX_ROUNDING(p_order_id, xGrandTotal, xTotalLines);
Binary file ./it.extrasys.uomcp/build/classes/it/extrasys/uomcp/UpdateConvert.class matches
./it.extrasys.uomcp/src-util/modulescript/src/it/extrasys/uomcp/UpdateConvert.java: + " PERFORM C_ORDERTAX_ROUNDING(v_Record_ID, xGrandTotal, xTotalLines);"
(0103536)
hgbot   
2018-03-26 18:16   
Repository: erp/devel/api-checks
Changeset: 25d8ddb5f22a2d5a7b6ddaee0bfee43e0f4e6edb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 26 18:15:57 2018 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/25d8ddb5f22a2d5a7b6ddaee0bfee43e0f4e6edb [^]

Fixes issue 38207: API change for issue 38163

---
M model/src-db/database/model/functions/C_INVOICELINETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_INVOICELINETAX_ROUNDING_AMT.xml
M model/src-db/database/model/functions/C_INVOICETAX_ADJUSTMENT.xml
M model/src-db/database/model/functions/C_INVOICETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_ORDERLINETAX_ROUNDING.xml
M model/src-db/database/model/functions/C_ORDERLINETAX_ROUNDING_AMT.xml
M model/src-db/database/model/functions/C_ORDERTAX_ADJUSTMENT.xml
M model/src-db/database/model/functions/C_ORDERTAX_ROUNDING.xml
M model/src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M model/src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
---
(0103544)
aferraz   
2018-03-26 18:33   
Code review OK