';
// Show filter box
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 250605f386b..3663e71ffde 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2687,7 +2687,7 @@ else if ($id > 0 || ! empty($ref))
print $formconfirm;
-
+
// Invoice content
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index c45e52bec39..bd0bbaf121e 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -2660,77 +2660,77 @@ class Facture extends CommonInvoice
}
- /**
- * Return list of invoices (eventually filtered on a user) into an array
- *
- * @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
- * @param int $draft 0=not draft, 1=draft
- * @param User $excluser Objet user to exclude
- * @param int $socid Id third pary
- * @param int $limit For pagination
- * @param int $offset For pagination
- * @param string $sortfield Sort criteria
- * @param string $sortorder Sort order
- * @return int -1 if KO, array with result if OK
- */
- function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
- {
- global $conf,$user;
-
- $ga = array();
-
- $sql = "SELECT s.rowid, s.nom as name, s.client,";
- $sql.= " f.rowid as fid, f.facnumber as ref, f.datef as df";
- if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
- $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
- if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
- $sql.= " WHERE f.entity = ".$conf->entity;
- $sql.= " AND f.fk_soc = s.rowid";
- if (! $user->rights->societe->client->voir && ! $socid) //restriction
- {
- $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
- }
- if ($socid) $sql.= " AND s.rowid = ".$socid;
- if ($draft) $sql.= " AND f.fk_statut = 0";
- if (is_object($excluser)) $sql.= " AND f.fk_user_author <> ".$excluser->id;
- $sql.= $this->db->order($sortfield,$sortorder);
- $sql.= $this->db->plimit($limit,$offset);
-
- $result=$this->db->query($sql);
- if ($result)
- {
- $numc = $this->db->num_rows($result);
- if ($numc)
- {
- $i = 0;
- while ($i < $numc)
- {
- $obj = $this->db->fetch_object($result);
-
- if ($shortlist == 1)
- {
- $ga[$obj->fid] = $obj->ref;
- }
- else if ($shortlist == 2)
- {
- $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')';
- }
- else
- {
- $ga[$i]['id'] = $obj->fid;
- $ga[$i]['ref'] = $obj->ref;
- $ga[$i]['name'] = $obj->name;
- }
- $i++;
- }
- }
- return $ga;
- }
- else
- {
- dol_print_error($this->db);
- return -1;
- }
+ /**
+ * Return list of invoices (eventually filtered on a user) into an array
+ *
+ * @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
+ * @param int $draft 0=not draft, 1=draft
+ * @param User $excluser Objet user to exclude
+ * @param int $socid Id third pary
+ * @param int $limit For pagination
+ * @param int $offset For pagination
+ * @param string $sortfield Sort criteria
+ * @param string $sortorder Sort order
+ * @return int -1 if KO, array with result if OK
+ */
+ function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
+ {
+ global $conf,$user;
+
+ $ga = array();
+
+ $sql = "SELECT s.rowid, s.nom as name, s.client,";
+ $sql.= " f.rowid as fid, f.facnumber as ref, f.datef as df";
+ if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
+ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
+ if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
+ $sql.= " WHERE f.entity = ".$conf->entity;
+ $sql.= " AND f.fk_soc = s.rowid";
+ if (! $user->rights->societe->client->voir && ! $socid) //restriction
+ {
+ $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
+ }
+ if ($socid) $sql.= " AND s.rowid = ".$socid;
+ if ($draft) $sql.= " AND f.fk_statut = 0";
+ if (is_object($excluser)) $sql.= " AND f.fk_user_author <> ".$excluser->id;
+ $sql.= $this->db->order($sortfield,$sortorder);
+ $sql.= $this->db->plimit($limit,$offset);
+
+ $result=$this->db->query($sql);
+ if ($result)
+ {
+ $numc = $this->db->num_rows($result);
+ if ($numc)
+ {
+ $i = 0;
+ while ($i < $numc)
+ {
+ $obj = $this->db->fetch_object($result);
+
+ if ($shortlist == 1)
+ {
+ $ga[$obj->fid] = $obj->ref;
+ }
+ else if ($shortlist == 2)
+ {
+ $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')';
+ }
+ else
+ {
+ $ga[$i]['id'] = $obj->fid;
+ $ga[$i]['ref'] = $obj->ref;
+ $ga[$i]['name'] = $obj->name;
+ }
+ $i++;
+ }
+ }
+ return $ga;
+ }
+ else
+ {
+ dol_print_error($this->db);
+ return -1;
+ }
}
@@ -3121,7 +3121,7 @@ class Facture extends CommonInvoice
$this->total_tva += $line->total_tva;
$this->total_ttc += $line->total_ttc;
}
- $this->revenuestamp = 0;
+ $this->revenuestamp = 0;
// Add a line "offered"
$line=new FactureLigne($this->db);
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 4abff5b63be..ffdc17e0e63 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -54,8 +54,8 @@ $endyear=$year;
* View
*/
-$langs->load("bills");
-$langs->load("companies");
+$langs->load("bills");
+$langs->load("companies");
$form=new Form($db);
diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php
index 8a24ab3ce29..3251b4a1ab6 100644
--- a/htdocs/compta/paiement/cheque/fiche.php
+++ b/htdocs/compta/paiement/cheque/fiche.php
@@ -29,9 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load('bills');
$langs->load('companies');
$langs->load('compta');
diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php
index cfde42a5cf3..80ea9ea6817 100644
--- a/htdocs/compta/paiement/cheque/index.php
+++ b/htdocs/compta/paiement/cheque/index.php
@@ -26,9 +26,9 @@
require('../../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+
+$langs->load("banks");
+$langs->load("categories");
// Security check
if ($user->societe_id) $socid=$user->societe_id;
diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php
index 8370bd95551..705bc15eb88 100644
--- a/htdocs/compta/paiement/cheque/liste.php
+++ b/htdocs/compta/paiement/cheque/liste.php
@@ -26,9 +26,9 @@
require('../../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("bills");
// Security check
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index e5dd9e60ea4..7ef5f44fb88 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -392,7 +392,7 @@ class Paiement extends CommonObject
$this->error='Bad value for parameter accountid';
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error, LOG_ERR);
return -1;
- }
+ }
$this->db->begin();
diff --git a/htdocs/compta/prelevement/bon.php b/htdocs/compta/prelevement/bon.php
index 89b40e095bc..b1bcbb3d04b 100644
--- a/htdocs/compta/prelevement/bon.php
+++ b/htdocs/compta/prelevement/bon.php
@@ -27,10 +27,10 @@ require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("bills");
$langs->load("categories");
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index ce33322d03a..8f2d336defe 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -26,10 +26,10 @@
require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("widthdrawals");
// Security check
diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index f9d770111a7..ddf8a988b48 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("widthdrawals");
$langs->load("companies");
$langs->load("bills");
diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php
index 3012a70bd55..3ae2b850aac 100644
--- a/htdocs/compta/prelevement/demandes.php
+++ b/htdocs/compta/prelevement/demandes.php
@@ -28,10 +28,10 @@ require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("widthdrawals");
$langs->load("companies");
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index ec8eaa51479..115a7829374 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("companies");
$langs->load('withdrawals');
$langs->load('bills');
diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php
index c77a0ab6682..87516c3ad65 100644
--- a/htdocs/compta/prelevement/fiche-rejet.php
+++ b/htdocs/compta/prelevement/fiche-rejet.php
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load('withdrawals');
$langs->load('bills');
diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php
index 161df078aae..5fcd70b1a9b 100644
--- a/htdocs/compta/prelevement/fiche-stat.php
+++ b/htdocs/compta/prelevement/fiche-stat.php
@@ -27,11 +27,11 @@ require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
-$langs->load("withdrawals");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
+$langs->load("withdrawals");
// Security check
if ($user->societe_id > 0) accessforbidden();
diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php
index a7ebf00c950..22af3b3548d 100644
--- a/htdocs/compta/prelevement/fiche.php
+++ b/htdocs/compta/prelevement/fiche.php
@@ -26,10 +26,10 @@
require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
if (!$user->rights->prelevement->bons->lire)
accessforbidden();
diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php
index d3823cc130e..56a7529fd9a 100644
--- a/htdocs/compta/prelevement/index.php
+++ b/htdocs/compta/prelevement/index.php
@@ -31,10 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("withdrawals");
// Security check
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index 28358dc75f5..54aaf02841a 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
// Security check
if ($user->societe_id > 0) accessforbidden();
diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php
index 445f1e66755..c322142b6a9 100644
--- a/htdocs/compta/prelevement/lignes.php
+++ b/htdocs/compta/prelevement/lignes.php
@@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
// Security check
if ($user->societe_id > 0) accessforbidden();
diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php
index d3d8634d64a..cd09dc6cf25 100644
--- a/htdocs/compta/prelevement/liste.php
+++ b/htdocs/compta/prelevement/liste.php
@@ -26,9 +26,9 @@
require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
$langs->load("withdrawals");
$langs->load("companies");
$langs->load("categories");
diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php
index b33a5fd2455..5744ab0eb7b 100644
--- a/htdocs/compta/prelevement/rejets.php
+++ b/htdocs/compta/prelevement/rejets.php
@@ -28,10 +28,10 @@ require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("withdrawals");
$langs->load("companies");
diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php
index 34ffdb168b5..418d733dbd4 100644
--- a/htdocs/compta/prelevement/stats.php
+++ b/htdocs/compta/prelevement/stats.php
@@ -26,10 +26,10 @@
require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
-require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
-
-$langs->load("banks");
-$langs->load("categories");
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+$langs->load("banks");
+$langs->load("categories");
$langs->load("withdrawals");
$langs->load("companies");
diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php
index a31b4030b65..f36fd0be5a5 100644
--- a/htdocs/compta/tva/fiche.php
+++ b/htdocs/compta/tva/fiche.php
@@ -41,7 +41,7 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', '', '', 'charges');
-$tva = new Tva($db);
+$tva = new Tva($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('taxvatcard'));
@@ -54,7 +54,7 @@ $hookmanager->initHooks(array('taxvatcard'));
if ($_POST["cancel"] == $langs->trans("Cancel"))
{
- header("Location: reglement.php");
+ header("Location: reglement.php");
exit;
}
@@ -231,9 +231,9 @@ if ($id)
print $vatpayment->ref;
print '';
- // Label
- print '
";
print '| '.$langs->trans("DatePayment").' | ';
print dol_print_date($vatpayment->datep,'day');
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index fb1ce97fd01..90bd7861435 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -1009,13 +1009,13 @@ class Contact extends CommonObject
$this->country = 'France';
$this->email = 'specimen@specimen.com';
- $this->phone_pro = '0909090901';
- $this->phone_perso = '0909090902';
- $this->phone_mobile = '0909090903';
- $this->fax = '0909090909';
+ $this->phone_pro = '0909090901';
+ $this->phone_perso = '0909090902';
+ $this->phone_mobile = '0909090903';
+ $this->fax = '0909090909';
- $this->note_public='This is a comment (public)';
- $this->note_private='This is a comment (private)';
+ $this->note_public='This is a comment (public)';
+ $this->note_private='This is a comment (private)';
$socid = rand(1, $num_socs);
$this->socid = $socids[$socid];
diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php
index c876c67fe01..27a56b48825 100644
--- a/htdocs/contact/note.php
+++ b/htdocs/contact/note.php
@@ -27,7 +27,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$action = GETPOST('action');
@@ -66,7 +66,7 @@ else if ($action == 'setnote_private' && $user->rights->societe->creer)
* View
*/
-$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
+$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
$form = new Form($db);
@@ -90,68 +90,68 @@ if ($id > 0)
print '';
- $linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| '.$langs->trans("Ref").' | ';
- print $form->showrefnav($object, 'id', $linkback);
- print ' | ';
-
- // Name
- print '| '.$langs->trans("Lastname").' / '.$langs->trans("Label").' | '.$object->lastname.' | ';
- print ''.$langs->trans("Firstname").' | '.$object->firstname.' | ';
-
- // Company
- if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
- {
- if ($object->socid > 0)
- {
- $objsoc = new Societe($db);
- $objsoc->fetch($object->socid);
-
- print '| '.$langs->trans("Company").' | '.$objsoc->getNomUrl(1).' | ';
- }
-
- else
- {
- print '| '.$langs->trans("Company").' | ';
- print $langs->trans("ContactNotLinkedToCompany");
- print ' | ';
- }
- }
-
- // Civility
- print '| '.$langs->trans("UserTitle").' | ';
- print $object->getCivilityLabel();
- print ' | ';
-
- // Date To Birth
- print '';
- if (! empty($object->birthday))
- {
- include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
-
- print '| '.$langs->trans("DateToBirth").' | '.dol_print_date($object->birthday,"day");
-
- print ' ';
- //var_dump($birthdatearray);
- $ageyear=convertSecondToTime($now-$object->birthday,'year')-1970;
- $agemonth=convertSecondToTime($now-$object->birthday,'month')-1;
- if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')';
- else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')';
- else print '('.$agemonth.' '.$langs->trans("DurationMonth").')';
-
-
- print ' - ';
- if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn");
- else print $langs->trans("BirthdayAlertOff");
- print ' | ';
- }
- else
- {
- print ''.$langs->trans("DateToBirth").' | '.$langs->trans("Unknown")." | ";
- }
- print " ";
+ $linkback = ''.$langs->trans("BackToList").'';
+
+ // Ref
+ print '| '.$langs->trans("Ref").' | ';
+ print $form->showrefnav($object, 'id', $linkback);
+ print ' | ';
+
+ // Name
+ print '| '.$langs->trans("Lastname").' / '.$langs->trans("Label").' | '.$object->lastname.' | ';
+ print ''.$langs->trans("Firstname").' | '.$object->firstname.' | ';
+
+ // Company
+ if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
+ {
+ if ($object->socid > 0)
+ {
+ $objsoc = new Societe($db);
+ $objsoc->fetch($object->socid);
+
+ print '| '.$langs->trans("Company").' | '.$objsoc->getNomUrl(1).' | ';
+ }
+
+ else
+ {
+ print '| '.$langs->trans("Company").' | ';
+ print $langs->trans("ContactNotLinkedToCompany");
+ print ' | ';
+ }
+ }
+
+ // Civility
+ print '| '.$langs->trans("UserTitle").' | ';
+ print $object->getCivilityLabel();
+ print ' | ';
+
+ // Date To Birth
+ print '';
+ if (! empty($object->birthday))
+ {
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+
+ print '| '.$langs->trans("DateToBirth").' | '.dol_print_date($object->birthday,"day");
+
+ print ' ';
+ //var_dump($birthdatearray);
+ $ageyear=convertSecondToTime($now-$object->birthday,'year')-1970;
+ $agemonth=convertSecondToTime($now-$object->birthday,'month')-1;
+ if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')';
+ else if ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')';
+ else print '('.$agemonth.' '.$langs->trans("DurationMonth").')';
+
+
+ print ' - ';
+ if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn");
+ else print $langs->trans("BirthdayAlertOff");
+ print ' | ';
+ }
+ else
+ {
+ print ''.$langs->trans("DateToBirth").' | '.$langs->trans("Unknown")." | ";
+ }
+ print " ";
print " ";
diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php
index ad0da9451e9..d0b59b67dd7 100644
--- a/htdocs/core/boxes/box_activity.php
+++ b/htdocs/core/boxes/box_activity.php
@@ -42,21 +42,21 @@ class box_activity extends ModeleBoxes
var $info_box_contents = array();
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- * @param string $param More parameters
- */
- function __construct($db,$param)
- {
- global $conf;
-
- $this->db=$db;
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ * @param string $param More parameters
+ */
+ function __construct($db,$param)
+ {
+ global $conf;
+
+ $this->db=$db;
// FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software.
// FIXME: Removed number_format (not compatible with all languages)
// FIXME: Pb into some status
- $this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous FIXME)
+ $this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous FIXME)
}
/**
diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php
index 3ec5add8a05..5bce26306f3 100644
--- a/htdocs/core/boxes/box_graph_invoices_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_permonth.php
@@ -39,18 +39,18 @@ class box_graph_invoices_permonth extends ModeleBoxes
var $info_box_contents = array();
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- * @param string $param More parameters
- */
- function __construct($db,$param)
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ * @param string $param More parameters
+ */
+ function __construct($db,$param)
{
global $conf;
-
- $this->db=$db;
- $this->enabled=$conf->global->MAIN_FEATURES_LEVEL;
+
+ $this->db=$db;
+ $this->enabled=$conf->global->MAIN_FEATURES_LEVEL;
}
/**
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 2cbf113b362..419174a31dc 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -81,24 +81,24 @@ abstract class CommonObject
return dol_trunc($ret,$maxlen);
}
- /**
- * Return full address of contact
- *
- * @param int $withcountry 1=Add country into address string
- * @param string $sep Separator to use to build string
- * @return string Full address string
- */
- function getFullAddress($withcountry=0,$sep="\n")
- {
- if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
- {
- require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
- $tmparray=getCountry($this->country_id,'all');
- $this->country_code=$tmparray['code'];
- $this->country =$tmparray['label'];
- }
+ /**
+ * Return full address of contact
+ *
+ * @param int $withcountry 1=Add country into address string
+ * @param string $sep Separator to use to build string
+ * @return string Full address string
+ */
+ function getFullAddress($withcountry=0,$sep="\n")
+ {
+ if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
+ {
+ require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
+ $tmparray=getCountry($this->country_id,'all');
+ $this->country_code=$tmparray['code'];
+ $this->country =$tmparray['label'];
+ }
- return dol_format_address($this, $withcountry, $sep);
+ return dol_format_address($this, $withcountry, $sep);
}
/**
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index a7a8fe04903..4ce1bbf8c3d 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -63,11 +63,11 @@ class Conf
//! Used to store list of entities to use for each element
public $entities = array();
- public $dol_hide_topmenu; // Set if we force param dol_hide_topmenu into login url
- public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
- public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
- public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
- public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
+ public $dol_hide_topmenu; // Set if we force param dol_hide_topmenu into login url
+ public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
+ public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
+ public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
+ public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
/**
diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index 58c7063e40a..43722bb59f2 100755
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -166,8 +166,8 @@ class HookManager
}
}
- if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
- if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
+ if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
+ if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
}
// Generic hooks that return a string or array (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
else
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 6501dd94ef8..d68d9c8d59f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -702,13 +702,13 @@ class Form
$selected_input_value=$product->ref;
}
=======
- if ($selected && empty($selected_input_value))
- {
- require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
- $product = new Product($this->db);
- $product->fetch($selected);
- $selected_input_value=$product->ref;
- }
+ if ($selected && empty($selected_input_value))
+ {
+ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+ $product = new Product($this->db);
+ $product->fetch($selected);
+ $selected_input_value=$product->ref;
+ }
>>>>>>> refs/remotes/origin/3.3
// mode=1 means customers products
$ajaxoptions=array();
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index b7477c203f5..ef8422a7dbc 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -230,7 +230,7 @@ class FormActions
//asort($arraylist);
if ($selected == 'manual') $selected='AC_OTH';
- if ($selected == 'auto') $selected='AC_OTH_AUTO';
+ if ($selected == 'auto') $selected='AC_OTH_AUTO';
print $form->selectarray($htmlname, $arraylist, $selected);
if ($user->admin && empty($onlyautoornot)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 5d2fbf4f225..f8f2503c9a7 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -383,18 +383,18 @@ class FormFile
$buttonlabeltoshow=$buttonlabel;
if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
-
-// Keep this. Used for test with jmobile
-/*print '
-
-';*/
+
+// Keep this. Used for test with jmobile
+/*print '
+
+';*/
if (empty($noform)) $out.= ' |