Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040849Openbravo ERP09. Financial managementpublic2019-04-09 20:312019-05-23 17:29
shuehner 
nonofrancisco 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q1.23.0PR19Q1.2 
Sandrahuguet
Core
No
0040849: AcctServer.isConveritble is not using bind-parameters
4 cases in this methods are not using bind-parameters


          conversionQuery = OBDal.getInstance()
              .createQuery(ConversionRateDoc.class, "invoice = '" + Record_ID + "' and currency='"
                  + currency + "' and toCurrency='" + acctSchema.m_C_Currency_ID + "'");
        } else if (AD_Table_ID.equals(TABLEID_Payment)) {
          conversionQuery = OBDal.getInstance()
              .createQuery(ConversionRateDoc.class, "payment = '" + Record_ID + "' and currency='"
                  + currency + "' and toCurrency='" + acctSchema.m_C_Currency_ID + "'");
        } else if (AD_Table_ID.equals(TABLEID_Transaction)) {
          conversionQuery = OBDal.getInstance()
              .createQuery(ConversionRateDoc.class,
                  "financialAccountTransaction = '" + Record_ID + "' and currency='" + currency
                      + "' and toCurrency='" + acctSchema.m_C_Currency_ID + "'");
        } else if (AD_Table_ID.equals(TABLEID_GLJournal)) {
          conversionQuery = OBDal.getInstance()
              .createQuery(ConversionRateDoc.class,
                  "journalEntry = '" + Record_ID + "' and currency='" + currency
                      + "' and toCurrency='" + acctSchema.m_C_Currency_ID + "'");
-
No tags attached.
blocks defect 0040560 closed nonofrancisco AcctServer.isConveritble is not using bind-parameters 
Issue History
2019-05-12 16:01nonofranciscoTypedefect => backport
2019-05-12 16:01nonofranciscoTarget Version => 3.0PR19Q1.2
2019-05-23 17:05hgbotCheckin
2019-05-23 17:05hgbotNote Added: 0112099
2019-05-23 17:05hgbotStatusscheduled => resolved
2019-05-23 17:05hgbotResolutionopen => fixed
2019-05-23 17:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/126f82691b4812bb82b3ca7517315beca4821c97 [^]
2019-05-23 17:29SandrahuguetReview Assigned To => Sandrahuguet
2019-05-23 17:29SandrahuguetNote Added: 0112102
2019-05-23 17:29SandrahuguetStatusresolved => closed
2019-05-23 17:29SandrahuguetFixed in Version => 3.0PR19Q1.2

Notes
(0112099)
hgbot   
2019-05-23 17:05   
Repository: erp/backports/3.0PR19Q1.2
Changeset: 126f82691b4812bb82b3ca7517315beca4821c97
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Mon Apr 22 15:49:11 2019 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1.2/rev/126f82691b4812bb82b3ca7517315beca4821c97 [^]

Fixes issue 40849: Uses bind parameters in query

When creating the query to get exchange rates by documents, instead of use
string concatenation, bind parameters are uses.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
---
(0112102)
Sandrahuguet   
2019-05-23 17:29   
code review + testing ok