From 395209a5dbaee724a516e2958d505deaa56212dd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Sep 2014 15:17:05 +0200 Subject: [PATCH 1/3] Fix: Reason to have button greyed is wrong Conflicts: htdocs/compta/facture/prelevement.php --- htdocs/compta/facture/prelevement.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index e579bc21640..81505af34ee 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * @@ -142,7 +142,7 @@ if ($object->id > 0) /* * Facture - */ + */ print ''; $linkback = ''.$langs->trans("BackToList").''; @@ -450,7 +450,7 @@ if ($object->id > 0) /* * Buttons - */ + */ print "\n
\n"; // Add a withdraw request @@ -467,7 +467,11 @@ if ($object->id > 0) } else { - if ($num == 0) print ''.$langs->trans("MakeWithdrawRequest").''; + if ($num == 0) + { + if ($object->statut > 0) print ''.$langs->trans("MakeWithdrawRequest").''; + else print ''.$langs->trans("MakeWithdrawRequest").''; + } else print ''.$langs->trans("MakeWithdrawRequest").''; } From b88b4fbc2cbf1f50852aa7ac2be6b8ae1415e126 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Sep 2014 14:43:16 +0200 Subject: [PATCH 2/3] Fix: bad balance of td --- htdocs/core/class/html.formfile.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9299702a1bb..1cdf6fd194e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1148,7 +1148,7 @@ class FormFile print ''; print '
'; print ''; - print ''; @@ -1163,7 +1163,7 @@ class FormFile print ''; print ''; print ''; - print ''; } From da8a1cb47507cfcb2fea6888b8166c71df5fdf0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Sep 2014 15:38:20 +0200 Subject: [PATCH 3/3] Fix: Iban was used instead of Bic into SEPA file. Fix: Must unaccent strings into SEPA file. --- ChangeLog | 2 ++ .../class/bonprelevement.class.php | 27 ++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e060f84ad15..f8193c0ce1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,8 @@ For users: - Fix: Trigger on create category call failed because user is not passed on card - Fix: list event view lost type event filter - Fix: Save also code event +- Fix: Iban was used instead of Bic into SEPA file. +- Fix: Must unaccent strings into SEPA file. ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 417f4362000..5c21c3c5fbf 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1219,11 +1219,11 @@ class BonPrelevement extends CommonObject /** - * Generate a withdrawal file. Generation Formats: - * France: CFONB - * Spain: AEB19 (if external module EsAEB is enabled) - * Others: Warning message - * File is generated with name this->filename + * Generate a withdrawal file. + * Generation Formats: + * - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled) + * - Others countries: Warning message + * File is generated with name this->filename * * @return int 0 if OK, <0 if KO */ @@ -1410,7 +1410,7 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ''.$CrLf); - + $sql = "SELECT pl.amount"; $sql.= " FROM"; $sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; @@ -1419,14 +1419,14 @@ class BonPrelevement extends CommonObject $sql.= " WHERE pl.fk_prelevement_bons = ".$this->id; $sql.= " AND pl.rowid = pf.fk_prelevement_lignes"; $sql.= " AND pf.fk_facture = f.rowid"; - + //Lines $i = 0; $resql=$this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - + while ($i < $num) { $obj = $this->db->fetch_object($resql); @@ -1574,7 +1574,7 @@ class BonPrelevement extends CommonObject * @param string $row_bic rib.bic AS bic, * @param string $row_datec soc.datec, * @param string $row_drum soc.rowid AS drum - * @return void + * @return string Return string with SEPA part DrctDbtTxInf */ function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum) { @@ -1598,15 +1598,15 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; - $XML_DEBITOR .=' '.$row_iban.''.$CrLf; + $XML_DEBITOR .=' '.$row_bic.''.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; - $XML_DEBITOR .=' '.strtoupper($row_nom).''.$CrLf; + $XML_DEBITOR .=' '.strtoupper(dol_string_unaccent($row_nom)).''.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$row_country_code.''.$CrLf; $XML_DEBITOR .=' '.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).''.$CrLf; - $XML_DEBITOR .=' '.$row_zip.' '.$row_town.''.$CrLf; + $XML_DEBITOR .=' '.dol_string_unaccent($row_zip.' '.$row_town).''.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; @@ -1689,7 +1689,8 @@ class BonPrelevement extends CommonObject } /** - * Write sender of request (me) + * Write sender of request (me). + * Note: The tag PmtInf is opened here but closed into caller * * @param string $configuration conf * @param date $ladate Date
' . dol_print_date(dol_now(), "dayhour", "tzuser") . ''; + print ''; print ''; print ''; print '' . dol_print_date($link->datea, "dayhour", "tzuser") . ''; + print ''; print '' . img_edit() . ''; // id= is included into $param if ($permtodelete) { print '   ' . img_delete() . ''; // id= is included into $param @@ -1176,7 +1176,7 @@ class FormFile } if ($nboflinks == 0) { - print '
'; + print '
'; print $langs->trans("NoLinkFound"); print '