diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 7baf2986c65..d87317e2420 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -1908,14 +1908,14 @@ class BonPrelevement extends CommonObject
$XML_CREDITOR .= ' '.round($row_somme, 2).''.$CrLf;
$XML_CREDITOR .= ' '.$CrLf;
/*
- $XML_CREDITOR .= ' '.$CrLf;
- $XML_CREDITOR .= ' '.$CrLf;
- $XML_CREDITOR .= ' '.$Rum.''.$CrLf;
- $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf;
- $XML_CREDITOR .= ' false'.$CrLf;
- $XML_CREDITOR .= ' '.$CrLf;
- $XML_CREDITOR .= ' '.$CrLf;
- */
+ $XML_CREDITOR .= ' '.$CrLf;
+ $XML_CREDITOR .= ' '.$CrLf;
+ $XML_CREDITOR .= ' '.$Rum.''.$CrLf;
+ $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf;
+ $XML_CREDITOR .= ' false'.$CrLf;
+ $XML_CREDITOR .= ' '.$CrLf;
+ $XML_CREDITOR .= ' '.$CrLf;
+ */
//$XML_CREDITOR .= ' SLEV'.$CrLf;
$XML_CREDITOR .= ' '.$CrLf;
$XML_CREDITOR .= ' '.$CrLf;
@@ -2195,17 +2195,17 @@ class BonPrelevement extends CommonObject
$XML_SEPA_INFO .= ' '.$CrLf;*/
$XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV
/*$XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' SEPA'.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;
- $XML_SEPA_INFO .= ' '.$CrLf;*/
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' SEPA'.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;
+ $XML_SEPA_INFO .= ' '.$CrLf;*/
}
} else {
fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf);
@@ -2343,59 +2343,59 @@ class BonPrelevement extends CommonObject
}
/*
- if ($mode == 'direct_debit') {
- $sql = "SELECT b.rowid, f.datedue as datefin";
- $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
- $sql .= " WHERE f.entity IN (".getEntity('facture').")";
- $sql .= " AND f.total_ttc > 0";
- } else {
- $sql = "SELECT b.rowid, f.datedue as datefin";
- $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
- $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")";
- $sql .= " AND f.total_ttc > 0";
- }
+ if ($mode == 'direct_debit') {
+ $sql = "SELECT b.rowid, f.datedue as datefin";
+ $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
+ $sql .= " WHERE f.entity IN (".getEntity('facture').")";
+ $sql .= " AND f.total_ttc > 0";
+ } else {
+ $sql = "SELECT b.rowid, f.datedue as datefin";
+ $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
+ $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")";
+ $sql .= " AND f.total_ttc > 0";
+ }
- $resql = $this->db->query($sql);
- if ($resql) {
- $langs->load("banks");
- $now = dol_now();
+ $resql = $this->db->query($sql);
+ if ($resql) {
+ $langs->load("banks");
+ $now = dol_now();
- $response = new WorkboardResponse();
- if ($mode == 'direct_debit') {
- $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24;
- $response->label = $langs->trans("PendingDirectDebitToComplete");
- $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort");
- $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank';
- } else {
- $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24;
- $response->label = $langs->trans("PendingCreditTransferToComplete");
- $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort");
- $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank';
- }
- $response->img = img_object('', "payment");
+ $response = new WorkboardResponse();
+ if ($mode == 'direct_debit') {
+ $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24;
+ $response->label = $langs->trans("PendingDirectDebitToComplete");
+ $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort");
+ $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank';
+ } else {
+ $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24;
+ $response->label = $langs->trans("PendingCreditTransferToComplete");
+ $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort");
+ $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank';
+ }
+ $response->img = img_object('', "payment");
- while ($obj = $this->db->fetch_object($resql)) {
- $response->nbtodo++;
+ while ($obj = $this->db->fetch_object($resql)) {
+ $response->nbtodo++;
- if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) {
- $response->nbtodolate++;
- }
- }
+ if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) {
+ $response->nbtodolate++;
+ }
+ }
- $response->nbtodo = 0;
- $response->nbtodolate = 0;
- // Return workboard only if quantity is not 0
- if ($response->nbtodo) {
- return $response;
- } else {
- return 0;
- }
- } else {
- dol_print_error($this->db);
- $this->error = $this->db->error();
- return -1;
- }
- */
+ $response->nbtodo = 0;
+ $response->nbtodolate = 0;
+ // Return workboard only if quantity is not 0
+ if ($response->nbtodo) {
+ return $response;
+ } else {
+ return 0;
+ }
+ } else {
+ dol_print_error($this->db);
+ $this->error = $this->db->error();
+ return -1;
+ }
+ */
return 0;
}
}
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index de14cae280b..ad52907983f 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -131,7 +131,7 @@ function testSqlAndScriptInject($val, $type)
$inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login
$inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database
$inj += preg_match('/