Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033125Openbravo ERP09. Financial managementpublic2016-06-02 18:522016-06-02 18:52
shuehner 
Triage Omni OMS 
normaltrivialhave not tried
newopen 
5
 
 
Core
No
0033125: Minor cleanup in AdvPaymentMngtDao.getFinancialAccountPaymentMethod to simplify code
Small clean up + maybe style improvement

That function add an extra isActive filter even is same is auto-added by dal filtering (at sql level) twice of isActive true.

Also i has a slightly strange way to get for 'rows found' via capturing IndexOutOfBoundsException instead of a simple != null

(end of ) SQL run for the function:
ticurrency as Payin29_266_0_, this_.Payout_IsMulticurrency as Payout30_266_0_, this_.Isdefault as Isdefault266_0_, this_.Payin_Invoicepaidstatus as Payin32_266_0_, this_.Payout_Invoicepaidstatus as Payout33_266_0_ from FIN_FinAcc_PaymentMethod this_ where this_.FIN_Financial_Account_ID=$1 and this_.FIN_Paymentmethod_ID=$2 and this_.Isactive=$3 and this_.Isactive=$4
  parameters: $1 = 'DC15B7D80B3A4C6D80D0558A2EC5922D', $2 = '29F862983F3B45739C1507E416123129', $3 = 'Y', $4 = 'Y'

notice the double isactive filter mentioned above
-
No tags attached.
diff 33125.diff (1,421) 2016-06-02 18:52
https://issues.openbravo.com/file_download.php?file_id=9477&type=bug
Issue History
2016-06-02 18:52shuehnerNew Issue
2016-06-02 18:52shuehnerAssigned To => Triage Finance
2016-06-02 18:52shuehnerModules => Core
2016-06-02 18:52shuehnerTriggers an Emergency Pack => No
2016-06-02 18:52shuehnerFile Added: 33125.diff
2016-06-02 18:52shuehnerNote Added: 0086957

Notes
(0086957)
shuehner   
2016-06-02 18:52   
Note: patch is untested