details:   /erp/devel/pi/rev/46657e4bb4ad
changeset: 6488:46657e4bb4ad
user:      Sathiyan Sivaprakasam <sathiyan.sivaprakasam <at> openbravo.com>
date:      Thu Feb 25 13:33:59 2010 +0530
summary:   Fixes Issue 12246: Uncorrect name in bank.dat

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CreateFile34_data.xsql |  4 +++-
 src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql   |  6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (50 lines):

diff -r 6a6147f9d298 -r 46657e4bb4ad 
src/org/openbravo/erpCommon/ad_actionButton/CreateFile34_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFile34_data.xsql        
Thu Feb 25 12:29:24 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFile34_data.xsql        
Thu Feb 25 13:33:59 2010 +0530
@@ -34,7 +34,7 @@
     
LPAD(B.CODEBANK,4,'0')||LPAD(B.CODEBRANCH,4,'0')||LPAD(ba.CODEACCOUNT,10,'0')   
     AS N_CUENTA,
     LPAD(B.DIGITCONTROL||ba.DIGITCONTROL,2,'0')                                
          AS DC,
     REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(UPPER(
-    RPAD(C.NAME,36)
+    RPAD(O.NAME,36)
     ),'Á','A'),'É','E'),'Í','I'),'Ó','O'),'Ú','U')                             
          AS NOMBRE,
     REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(UPPER(
     RPAD(l.Address1||' '||l.Address2,36)
@@ -58,10 +58,12 @@
            ad_client        c,
            c_Bank           b,
            ad_orgInfo       oi,
+           ad_org           o,
            c_remittance     r,
            c_Location       l
      where c.Ad_Client_ID = r.AD_Client_Id
        and r.AD_ORG_ID = oi.ad_org_id
+       and oi.ad_org_id = o.ad_org_id
        and r.C_BANKACCOUNT_ID = ba.c_bankAccount_id
        and b.c_bank_id = ba.c_bank_Id
        and oi.C_Location_ID = l.C_location_ID
diff -r 6a6147f9d298 -r 46657e4bb4ad 
src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql  Thu Feb 
25 12:29:24 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql  Thu Feb 
25 13:33:59 2010 +0530
@@ -31,7 +31,7 @@
                                select B.NAME AS BANK,b.codebank, b.codebranch, 
b.DIGITCONTROL as digitcontrol1, ba.DIGITCONTROL as digitcontrol2,
       ba.CODEACCOUNT,
                        
LPAD(B.CODEBANK,4,'0')||LPAD(B.CODEBRANCH,4,'0')||B.DIGITCONTROL||ba.DIGITCONTROL||LPAD(ba.CODEACCOUNT,10,'0')
 AS N_CUENTA,
-      lpad(rpad(c.NAME,40,' '),46,' ') AS ENTIDAD, rpad(c.NAME,40,' ') AS 
ENTIDAD19, oi.TAXID AS NIF, TO_CHAR(r.Duedate  
,'DD')||TO_CHAR(r.Duedate,'MM')||TO_CHAR(r.Duedate,'YY')AS DATEPLANNED, 
TO_CHAR(now(), 'DD')||TO_CHAR(now(), 'MM')||TO_CHAR(now(), 'YY') AS HOY,
+      lpad(rpad(o.NAME,40,' '),46,' ') AS ENTIDAD, rpad(o.NAME,40,' ') AS 
ENTIDAD19, oi.TAXID AS NIF, TO_CHAR(r.Duedate  
,'DD')||TO_CHAR(r.Duedate,'MM')||TO_CHAR(r.Duedate,'YY')AS DATEPLANNED, 
TO_CHAR(now(), 'DD')||TO_CHAR(now(), 'MM')||TO_CHAR(now(), 'YY') AS HOY,
                        
LPAD(RPAD(LPAD(B.CODEBANK,4,'0')||LPAD(B.CODEBRANCH,4,'0'),74,' '),94,' ') AS 
ENTOFI, LPAD(B.INE_NUMBER,61,' ') AS INE,
                        '' AS TERCERO,
       '' AS FECHA_FACTURA, '' AS FECHA_VENCIMIENTO, '' AS PAYAMT, '' AS 
CREDITCARDNUMBER, '' AS N_FACTURA, '' AS N_FACTURA19, '' AS CIUDAD, '' AS 
DIRECCION,
@@ -39,9 +39,11 @@
       from c_remittance r, ad_client c,
                                         c_bankAccount          ba,
                                         c_Bank                                 
        b,
-                                        ad_orgInfo                             
oi
+                                        ad_orgInfo                             
oi,
+                     ad_org                 o
                 where r.ad_client_id = c.ad_client_id
                         and   r.AD_ORG_ID = oi.ad_org_id
+             and oi.ad_org_id  = o.ad_org_id
                         and r.C_BANKACCOUNT_ID = ba.c_bankAccount_id
                         and b.c_bank_id = ba.c_bank_Id
        and r.C_Remittance_ID = ?

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to