Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040848Openbravo ERP09. Financial managementpublic2019-04-09 20:312019-05-23 17:29
shuehner 
nonofrancisco 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q2.13.0PR19Q2.1 
Sandrahuguet
Core
No
0040848: 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.0PR19Q2
2019-05-23 16:24SandrahuguetTarget Version3.0PR19Q2 => 3.0PR19Q2.1
2019-05-23 17:27hgbotCheckin
2019-05-23 17:27hgbotNote Added: 0112100
2019-05-23 17:27hgbotStatusscheduled => resolved
2019-05-23 17:27hgbotResolutionopen => fixed
2019-05-23 17:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q2.1/rev/f14dc55b25f0d4fe5d886ffefba6ce732796ab11 [^]
2019-05-23 17:29SandrahuguetReview Assigned To => Sandrahuguet
2019-05-23 17:29SandrahuguetNote Added: 0112101
2019-05-23 17:29SandrahuguetStatusresolved => closed
2019-05-23 17:29SandrahuguetFixed in Version => 3.0PR19Q2.1

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

Fixes issue 40848: 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
---
(0112101)
Sandrahuguet   
2019-05-23 17:29   
Code review + testing ok