Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036453Openbravo ERP09. Financial managementpublic2017-07-10 18:102017-07-31 11:03
shuehner 
markmm82 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q4 
aferraz
Core
No
0036453: plpgsql_check tool finds a number of issues in pl-functions & trigger in mod-functional-basic modules
The new plpgsql_check tool finds a number of issues in modules in the ci job mod-functional-basic:

The check is already running in the job and output saved as new plpgsql_check.log artifact.

Quick review of list shows:
1.) First issue maybe real functional bug (type mismatch)
2.) All others seem to be simple code cleanup only (unused variables in pl code)

Note: When checking for unused variables careful to check case-insentively!
the mod-functional-basic output for plpgsql_check warnings
Alternatively run plgpsql_check yourself
-
No tags attached.
Issue History
2017-07-10 18:10shuehnerNew Issue
2017-07-10 18:10shuehnerAssigned To => Triage Finance
2017-07-10 18:10shuehnerModules => Core
2017-07-10 18:10shuehnerTriggers an Emergency Pack => No
2017-07-10 18:20aferrazAssigned ToTriage Finance => markmm82
2017-07-10 18:27markmm82Statusnew => scheduled
2017-07-26 13:44hgbotCheckin
2017-07-26 13:44hgbotNote Added: 0098224
2017-07-26 13:44hgbotStatusscheduled => resolved
2017-07-26 13:44hgbotResolutionopen => fixed
2017-07-26 13:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/b67683eae490aa1800b8b246841c8fcae1cfe760 [^]
2017-07-26 13:45hgbotCheckin
2017-07-26 13:45hgbotNote Added: 0098225
2017-07-26 13:45hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/b67683eae490aa1800b8b246841c8fcae1cfe760 [^] => http://code.openbravo.com/erp/mods/org.openbravo.financial.accounttreeexport/rev/f5040b884892ae54fed0e5544f23967a24dc92b2 [^]
2017-07-26 13:45hgbotCheckin
2017-07-26 13:45hgbotNote Added: 0098226
2017-07-26 13:45hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/mods/org.openbravo.financial.accounttreeexport/rev/f5040b884892ae54fed0e5544f23967a24dc92b2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.financial.multitaxcategory/rev/ecb8d9a4f5f205edf1f89f505485f9d7ff7933cd [^]
2017-07-26 13:46hgbotCheckin
2017-07-26 13:46hgbotNote Added: 0098227
2017-07-26 13:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.financial.multitaxcategory/rev/ecb8d9a4f5f205edf1f89f505485f9d7ff7933cd [^] => http://code.openbravo.com/erp/pmods/org.openbravo.creditmanagement.dunning/rev/c87cf281fdf8e353bf6b03a3400d84b2b6fb794e [^]
2017-07-26 13:46hgbotCheckin
2017-07-26 13:46hgbotNote Added: 0098228
2017-07-26 13:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.creditmanagement.dunning/rev/c87cf281fdf8e353bf6b03a3400d84b2b6fb794e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.module.intrastat/rev/9b477569d6a0c665a34bea6899bbf44f203139db [^]
2017-07-26 13:47hgbotCheckin
2017-07-26 13:47hgbotNote Added: 0098229
2017-07-26 13:47hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.module.intrastat/rev/9b477569d6a0c665a34bea6899bbf44f203139db [^] => http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/fa8ee8aeec30fdd86991617322c4e5e630436531 [^]
2017-07-26 13:47hgbotCheckin
2017-07-26 13:47hgbotNote Added: 0098230
2017-07-26 17:07hgbotCheckin
2017-07-26 17:07hgbotNote Added: 0098231
2017-07-26 17:07hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/fa8ee8aeec30fdd86991617322c4e5e630436531 [^] => http://code.openbravo.com/erp/mods/org.openbravo.financial.accounttreeexport/rev/32e02917e3ed9e8fa4229cd0832f18d81a1df306 [^]
2017-07-26 17:24hgbotCheckin
2017-07-26 17:24hgbotNote Added: 0098232
2017-07-27 10:20hgbotCheckin
2017-07-27 10:20hgbotNote Added: 0098240
2017-07-31 11:03aferrazReview Assigned To => aferraz
2017-07-31 11:03aferrazNote Added: 0098271
2017-07-31 11:03aferrazStatusresolved => closed
2017-07-31 11:03aferrazFixed in Version => 3.0PR17Q4

Notes
(0098224)
hgbot   
2017-07-26 13:44   
Repository: erp/pmods/org.openbravo.accrualsanddeferrals
Changeset: b67683eae490aa1800b8b246841c8fcae1cfe760
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 15:10:51 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/b67683eae490aa1800b8b246841c8fcae1cfe760 [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Fixed the following functions and triggers:
ACCDEF_GENERATE_PLAN
- Avoid error when days between two dates is calculated by subtracting them, and
  using the result to compare with an integer value. To avoid it, this date difference
  is assigned to a numeric variable before doing the comparison with the numeric value.

Removed unused variables:

ACCDEF_UNPOST
- v_Posted
- v_Count
- v_Updated
- v_Deleted
- v_rowcount
- v_Message
- p_PInstance_ID

ACCDEF_PLAN_CHK_TRG
- v_Prec

ACCDEF_PLAN_LINE_CHK_TRG
- v_Prec
- v_Currency

---
M src-db/database/model/functions/ACCDEF_GENERATE_PLAN.xml
M src-db/database/model/functions/ACCDEF_UNPOST.xml
M src-db/database/model/triggers/ACCDEF_PLAN_CHK_TRG.xml
M src-db/database/model/triggers/ACCDEF_PLAN_LINE_CHK_TRG.xml
---
(0098225)
hgbot   
2017-07-26 13:45   
Repository: erp/mods/org.openbravo.financial.accounttreeexport
Changeset: f5040b884892ae54fed0e5544f23967a24dc92b2
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 16:00:24 2017 -0400
URL: http://code.openbravo.com/erp/mods/org.openbravo.financial.accounttreeexport/rev/f5040b884892ae54fed0e5544f23967a24dc92b2 [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in the following functions:
OBFATE_EXPORT_ACCOUNTTREE
- V_DEFAULT

OBFATE_GETDEFAULT
- V_C_ACCTSCHEMA_DEFAULT_ID

---
M src-db/database/model/functions/OBFATE_EXPORT_ACCOUNTTREE.xml
M src-db/database/model/functions/OBFATE_GETDEFAULT.xml
---
(0098226)
hgbot   
2017-07-26 13:45   
Repository: erp/pmods/org.openbravo.financial.multitaxcategory
Changeset: ecb8d9a4f5f205edf1f89f505485f9d7ff7933cd
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 15:41:52 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.financial.multitaxcategory/rev/ecb8d9a4f5f205edf1f89f505485f9d7ff7933cd [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in OBFMTC_GET_PRODUCT_TAXCATEGORY:
- v_Sql

---
M src-db/database/model/functions/OBFMTC_GET_PRODUCT_TAXCATEGORY.xml
---
(0098227)
hgbot   
2017-07-26 13:46   
Repository: erp/pmods/org.openbravo.creditmanagement.dunning
Changeset: c87cf281fdf8e353bf6b03a3400d84b2b6fb794e
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 15:33:17 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.creditmanagement.dunning/rev/c87cf281fdf8e353bf6b03a3400d84b2b6fb794e [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in DUN_FINPAYMENTSCH_TRG:
- v_IsEmployee
- v_NewDueDate

---
M src-db/database/model/triggers/DUN_FINPAYMENTSCH_TRG.xml
---
(0098228)
hgbot   
2017-07-26 13:46   
Repository: erp/pmods/org.openbravo.module.intrastat
Changeset: 9b477569d6a0c665a34bea6899bbf44f203139db
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 15:39:06 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.intrastat/rev/9b477569d6a0c665a34bea6899bbf44f203139db [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in the following functions:
INTR_C_BPARTNER_EU
- v_Message

INTR_C_INVOICELINE_TRG
- v_iscustomer

INTR_C_ORDERLINE_TRG
- v_iscustomer

INTR_M_INOUTLINE_TRG
- v_iscustomer

---
M src-db/database/model/functions/INTR_C_BPARTNER_EU.xml
M src-db/database/model/triggers/INTR_C_INVOICELINE_TRG.xml
M src-db/database/model/triggers/INTR_C_ORDERLINE_TRG.xml
M src-db/database/model/triggers/INTR_M_INOUTLINE_TRG.xml
---
(0098229)
hgbot   
2017-07-26 13:47   
Repository: erp/pmods/org.openbravo.interco
Changeset: fa8ee8aeec30fdd86991617322c4e5e630436531
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 15:19:29 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/fa8ee8aeec30fdd86991617322c4e5e630436531 [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in the following functions:
INTERCO_AUTO_SETTLEMENT
- v_AD_Org_ID
- v_created
- v_updated
- v_status

INTERCO_CREATE_INVOICE
- v_pricelistversion
- v_price

INTERCO_CREATE_ORDER
- v_isacctle
- v_org_bule_id
- v_available_period
- v_pricelistversion
- v_price
- v_matchingAmt

---
M src-db/database/model/functions/INTERCO_AUTO_SETTLEMENT.xml
M src-db/database/model/functions/INTERCO_CREATE_INVOICE.xml
M src-db/database/model/functions/INTERCO_CREATE_ORDER.xml
---
(0098230)
hgbot   
2017-07-26 13:47   
Repository: erp/pmods/org.openbravo.interco
Changeset: bf666dc5d8791676f8c5180e40e192b1f5b165cf
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jul 26 13:32:50 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.interco/rev/bf666dc5d8791676f8c5180e40e192b1f5b165cf [^]

Related to issue 36453: Code review improvements

---
M src-db/database/model/functions/INTERCO_AUTO_SETTLEMENT.xml
M src-db/database/model/functions/INTERCO_CREATE_INVOICE.xml
---
(0098231)
hgbot   
2017-07-26 17:07   
Repository: erp/mods/org.openbravo.financial.accounttreeexport
Changeset: 32e02917e3ed9e8fa4229cd0832f18d81a1df306
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 12 16:00:24 2017 -0400
URL: http://code.openbravo.com/erp/mods/org.openbravo.financial.accounttreeexport/rev/32e02917e3ed9e8fa4229cd0832f18d81a1df306 [^]

Fixes issue 36453: plpgsql_check tool finds a number of issues in pl-functions
& trigger in mod-functional-basic modules

Removed unused variables in the following functions:
OBFATE_EXPORT_ACCOUNTTREE
- V_DEFAULT

OBFATE_GETDEFAULT
- V_C_ACCTSCHEMA_DEFAULT_ID

---
M src-db/database/model/functions/OBFATE_EXPORT_ACCOUNTTREE.xml
M src-db/database/model/functions/OBFATE_GETDEFAULT.xml
---
(0098232)
hgbot   
2017-07-26 17:24   
Repository: erp/pmods/org.openbravo.accrualsanddeferrals
Changeset: cd836a3b7825805f168a461704df5e344bc78065
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Jul 26 17:19:53 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/cd836a3b7825805f168a461704df5e344bc78065 [^]

Related to issue 36453: Code review improvements

---
M src-db/database/model/functions/ACCDEF_GENERATE_PLAN.xml
---
(0098240)
hgbot   
2017-07-27 10:20   
Repository: erp/pmods/org.openbravo.accrualsanddeferrals
Changeset: 63221d9cc4b30a12272c50d5a44f5cf4dda9975c
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 27 10:17:16 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.accrualsanddeferrals/rev/63221d9cc4b30a12272c50d5a44f5cf4dda9975c [^]

Related to issue 36453: Code review improvements

Remove v_MonthNo variable declaration as it is automatically declared inside FOR loop.

---
M src-db/database/model/functions/ACCDEF_GENERATE_PLAN.xml
---
(0098271)
aferraz   
2017-07-31 11:03   
Code review OK