Openbravo Issue Tracking System - Modules
View Issue Details
0029983ModulesSEPA Direct Debit Customer-to-Bankpublic2015-05-22 14:232015-05-27 18:43
ngarcia 
jorge-garcia 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
36154
OBPS
0029983: Bank Instruction description's last character is removed when adding it to the ustrd field
Bank Instruction description's last character is removed when adding it to the ustrd field
As group admin role:
   Create a Remittance with Remittance type "SEPA Core Direct Debit Customer-to-Bank (pain.008.001.02)" and process it
   Check a Bank Instructions record has a description and if not add it
   Create Remittance File and check the last character is removed from that description
   Repeat the process with "SEPA Core Direct Debit Customer-to-Bank (pain.008.001.03)" and check the same problem happens
The problem is in the following code of the CoreDirectDebit.java file:

          remInfo7.getUstrd()
              .add(
                  parseText(line.getDescription().substring(
                      0,
                      line.getDescription().length() > 140 ? 139
                          : line.getDescription().length() - 1)));
No tags attached.
related to defect 0029984 closed jorge-garcia Bank Instruction description's last character is removed when adding it to the ustrd field 
Issue History
2015-05-22 14:23ngarciaNew Issue
2015-05-22 14:23ngarciaAssigned To => Triage Finance
2015-05-22 14:23ngarciaSupport ticket => 36154
2015-05-22 14:23ngarciaOBNetwork customer => Yes
2015-05-22 14:24ngarciaIssue cloned0029984
2015-05-22 14:24ngarciaCategorySEPA Credit Transfer Customer-to-Bank => SEPA Direct Debit Customer-to-Bank
2015-05-22 14:25ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8647#r8647
2015-05-22 14:25ngarciaIssue Monitored: networkb
2015-05-22 14:28ngarciaResolution time => 1435269600
2015-05-22 14:28ngarciaProposed Solution updated
2015-05-22 14:31ngarciaRelationship addedrelated to 0029984
2015-05-27 16:45jorge-garciaNote Added: 0077826
2015-05-27 16:46jorge-garciaStatusnew => scheduled
2015-05-27 16:46jorge-garciaAssigned ToTriage Finance => jorge-garcia
2015-05-27 18:42hgbotCheckin
2015-05-27 18:42hgbotNote Added: 0077834
2015-05-27 18:42hgbotStatusscheduled => resolved
2015-05-27 18:42hgbotResolutionopen => fixed
2015-05-27 18:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.coredirectdebit.customertobank/rev/61c90b1fd05de1b5ec866a0ad35f5a72ae31aebe [^]
2015-05-27 18:43vmromanosReview Assigned To => vmromanos
2015-05-27 18:43vmromanosNote Added: 0077839
2015-05-27 18:43vmromanosStatusresolved => closed

Notes
(0077826)
jorge-garcia   
2015-05-27 16:45   
Test Plan

As group admin role:
   Create a Remittance with Remittance type "SEPA Core Direct Debit Customer-to-Bank (pain.008.001.02)" and process it.
   Check a Bank Instructions record has a description and if not add it (try to insert a description with more than/less than/equal to 140 characters).
   Create Remittance File and check that the description is filled correctly
   Repeat the process with "SEPA Core Direct Debit Customer-to-Bank (pain.008.001.03)" and check the description is filled correctly.
(0077834)
hgbot   
2015-05-27 18:42   
Repository: erp/pmods/org.openbravo.sepa.iso20022.coredirectdebit.customertobank
Changeset: 61c90b1fd05de1b5ec866a0ad35f5a72ae31aebe
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed May 27 16:19:49 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.coredirectdebit.customertobank/rev/61c90b1fd05de1b5ec866a0ad35f5a72ae31aebe [^]

Fixed issue 29983: Bank Instruction description's last character is removed

Bank Instruction description's last character is removed when adding it to the
USTRD field.

The problem was that the description only takes the first 139 characters instead
of the 140 allowed. Also, if you have blank spaces before and after the
description, these blank spaces counts for the count of the string and the
description is filled wrong. If the string length was smaller than 140
characters, the last character of the string is also deleted.

The solution is to check if the string has more than 140 characters. If so, we
retrieve the first 140 characters excluding blank spaces. If is lesser than 140
characters, the function don't do anything.

---
M src/org/openbravo/sepa/iso20022/coredirectdebit/customertobank/pain/x008/x001/x02/report/CoreDirectDebit.java
M src/org/openbravo/sepa/iso20022/coredirectdebit/customertobank/pain/x008/x001/x03/report/CoreDirectDebit.java
---
(0077839)
vmromanos   
2015-05-27 18:43   
Code review + testing OK

Available in SEPA Direct Debit Customer-to-Bank (CORE and B2B) 1.0.7 or higher