Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005697Openbravo ERPF. Localizationpublic2008-10-28 15:262008-12-13 18:34
rcordovin 
vmromanos 
normalmajoralways
closedfixed 
5
pi 
 
Core
No
0005697: CreateFile creates several lines for each remittance line
The file created has than one line for each remittance line if a Business Partner has more than one active Bank Account.
1. Create a Business Partner with more than one actives Bank Accounts
2. Create a Debt Payment for the BP just created.
3. Create a Remittance with the Debt Payment just created.
4. Process and Create File.

The file created has as many lines as Bank Accounts the Business Partner has.
We check in the code if any of the remittance lines has a Business Partner with more than one active Bank Accounts. If so, we throw a message that inform the user that this has to be fixed manually.

The code is:

---- (CreateFile_data.xsql)

  <SqlMethod name="selectComprobacion5" type="preparedStatement" return="multiple" audit="false">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
        select c_bpartner.name as name
        from c_remittanceline
        inner join c_debt_payment on (c_debt_payment.c_debt_payment_id= c_remittanceline.c_debt_payment_id)
        inner join c_bp_bankaccount on (c_bp_bankaccount.c_bpartner_id= c_debt_payment.c_bpartner_id and c_bp_bankaccount.isactive='Y')
        inner join c_bpartner on (c_bp_bankaccount.c_bpartner_id= c_bpartner.c_bpartner_id)
        where c_remittanceline.C_Remittance_ID = ?
        group by c_debt_payment.c_bpartner_id,c_bpartner.name, c_remittanceline.c_debt_payment_id
        having count(*)>1
    ]]>
    </Sql>
    <Parameter name="cRemittanceId"/>
    </SqlMethod>

---- (CreateFile.java)

  CreateFileData[]comprobacion5=CreateFileData.selectComprobacion5(this,vars,strKey);
for (int i=0;i<comprobacion5.length;i++){ strMessage=strMessage+"\\n"+Utility.messageBD(this,"CodeBankBPErrorMultiple",vars.getLanguage())+comprobacion5[i].name;
}
if (!strMessage.equals("")){
      printPage(response, vars, strKey, "", "", strMessage);
No tags attached.
depends on backport 0005797 closed vmromanos CreateFile creates several lines for each remittance line 
has duplicate defect 0005880 closed dalsasua Spanish bank rule 34: Does not manage business partner bank accounts properly 
Issue History
2008-10-28 15:26rcordovinNew Issue
2008-10-28 15:26rcordovinAssigned To => cromero
2008-10-28 15:26rcordovinsf_bug_id0 => 2204266
2008-11-03 11:30rafarodaStatusnew => scheduled
2008-11-03 11:30rafarodaAssigned Tocromero => vmromanos
2008-11-03 11:30rafarodafix_in_branch => trunk
2008-11-21 08:55vmromanosNote Added: 0010494
2008-11-21 08:55vmromanosStatusscheduled => feedback
2008-11-24 12:35rafarodaNote Added: 0010557
2008-11-24 12:35rafarodaStatusfeedback => scheduled
2008-11-24 20:08svnbotCheckin
2008-11-24 20:08svnbotNote Added: 0010587
2008-11-24 20:08svnbotStatusscheduled => resolved
2008-11-24 20:08svnbotResolutionopen => fixed
2008-11-24 20:08svnbotsvn_revision => 10497
2008-12-13 18:34psarobeRegression testing => No
2008-12-13 18:34psarobeStatusresolved => closed
2008-12-15 15:25dalsasuaRelationship addedhas duplicate 0005880

Notes
(0010494)
vmromanos   
2008-11-21 08:55   
I have followed the steps to reproduce the bug but I am unable to do it.

I've created two remittances in tecnicia14 (types Consolidated and Non-Consolidated) and both files have only one line with one of the two configured bank accounts for the Business Partner.


Please, could you give more details in order to reproduce the bug?
(0010557)
rafaroda   
2008-11-24 12:35   
Solution proposed: if one of the Business Partners has more than one bank account active, display a message saying for which Business Partner this happens and proposing to deactivate all his bank accounts but the one that one wants to be used.
(0010587)
svnbot   
2008-11-24 20:08   
Repository: openbravo
Revision: 10497
Author: vmromanos
Date: 2008-11-24 20:08:25 +0100 (Mon, 24 Nov 2008)

Fixed bug 0005697: CreateFile creates several lines for each remittance line

---
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateFile.java
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql
U trunk/src-db/database/sourcedata/AD_MESSAGE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=10497&sc=1 [^]