| ';
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index b436f5fb776..e8b4818c860 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -223,10 +223,10 @@ if ($resql)
print ' | '.$objp->ref_client.' | ';
// Date
- $y = dolibarr_print_date($objp->date_commande,'%Y');
- $m = dolibarr_print_date($objp->date_commande,'%m');
- $ml = dolibarr_print_date($objp->date_commande,'%B');
- $d = dolibarr_print_date($objp->date_commande,'%d');
+ $y = dol_print_date($objp->date_commande,'%Y');
+ $m = dol_print_date($objp->date_commande,'%m');
+ $ml = dol_print_date($objp->date_commande,'%B');
+ $d = dol_print_date($objp->date_commande,'%d');
print '';
print $d;
print ' '.$ml.'';
@@ -243,7 +243,7 @@ if ($resql)
}
else
{
- print dolibarr_print_error($db);
+ print dol_print_error($db);
}
$db->close();
diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php
index dc30f43ca14..2f63397adf2 100644
--- a/htdocs/commande/note.php
+++ b/htdocs/commande/note.php
@@ -50,7 +50,7 @@ $ref= $_GET['ref'];
$commande = new Commande($db);
if (! $commande->fetch($_GET['id'],$_GET['ref']) > 0)
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
@@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref))
$head = commande_prepare_head($commande);
- dolibarr_fiche_head($head, 'note', $langs->trans("CustomerOrder"));
+ dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"));
print '';
diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php
index f506caae1f3..d72cb9bf042 100644
--- a/htdocs/commande/stats/month.php
+++ b/htdocs/commande/stats/month.php
@@ -140,7 +140,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id)
diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php
index aad56a340a4..a69bf05a834 100644
--- a/htdocs/commonobject.class.php
+++ b/htdocs/commonobject.class.php
@@ -17,45 +17,45 @@
*/
/**
- \file htdocs/commonobject.class.php
- \ingroup core
- \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...)
- \version $Id$
-*/
+ \file htdocs/commonobject.class.php
+ \ingroup core
+ \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...)
+ \version $Id$
+ */
/**
- \class CommonObject
- \brief Classe mere pour h�ritage des classes metiers
-*/
+ \class CommonObject
+ \brief Classe mere pour h�ritage des classes metiers
+ */
class CommonObject
{
/**
- * \brief Ajoute un contact associ� au l'entit� d�finie dans $this->element
- * \param fk_socpeople Id du contact a ajouter
+ * \brief Ajoute un contact associe au l'entite definie dans $this->element
+ * \param fk_socpeople Id du contact a ajouter
* \param type_contact Type de contact (code ou id)
- * \param source external=Contact externe (llx_socpeople), internal=Contact interne (llx_user)
- * \return int <0 si erreur, >0 si ok
- */
+ * \param source external=Contact externe (llx_socpeople), internal=Contact interne (llx_user)
+ * \return int <0 si erreur, >0 si ok
+ */
function add_contact($fk_socpeople, $type_contact, $source='external')
{
global $langs;
- dolibarr_syslog("CommonObject::add_contact $fk_socpeople, $type_contact, $source");
+ dol_syslog("CommonObject::add_contact $fk_socpeople, $type_contact, $source");
// V�rification parametres
if ($fk_socpeople <= 0)
{
$this->error=$langs->trans("ErrorWrongValueForParameter","1");
- dolibarr_syslog("CommonObject::add_contact ".$this->error,LOG_ERR);
+ dol_syslog("CommonObject::add_contact ".$this->error,LOG_ERR);
return -1;
}
if (! $type_contact)
{
$this->error=$langs->trans("ErrorWrongValueForParameter","2");
- dolibarr_syslog("CommonObject::add_contact ".$this->error,LOG_ERR);
+ dol_syslog("CommonObject::add_contact ".$this->error,LOG_ERR);
return -2;
}
@@ -80,24 +80,24 @@ class CommonObject
}
}
- $datecreate = time();
+ $datecreate = time();
- // Insertion dans la base
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
- $sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
- $sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
+ // Insertion dans la base
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
+ $sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
+ $sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
$sql.= $this->db->idate($datecreate);
$sql.= ", 4, '". $id_type_contact . "' ";
- $sql.= ")";
- dolibarr_syslog("CommonObject::add_contact sql=".$sql);
+ $sql.= ")";
+ dol_syslog("CommonObject::add_contact sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
- {
- return 1;
- }
- else
- {
+ {
+ return 1;
+ }
+ else
+ {
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$this->db->errno();
@@ -106,287 +106,287 @@ class CommonObject
else
{
$this->error=$this->db->error()." - $sql";
- dolibarr_syslog($this->error,LOG_ERR);
+ dol_syslog($this->error,LOG_ERR);
return -1;
}
- }
+ }
}
- /**
+ /**
* \brief Mise a jour du statut d'un contact
- * \param rowid La reference du lien contact-entit�
- * \param statut Le nouveau statut
- * \param type_contact_id Description du type de contact
- * \return int <0 si erreur, =0 si ok
- */
+ * \param rowid La reference du lien contact-entit�
+ * \param statut Le nouveau statut
+ * \param type_contact_id Description du type de contact
+ * \return int <0 si erreur, =0 si ok
+ */
function update_contact($rowid, $statut, $type_contact_id)
{
- // Insertion dans la base
- $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set";
- $sql.= " statut = ".$statut.",";
- $sql.= " fk_c_type_contact = '".$type_contact_id ."'";
- $sql.= " where rowid = ".$rowid;
- // Retour
- if ( $this->db->query($sql) )
- {
- return 0;
- }
- else
- {
- dolibarr_print_error($this->db);
- return -1;
- }
- }
+ // Insertion dans la base
+ $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set";
+ $sql.= " statut = ".$statut.",";
+ $sql.= " fk_c_type_contact = '".$type_contact_id ."'";
+ $sql.= " where rowid = ".$rowid;
+ // Retour
+ if ( $this->db->query($sql) )
+ {
+ return 0;
+ }
+ else
+ {
+ dol_print_error($this->db);
+ return -1;
+ }
+ }
/**
- * \brief Supprime une ligne de contact
- * \param rowid La reference du contact
- * \return statur >0 si ok, <0 si ko
- */
- function delete_contact($rowid)
- {
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
- $sql.= " WHERE rowid =".$rowid;
+ * \brief Supprime une ligne de contact
+ * \param rowid La reference du contact
+ * \return statur >0 si ok, <0 si ko
+ */
+ function delete_contact($rowid)
+ {
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
+ $sql.= " WHERE rowid =".$rowid;
- dolibarr_syslog("CommonObject::delete_contact sql=".$sql);
- if ($this->db->query($sql))
- {
- return 1;
- }
- else
- {
+ dol_syslog("CommonObject::delete_contact sql=".$sql);
+ if ($this->db->query($sql))
+ {
+ return 1;
+ }
+ else
+ {
$this->error=$this->db->lasterror();
- dolibarr_syslog("CommonObject::delete_contact error=".$this->error, LOG_ERR);
- return -1;
- }
- }
+ dol_syslog("CommonObject::delete_contact error=".$this->error, LOG_ERR);
+ return -1;
+ }
+ }
- /**
- * \brief R�cup�re les lignes de contact de l'objet
- * \param statut Statut des lignes detail � r�cup�rer
- * \param source Source du contact external (llx_socpeople) ou internal (llx_user)
- * \return array Tableau des rowid des contacts
- */
- function liste_contact($statut=-1,$source='external')
- {
- global $langs;
+ /**
+ * \brief R�cup�re les lignes de contact de l'objet
+ * \param statut Statut des lignes detail � r�cup�rer
+ * \param source Source du contact external (llx_socpeople) ou internal (llx_user)
+ * \return array Tableau des rowid des contacts
+ */
+ function liste_contact($statut=-1,$source='external')
+ {
+ global $langs;
- $tab=array();
+ $tab=array();
- $sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id,";
- if ($source == 'internal') $sql.=" '-1' as socid,";
- if ($source == 'external') $sql.=" t.fk_soc as socid,";
- $sql.=" t.name as nom,";
- $sql.= "tc.source, tc.element, tc.code, tc.libelle";
- $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc,";
- $sql.= " ".MAIN_DB_PREFIX."element_contact ec";
- if ($source == 'internal') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."user t on ec.fk_socpeople = t.rowid";
- if ($source == 'external') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."socpeople t on ec.fk_socpeople = t.rowid";
- $sql.= " WHERE ec.element_id =".$this->id;
- $sql.= " AND ec.fk_c_type_contact=tc.rowid";
- $sql.= " AND tc.element='".$this->element."'";
- if ($source == 'internal') $sql.= " AND tc.source = 'internal'";
- if ($source == 'external') $sql.= " AND tc.source = 'external'";
- $sql.= " AND tc.active=1";
- if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'";
- $sql.=" ORDER BY t.name ASC";
+ $sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id,";
+ if ($source == 'internal') $sql.=" '-1' as socid,";
+ if ($source == 'external') $sql.=" t.fk_soc as socid,";
+ $sql.=" t.name as nom,";
+ $sql.= "tc.source, tc.element, tc.code, tc.libelle";
+ $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc,";
+ $sql.= " ".MAIN_DB_PREFIX."element_contact ec";
+ if ($source == 'internal') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."user t on ec.fk_socpeople = t.rowid";
+ if ($source == 'external') $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."socpeople t on ec.fk_socpeople = t.rowid";
+ $sql.= " WHERE ec.element_id =".$this->id;
+ $sql.= " AND ec.fk_c_type_contact=tc.rowid";
+ $sql.= " AND tc.element='".$this->element."'";
+ if ($source == 'internal') $sql.= " AND tc.source = 'internal'";
+ if ($source == 'external') $sql.= " AND tc.source = 'external'";
+ $sql.= " AND tc.active=1";
+ if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'";
+ $sql.=" ORDER BY t.name ASC";
- dolibarr_syslog("CommonObject::liste_contact sql=".$sql);
- $resql=$this->db->query($sql);
- if ($resql)
- {
- $num=$this->db->num_rows($resql);
- $i=0;
- while ($i < $num)
- {
- $obj = $this->db->fetch_object($resql);
+ dol_syslog("CommonObject::liste_contact sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ $num=$this->db->num_rows($resql);
+ $i=0;
+ while ($i < $num)
+ {
+ $obj = $this->db->fetch_object($resql);
- $transkey="TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
- $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
- $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,'nom'=>$obj->nom,
+ $transkey="TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
+ $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
+ $tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,'nom'=>$obj->nom,
'rowid'=>$obj->rowid,'code'=>$obj->code,'libelle'=>$libelle_type,'status'=>$obj->statut);
- $i++;
- }
- return $tab;
- }
- else
- {
- $this->error=$this->db->error();
- dolibarr_print_error($this->db);
- return -1;
- }
- }
+ $i++;
+ }
+ return $tab;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ dol_print_error($this->db);
+ return -1;
+ }
+ }
- /**
- * \brief Le d�tail d'un contact
- * \param rowid L'identifiant du contact
- * \return object L'objet construit par DoliDb.fetch_object
- */
- function detail_contact($rowid)
- {
- $sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,";
- $sql.= " tc.code, tc.libelle,";
- $sql.= " s.fk_soc";
- $sql.= " FROM (".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc)";
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as s ON ec.fk_socpeople=s.rowid"; // Si contact de type external, alors il est li� � une societe
- $sql.= " WHERE ec.rowid =".$rowid;
- $sql.= " AND ec.fk_c_type_contact=tc.rowid";
- $sql.= " AND tc.element = '".$this->element."'";
+ /**
+ * \brief Le detail d'un contact
+ * \param rowid L'identifiant du contact
+ * \return object L'objet construit par DoliDb.fetch_object
+ */
+ function detail_contact($rowid)
+ {
+ $sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,";
+ $sql.= " tc.code, tc.libelle,";
+ $sql.= " s.fk_soc";
+ $sql.= " FROM (".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc)";
+ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as s ON ec.fk_socpeople=s.rowid"; // Si contact de type external, alors il est li� � une societe
+ $sql.= " WHERE ec.rowid =".$rowid;
+ $sql.= " AND ec.fk_c_type_contact=tc.rowid";
+ $sql.= " AND tc.element = '".$this->element."'";
- $resql=$this->db->query($sql);
- if ($resql)
- {
- $obj = $this->db->fetch_object($resql);
- return $obj;
- }
- else
- {
- $this->error=$this->db->error();
- dolibarr_print_error($this->db);
- return null;
- }
- }
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ $obj = $this->db->fetch_object($resql);
+ return $obj;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ dol_print_error($this->db);
+ return null;
+ }
+ }
- /**
- * \brief La liste des valeurs possibles de type de contacts
- * \param source internal ou externam
- * \return array La liste des natures
- */
- function liste_type_contact($source)
- {
- global $langs;
+ /**
+ * \brief La liste des valeurs possibles de type de contacts
+ * \param source internal ou externam
+ * \return array La liste des natures
+ */
+ function liste_type_contact($source)
+ {
+ global $langs;
- $tab = array();
+ $tab = array();
- $sql = "SELECT distinct tc.rowid, tc.code, tc.libelle";
- $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc";
- $sql.= " WHERE element='".$this->element."'";
- $sql.= " AND source='".$source."'";
- $sql.= " ORDER by tc.code";
+ $sql = "SELECT distinct tc.rowid, tc.code, tc.libelle";
+ $sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc";
+ $sql.= " WHERE element='".$this->element."'";
+ $sql.= " AND source='".$source."'";
+ $sql.= " ORDER by tc.code";
- $resql=$this->db->query($sql);
- if ($resql)
- {
- $num=$this->db->num_rows($resql);
- $i=0;
- while ($i < $num)
- {
- $obj = $this->db->fetch_object($resql);
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ $num=$this->db->num_rows($resql);
+ $i=0;
+ while ($i < $num)
+ {
+ $obj = $this->db->fetch_object($resql);
- $transkey="TypeContact_".$this->element."_".$source."_".$obj->code;
- $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
- $tab[$obj->rowid]=$libelle_type;
- $i++;
- }
- return $tab;
- }
- else
- {
- $this->error=$this->db->error();
-// dolibarr_print_error($this->db);
- return null;
- }
- }
+ $transkey="TypeContact_".$this->element."_".$source."_".$obj->code;
+ $libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
+ $tab[$obj->rowid]=$libelle_type;
+ $i++;
+ }
+ return $tab;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ // dol_print_error($this->db);
+ return null;
+ }
+ }
- /**
- * \brief Retourne id des contacts d'une source et d'un type actif donn�
- * Exemple: contact client de facturation ('external', 'BILLING')
- * Exemple: contact client de livraison ('external', 'SHIPPING')
- * Exemple: contact interne suivi paiement ('internal', 'SALESREPFOLL')
+ /**
+ * \brief Retourne id des contacts d'une source et d'un type actif donn�
+ * Exemple: contact client de facturation ('external', 'BILLING')
+ * Exemple: contact client de livraison ('external', 'SHIPPING')
+ * Exemple: contact interne suivi paiement ('internal', 'SALESREPFOLL')
* \param source 'external' or 'internal'
* \param code 'BILLING', 'SHIPPING', 'SALESREPFOLL', ...
- * \return array Liste des id contacts
- */
- function getIdContact($source,$code)
- {
- $result=array();
- $i=0;
+ * \return array Liste des id contacts
+ */
+ function getIdContact($source,$code)
+ {
+ $result=array();
+ $i=0;
- $sql = "SELECT ec.fk_socpeople";
- $sql.= " FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc";
- $sql.= " WHERE ec.element_id = ".$this->id;
- $sql.= " AND ec.fk_c_type_contact=tc.rowid";
- $sql.= " AND tc.element = '".$this->element."'";
- $sql.= " AND tc.source = '".$source."'";
- $sql.= " AND tc.code = '".$code."'";
- $sql.= " AND tc.active = 1";
+ $sql = "SELECT ec.fk_socpeople";
+ $sql.= " FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as tc";
+ $sql.= " WHERE ec.element_id = ".$this->id;
+ $sql.= " AND ec.fk_c_type_contact=tc.rowid";
+ $sql.= " AND tc.element = '".$this->element."'";
+ $sql.= " AND tc.source = '".$source."'";
+ $sql.= " AND tc.code = '".$code."'";
+ $sql.= " AND tc.active = 1";
- dolibarr_syslog("CommonObject::getIdContact sql=".$sql);
- $resql=$this->db->query($sql);
- if ($resql)
- {
- while ($obj = $this->db->fetch_object($resql))
- {
- $result[$i]=$obj->fk_socpeople;
- $i++;
- }
- }
- else
- {
- $this->error=$this->db->error();
- dolibarr_syslog("CommonObject::getIdContact ".$this->error, LOG_ERR);
- return null;
- }
+ dol_syslog("CommonObject::getIdContact sql=".$sql);
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ while ($obj = $this->db->fetch_object($resql))
+ {
+ $result[$i]=$obj->fk_socpeople;
+ $i++;
+ }
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ dol_syslog("CommonObject::getIdContact ".$this->error, LOG_ERR);
+ return null;
+ }
- return $result;
- }
+ return $result;
+ }
- /**
- * \brief Charge le contact d'id $id dans this->contact
- * \param contactid Id du contact
- * \return int <0 if KO, >0 if OK
- */
- function fetch_contact($contactid)
- {
+ /**
+ * \brief Charge le contact d'id $id dans this->contact
+ * \param contactid Id du contact
+ * \return int <0 if KO, >0 if OK
+ */
+ function fetch_contact($contactid)
+ {
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
$contact = new Contact($this->db);
$result=$contact->fetch($contactid);
$this->contact = $contact;
return $result;
- }
-
- /**
- * \brief Charge le tiers d'id $this->socid dans this->client
- * \return int <0 if KO, >0 if OK
- */
- function fetch_client()
- {
- $client = new Societe($this->db);
- $result=$client->fetch($this->socid);
- $this->client = $client;
- return $result;
- }
-
- /**
- * \brief Charge le projet d'id $this->projet_id dans this->projet
- * \return int <0 if KO, >0 if OK
- */
- function fetch_projet()
- {
- $projet = new Project($this->db);
- $result=$projet->fetch($this->projet_id);
- $this->projet = $projet;
- return $result;
- }
+ }
/**
- * \brief Charge le user d'id userid dans this->user
- * \param userid Id du contact
- * \return int <0 if KO, >0 if OK
- */
- function fetch_user($userid)
- {
+ * \brief Charge le tiers d'id $this->socid dans this->client
+ * \return int <0 if KO, >0 if OK
+ */
+ function fetch_client()
+ {
+ $client = new Societe($this->db);
+ $result=$client->fetch($this->socid);
+ $this->client = $client;
+ return $result;
+ }
+
+ /**
+ * \brief Charge le projet d'id $this->projet_id dans this->projet
+ * \return int <0 if KO, >0 if OK
+ */
+ function fetch_projet()
+ {
+ $projet = new Project($this->db);
+ $result=$projet->fetch($this->projet_id);
+ $this->projet = $projet;
+ return $result;
+ }
+
+ /**
+ * \brief Charge le user d'id userid dans this->user
+ * \param userid Id du contact
+ * \return int <0 if KO, >0 if OK
+ */
+ function fetch_user($userid)
+ {
$user = new User($this->db, $userid);
$result=$user->fetch();
$this->user = $user;
return $result;
- }
+ }
/**
- * \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress
- * \param userid Id du contact
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress
+ * \param userid Id du contact
+ * \return int <0 if KO, >0 if OK
+ */
function fetch_adresse_livraison($deliveryaddressid)
{
$address = new Societe($this->db);
@@ -397,16 +397,16 @@ class CommonObject
/**
- * \brief Load properties id_previous and id_next
- * \param filter Optional filter
- * \param fieldid Nom du champ a utiliser pour select next et previous
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Load properties id_previous and id_next
+ * \param filter Optional filter
+ * \param fieldid Nom du champ a utiliser pour select next et previous
+ * \return int <0 if KO, >0 if OK
+ */
function load_previous_next_ref($filter='',$fieldid)
{
if (! $this->table_element)
{
- dolibarr_syslog("CommonObject::load_previous_next was called on objet with property table_element not defined", LOG_ERR);
+ dol_syslog("CommonObject::load_previous_next was called on objet with property table_element not defined", LOG_ERR);
return -1;
}
@@ -446,36 +446,36 @@ class CommonObject
}
- /**
- * \brief On r�cup�re les id de liste_contact
- * \param source Source du contact external (llx_socpeople) ou internal (llx_user)
- * \return array
- */
- function getListContactId($source='external')
- {
- $contactAlreadySelected = array();
- $tab = $this->liste_contact(-1,$source);
- $num=sizeof($tab);
- $i = 0;
- while ($i < $num)
- {
- $contactAlreadySelected[$i] = $tab[$i]['id'];
- $i++;
- }
- return $contactAlreadySelected;
- }
+ /**
+ * \brief On r�cup�re les id de liste_contact
+ * \param source Source du contact external (llx_socpeople) ou internal (llx_user)
+ * \return array
+ */
+ function getListContactId($source='external')
+ {
+ $contactAlreadySelected = array();
+ $tab = $this->liste_contact(-1,$source);
+ $num=sizeof($tab);
+ $i = 0;
+ while ($i < $num)
+ {
+ $contactAlreadySelected[$i] = $tab[$i]['id'];
+ $i++;
+ }
+ return $contactAlreadySelected;
+ }
/**
- * \brief Link ekement with a project
- * \param projid Project id to link element to
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Link ekement with a project
+ * \param projid Project id to link element to
+ * \return int <0 if KO, >0 if OK
+ */
function setProject($projid)
{
if (! $this->table_element)
{
- dolibarr_syslog("CommonObject::setProject was called on objet with property table_element not defined",LOG_ERR);
+ dol_syslog("CommonObject::setProject was called on objet with property table_element not defined",LOG_ERR);
return -1;
}
@@ -484,30 +484,30 @@ class CommonObject
else $sql.= ' SET fk_projet = NULL';
$sql.= ' WHERE rowid = '.$this->id;
- dolibarr_syslog("CommonObject::set_project sql=".$sql);
+ dol_syslog("CommonObject::set_project sql=".$sql);
if ($this->db->query($sql))
{
return 1;
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return -1;
}
}
/**
- * \brief Set last model used by doc generator
- * \param user User object that make change
- * \param modelpdf Modele name
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Set last model used by doc generator
+ * \param user User object that make change
+ * \param modelpdf Modele name
+ * \return int <0 if KO, >0 if OK
+ */
function setDocModel($user, $modelpdf)
{
if (! $this->table_element)
{
- dolibarr_syslog("CommonObject::setDocModel was called on objet with property table_element not defined",LOG_ERR);
+ dol_syslog("CommonObject::setDocModel was called on objet with property table_element not defined",LOG_ERR);
return -1;
}
@@ -517,7 +517,7 @@ class CommonObject
// if ($this->element == 'facture') $sql.= " AND fk_statut < 2";
// if ($this->element == 'propal') $sql.= " AND fk_statut = 0";
- dolibarr_syslog("CommonObject::setDocModel sql=".$sql);
+ dol_syslog("CommonObject::setDocModel sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -526,26 +526,26 @@ class CommonObject
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return 0;
}
}
/**
- * \brief Stocke un num�ro de rang pour toutes les lignes de
- * detail d'une facture qui n'en ont pas.
- */
+ * \brief Stocke un num�ro de rang pour toutes les lignes de
+ * detail d'une facture qui n'en ont pas.
+ */
function line_order()
{
if (! $this->table_element_line)
{
- dolibarr_syslog("CommonObject::line_order was called on objet with property table_element_line not defined",LOG_ERR);
+ dol_syslog("CommonObject::line_order was called on objet with property table_element_line not defined",LOG_ERR);
return -1;
}
if (! $this->fk_element)
{
- dolibarr_syslog("CommonObject::line_order was called on objet with property fk_element not defined",LOG_ERR);
+ dol_syslog("CommonObject::line_order was called on objet with property fk_element not defined",LOG_ERR);
return -1;
}
@@ -581,7 +581,7 @@ class CommonObject
$sql.= ' WHERE rowid = '.$li[$i];
if (!$this->db->query($sql) )
{
- dolibarr_syslog($this->db->error());
+ dol_syslog($this->db->error());
}
}
}
@@ -612,12 +612,12 @@ class CommonObject
$sql.= ' WHERE rowid = '.$rowid;
if (! $this->db->query($sql) )
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
}
@@ -657,26 +657,26 @@ class CommonObject
$sql.= ' WHERE rowid = '.$rowid;
if (! $this->db->query($sql) )
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
}
/**
- * \brief Update private note of element
- * \param note New value for note
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Update private note of element
+ * \param note New value for note
+ * \return int <0 if KO, >0 if OK
+ */
function update_note($note)
{
if (! $this->table_element)
{
- dolibarr_syslog("CommonObject::update_note was called on objet with property table_element not defined", LOG_ERR);
+ dol_syslog("CommonObject::update_note was called on objet with property table_element not defined", LOG_ERR);
return -1;
}
@@ -685,7 +685,7 @@ class CommonObject
else $sql.= " SET note = '".addslashes($note)."'";
$sql.= " WHERE rowid =". $this->id;
- dolibarr_syslog("CommonObject::update_note sql=".$sql, LOG_DEBUG);
+ dol_syslog("CommonObject::update_note sql=".$sql, LOG_DEBUG);
if ($this->db->query($sql))
{
$this->note = $note;
@@ -694,21 +694,21 @@ class CommonObject
else
{
$this->error=$this->db->error();
- dolibarr_syslog("CommonObject::update_note error=".$this->error, LOG_ERR);
+ dol_syslog("CommonObject::update_note error=".$this->error, LOG_ERR);
return -1;
}
}
/**
- * \brief Update public note of element
- * \param note_public New value for note
- * \return int <0 if KO, >0 if OK
- */
+ * \brief Update public note of element
+ * \param note_public New value for note
+ * \return int <0 if KO, >0 if OK
+ */
function update_note_public($note_public)
{
if (! $this->table_element)
{
- dolibarr_syslog("CommonObject::update_note_public was called on objet with property table_element not defined",LOG_ERR);
+ dol_syslog("CommonObject::update_note_public was called on objet with property table_element not defined",LOG_ERR);
return -1;
}
@@ -716,7 +716,7 @@ class CommonObject
$sql.= " SET note_public = '".addslashes($note_public)."'";
$sql.= " WHERE rowid =". $this->id;
- dolibarr_syslog("CommonObject::update_note_public sql=".$sql);
+ dol_syslog("CommonObject::update_note_public sql=".$sql);
if ($this->db->query($sql))
{
$this->note_public = $note_public;
@@ -730,9 +730,9 @@ class CommonObject
}
/**
- * \brief Update total_ht, total_ttc and total_vat for an object (sum of lines)
- * \return int <0 si ko, >0 si ok
- */
+ * \brief Update total_ht, total_ttc and total_vat for an object (sum of lines)
+ * \return int <0 si ko, >0 si ok
+ */
function update_price()
{
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
@@ -747,7 +747,7 @@ class CommonObject
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line;
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
- dolibarr_syslog("CommonObject::update_price sql=".$sql);
+ dol_syslog("CommonObject::update_price sql=".$sql);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -785,7 +785,7 @@ class CommonObject
$sql .= ' WHERE rowid = '.$this->id;
//print "xx".$sql;
- dolibarr_syslog("CommonObject::update_price sql=".$sql);
+ dol_syslog("CommonObject::update_price sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -794,14 +794,14 @@ class CommonObject
else
{
$this->error=$this->db->error();
- dolibarr_syslog("CommonObject::update_price error=".$this->error,LOG_ERR);
+ dol_syslog("CommonObject::update_price error=".$this->error,LOG_ERR);
return -1;
}
}
else
{
$this->error=$this->db->error();
- dolibarr_syslog("CommonObject::update_price error=".$this->error,LOG_ERR);
+ dol_syslog("CommonObject::update_price error=".$this->error,LOG_ERR);
return -1;
}
}
diff --git a/htdocs/companybankaccount.class.php b/htdocs/companybankaccount.class.php
index 81df314c1a0..72b35e4e57c 100644
--- a/htdocs/companybankaccount.class.php
+++ b/htdocs/companybankaccount.class.php
@@ -126,7 +126,7 @@ class CompanyBankAccount
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return 0;
}
}
@@ -167,7 +167,7 @@ class CompanyBankAccount
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php
index a4bac6c2f0a..4092f39eae9 100644
--- a/htdocs/compta/bank/account.class.php
+++ b/htdocs/compta/bank/account.class.php
@@ -110,7 +110,7 @@ class Account extends CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (fk_bank, url_id, url, label, type)";
$sql .= " VALUES ('".$line_id."', '".$url_id."', '".$url."', '".addslashes($label)."', '".$type."')";
- dolibarr_syslog("Account::add_url_line sql=".$sql);
+ dol_syslog("Account::add_url_line sql=".$sql);
if ($this->db->query($sql))
{
$rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_url");
@@ -235,7 +235,7 @@ class Account extends CommonObject
$sql.= " ".($banque?"'".addslashes($banque)."'":"null");
$sql.= ")";
- dolibarr_syslog("Account::addline sql=".$sql);
+ dol_syslog("Account::addline sql=".$sql);
if ($this->db->query($sql))
{
$rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank");
@@ -256,7 +256,7 @@ class Account extends CommonObject
else
{
$this->error=$this->db->lasterror();
- dolibarr_syslog("Account::addline ".$this->error, LOG_ERR);
+ dol_syslog("Account::addline ".$this->error, LOG_ERR);
$this->db->rollback();
return -2;
}
@@ -294,7 +294,7 @@ class Account extends CommonObject
$sql.= "'".addslashes($this->comment)."'";
$sql.= ")";
- dolibarr_syslog("Account::create sql=".$sql);
+ dol_syslog("Account::create sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -315,12 +315,12 @@ class Account extends CommonObject
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$langs->trans("ErrorBankLabelAlreadyExists");
- dolibarr_syslog($this->error);
+ dol_syslog($this->error);
return -1;
}
else {
$this->error=$this->db->error()." sql=".$sql;
- dolibarr_syslog($this->error);
+ dol_syslog($this->error);
return -2;
}
}
@@ -342,7 +342,7 @@ class Account extends CommonObject
if (! $this->ref)
{
$this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Ref"));
- dolibarr_syslog("Account::update ".$this->error);
+ dol_syslog("Account::update ".$this->error);
return -1;
}
if (! $this->label) $this->label = "???";
@@ -366,7 +366,7 @@ class Account extends CommonObject
$sql .= " WHERE rowid = ".$this->id;
- dolibarr_syslog("Account::update sql=".$sql);
+ dol_syslog("Account::update sql=".$sql);
$result = $this->db->query($sql);
if ($result)
{
@@ -375,7 +375,7 @@ class Account extends CommonObject
else
{
$this->error=$this->db.' sql='.$sql;
- dolibarr_print_error($this->error);
+ dol_print_error($this->error);
return -1;
}
}
@@ -393,7 +393,7 @@ class Account extends CommonObject
// Chargement librairie pour acces fonction controle RIB
require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php');
- dolibarr_syslog("Account::update_bban $this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban");
+ dol_syslog("Account::update_bban $this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban");
// Check parameters
if (! $this->ref)
@@ -415,7 +415,7 @@ class Account extends CommonObject
$sql .= ",adresse_proprio = '".addslashes($this->adresse_proprio)."'";
$sql .= " WHERE rowid = ".$this->id;
- dolibarr_syslog("Account::update_bban sql=$sql");
+ dol_syslog("Account::update_bban sql=$sql");
$result = $this->db->query($sql);
if ($result)
@@ -425,7 +425,7 @@ class Account extends CommonObject
else
{
$this->error=$this->db.' sql='.$sql;
- dolibarr_print_error($this->error);
+ dol_print_error($this->error);
return -1;
}
}
@@ -447,7 +447,7 @@ class Account extends CommonObject
if ($id) $sql.= " WHERE rowid = ".$id;
if ($ref) $sql.= " WHERE ref = '".addslashes($ref)."'";
- dolibarr_syslog("Account::fetch sql=".$sql);
+ dol_syslog("Account::fetch sql=".$sql);
$result = $this->db->query($sql);
if ($result)
{
@@ -493,7 +493,7 @@ class Account extends CommonObject
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return -1;
}
}
@@ -507,13 +507,13 @@ class Account extends CommonObject
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account";
$sql .= " WHERE rowid = ".$this->rowid;
- dolibarr_syslog("Account::delete sql=".$sql);
+ dol_syslog("Account::delete sql=".$sql);
$result = $this->db->query($sql);
if ($result) {
return 1;
}
else {
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return -1;
}
}
@@ -590,7 +590,7 @@ class Account extends CommonObject
if ($obj->nb <= 1) $can_be_deleted=true; // Juste le solde
}
else {
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
return $can_be_deleted;
}
@@ -650,7 +650,7 @@ class Account extends CommonObject
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return 0;
}
}
@@ -677,7 +677,7 @@ class Account extends CommonObject
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return 0;
}
}
@@ -717,7 +717,7 @@ class Account extends CommonObject
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
$this->error=$this->db->error();
return -1;
}
@@ -834,7 +834,7 @@ class AccountLine
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= " WHERE b.fk_account = ba.rowid AND b.rowid = ".$rowid;
- dolibarr_syslog("AccountLine::fetch sql=".$sql);
+ dol_syslog("AccountLine::fetch sql=".$sql);
$result = $this->db->query($sql);
if ($result)
{
@@ -870,7 +870,7 @@ class AccountLine
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
return -1;
}
}
@@ -895,17 +895,17 @@ class AccountLine
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".$this->rowid;
- dolibarr_syslog("AccountLine::delete sql=".$sql);
+ dol_syslog("AccountLine::delete sql=".$sql);
$result = $this->db->query($sql);
if (! $result) $nbko++;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$this->rowid;
- dolibarr_syslog("AccountLine::delete sql=".$sql);
+ dol_syslog("AccountLine::delete sql=".$sql);
$result = $this->db->query($sql);
if (! $result) $nbko++;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".$this->rowid;
- dolibarr_syslog("AccountLine::delete sql=".$sql);
+ dol_syslog("AccountLine::delete sql=".$sql);
$result = $this->db->query($sql);
if (! $result) $nbko++;
@@ -1036,7 +1036,7 @@ class AccountLine
}
else
{
- dolibarr_print_error($this->db);
+ dol_print_error($this->db);
}
}
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 10c40200ebd..0f97d1692ed 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -75,7 +75,7 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user-
$amount = - price2num($_POST["debit"]);
}
- $dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
+ $dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
$operation=$_POST["operation"];
$num_chq=$_POST["num_chq"];
$label=$_POST["label"];
@@ -96,7 +96,7 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user-
}
else
{
- dolibarr_print_error($db,$acct->error);
+ dol_print_error($db,$acct->error);
}
}
else
@@ -209,7 +209,7 @@ if ($account || $_GET["ref"])
$sql.= " WHERE b.fk_account=".$acct->id;
$sql.= $sql_rech;
- dolibarr_syslog("account.php count transactions - sql=".$sql);
+ dol_syslog("account.php count transactions - sql=".$sql);
$result=$db->query($sql);
if ($result)
{
@@ -229,7 +229,7 @@ if ($account || $_GET["ref"])
$db->free($result);
}
else {
- dolibarr_print_error($db);
+ dol_print_error($db);
}
if ($page > 0)
@@ -249,7 +249,7 @@ if ($account || $_GET["ref"])
// Onglets
$head=bank_prepare_head($acct);
- dolibarr_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0);
+ dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0);
print '';
@@ -439,7 +439,7 @@ if ($account || $_GET["ref"])
$sql.= " ORDER BY b.datev ASC";
$sql.= $db->plimit($limitsql, 0);
- dolibarr_syslog("account.php get transactions - sql=".$sql);
+ dol_syslog("account.php get transactions - sql=".$sql);
$result = $db->query($sql);
if ($result)
{
@@ -470,9 +470,9 @@ if ($account || $_GET["ref"])
print "";
- print "| ".dolibarr_print_date($objp->do,"day")." | \n";
+ print "".dol_print_date($objp->do,"day")." | \n";
- print " ".dolibarr_print_date($objp->dv,"day")." | \n";
+ print " ".dol_print_date($objp->dv,"day")." | \n";
print " ".$langs->trans($objp->fk_type)." ".($objp->num_chq?$objp->num_chq:"")." | \n";
@@ -498,7 +498,7 @@ if ($account || $_GET["ref"])
}
else
{
- print dolibarr_trunc($objp->label,60);
+ print dol_trunc($objp->label,60);
}
}
@@ -671,7 +671,7 @@ if ($account || $_GET["ref"])
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php
index 05f8762ce20..5e4c9e94146 100644
--- a/htdocs/compta/bank/annuel.php
+++ b/htdocs/compta/bank/annuel.php
@@ -90,7 +90,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$sql = "SELECT sum(f.amount), date_format(f.dateo,'%Y-%m') as dm";
@@ -112,13 +112,13 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Onglets
$head=bank_prepare_head($acct);
-dolibarr_fiche_head($head,'annual',$langs->trans("FinancialAccount"),0);
+dol_fiche_head($head,'annual',$langs->trans("FinancialAccount"),0);
$title=$langs->trans("FinancialAccount")." : ".$acct->label;
$lien=($year_start?"".img_previous()." ".$langs->trans("Year")." ".img_next()."":"");
@@ -192,7 +192,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
{
$var=!$var;
print ' ';
- print "| ".dolibarr_print_date(dolibarr_mktime(1,1,1,$mois,1,2000),"%B")." | ";
+ print "".dol_print_date(dol_mktime(1,1,1,$mois,1,2000),"%B")." | ";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
$case = sprintf("%04s-%02s",$annee,$mois);
@@ -245,7 +245,7 @@ if ($resql)
if ($obj) $balance=$obj->total;
}
else {
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print ' | '.$langs->trans("CurrentBalance")." | ";
print ''.price($balance).' | ';
diff --git a/htdocs/compta/bank/bankcateg.class.php b/htdocs/compta/bank/bankcateg.class.php
index 92f989ca9ed..c7e230fac2c 100644
--- a/htdocs/compta/bank/bankcateg.class.php
+++ b/htdocs/compta/bank/bankcateg.class.php
@@ -97,7 +97,7 @@ class BankCateg // extends CommonObject
$this->db->begin();
- dolibarr_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
+ dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
@@ -124,7 +124,7 @@ class BankCateg // extends CommonObject
{
foreach($this->errors as $errmsg)
{
- dolibarr_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
+ dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
@@ -155,7 +155,7 @@ class BankCateg // extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ as t";
$sql.= " WHERE t.rowid = ".$id;
- dolibarr_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
+ dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -176,7 +176,7 @@ class BankCateg // extends CommonObject
else
{
$this->error="Error ".$this->db->lasterror();
- dolibarr_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
+ dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
return -1;
}
}
@@ -212,7 +212,7 @@ class BankCateg // extends CommonObject
$this->db->begin();
- dolibarr_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
+ dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
@@ -237,7 +237,7 @@ class BankCateg // extends CommonObject
{
foreach($this->errors as $errmsg)
{
- dolibarr_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
+ dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
@@ -267,7 +267,7 @@ class BankCateg // extends CommonObject
$this->db->begin();
- dolibarr_syslog(get_class($this)."::delete sql=".$sql);
+ dol_syslog(get_class($this)."::delete sql=".$sql);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
@@ -292,7 +292,7 @@ class BankCateg // extends CommonObject
{
foreach($this->errors as $errmsg)
{
- dolibarr_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
+ dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php
index 5f3b6bfd4d9..a2e89084809 100644
--- a/htdocs/compta/bank/bankid_fr.php
+++ b/htdocs/compta/bank/bankid_fr.php
@@ -112,7 +112,7 @@ if (($_GET["id"] || $_GET["ref"]) && $_GET["action"] != 'edit')
*/
// Onglets
$head=bank_prepare_head($account);
- dolibarr_fiche_head($head, 'bankid', $langs->trans("FinancialAccount"));
+ dol_fiche_head($head, 'bankid', $langs->trans("FinancialAccount"));
/*
* Confirmation de la suppression
diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php
index 6e40d5362ef..359ae48329c 100644
--- a/htdocs/compta/bank/budget.php
+++ b/htdocs/compta/bank/budget.php
@@ -85,7 +85,7 @@ if ($result)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print " ";
diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php
index b711311e91e..1018fd19ac8 100644
--- a/htdocs/compta/bank/categ.php
+++ b/htdocs/compta/bank/categ.php
@@ -43,7 +43,7 @@ if ($_POST["action"] == 'add')
if (!$result)
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
}
@@ -60,7 +60,7 @@ if ( $_REQUEST['action'] == 'delete' )
if (!$result)
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
}
diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php
index e00f60bc9ee..f0a50c8cf6c 100644
--- a/htdocs/compta/bank/fiche.php
+++ b/htdocs/compta/bank/fiche.php
@@ -52,7 +52,7 @@ if ($_POST["action"] == 'add')
$account->account_number = trim($_POST["account_number"]);
$account->solde = $_POST["solde"];
- $account->date_solde = dolibarr_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
+ $account->date_solde = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
$account->currency_code = trim($_POST["account_currency_code"]);
$account->country_code = trim($_POST["account_country_code"]);
@@ -275,7 +275,7 @@ else
// Onglets
$head=bank_prepare_head($account);
- dolibarr_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"));
+ dol_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"));
/*
* Confirmation de la suppression
diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php
index 0279ffc052a..9ad632ff1c9 100644
--- a/htdocs/compta/bank/graph.php
+++ b/htdocs/compta/bank/graph.php
@@ -54,9 +54,9 @@ if (! empty($_GET["lib"])) $conf->global->MAIN_GRAPH_LIBRARY=$_GET["lib"];
$datetime = time();
-$year = dolibarr_print_date($datetime, "%Y");
-$month = dolibarr_print_date($datetime, "%m");
-$day = dolibarr_print_date($datetime, "%d");
+$year = dol_print_date($datetime, "%Y");
+$month = dol_print_date($datetime, "%m");
+$day = dol_print_date($datetime, "%d");
if (! empty($_GET["year"])) $year=sprintf("%04d",$_GET["year"]);
if (! empty($_GET["month"])) $month=sprintf("%02d",$_GET["month"]);
@@ -100,10 +100,10 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$log="graph.php: min=".$min." max=".$max;
- dolibarr_syslog($log);
+ dol_syslog($log);
// Tableau 1
@@ -135,7 +135,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Calcul de $solde avant le debut du graphe
@@ -153,7 +153,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Chargement de labels et datas pour tableau 1
@@ -162,7 +162,7 @@ else
$datamin = array();
$subtotal = 0;
- $day = dolibarr_mktime(12,0,0,$month,1,$year);
+ $day = dol_mktime(12,0,0,$month,1,$year);
$textdate = strftime("%Y%m%d",$day);
$xyear = substr($textdate,0,4);
$xday = substr($textdate,6,2);
@@ -261,7 +261,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Calcul de $solde avant le debut du graphe
@@ -279,7 +279,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Chargement de labels et datas pour tableau 2
@@ -289,7 +289,7 @@ else
$subtotal = 0;
$now = time();
- $day = dolibarr_mktime(12,0,0,1,1,$year);
+ $day = dol_mktime(12,0,0,1,1,$year);
$textdate = strftime("%Y%m%d",$day);
$xyear = substr($textdate,0,4);
$xday = substr($textdate,6,2);
@@ -309,7 +309,7 @@ else
$datamin[$i] = $acct->min_desired;
if ($xday == '15')
{
- $labels[$i] = dolibarr_print_date($day,"%b");
+ $labels[$i] = dol_print_date($day,"%b");
}
$day += 86400;
$textdate = strftime("%Y%m%d",$day);
@@ -378,7 +378,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Calcul de $solde avant le debut du graphe
@@ -481,7 +481,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$sql = "SELECT date_format(datev,'%d'), sum(amount)";
$sql .= " FROM ".MAIN_DB_PREFIX."bank";
@@ -503,7 +503,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
@@ -579,7 +579,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$sql = "SELECT date_format(datev,'%m'), sum(amount)";
$sql .= " FROM ".MAIN_DB_PREFIX."bank";
@@ -599,7 +599,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
@@ -611,7 +611,7 @@ else
{
$data_credit[$i] = isset($credits[substr("0".($i+1),-2)]) ? $credits[substr("0".($i+1),-2)] : 0;
$data_debit[$i] = isset($debits[substr("0".($i+1),-2)]) ? $debits[substr("0".($i+1),-2)] : 0;
- $labels[$i] = dolibarr_print_date(dolibarr_mktime(12,0,0,$i+1,1,2000),"%b");
+ $labels[$i] = dol_print_date(dol_mktime(12,0,0,$i+1,1,2000),"%b");
$datamin[$i] = $acct->min_desired;
}
@@ -650,7 +650,7 @@ else
// Onglets
$head=bank_prepare_head($acct);
-dolibarr_fiche_head($head,'graph',$langs->trans("FinancialAccount"),0);
+dol_fiche_head($head,'graph',$langs->trans("FinancialAccount"),0);
if ($mesg) print $mesg.' ';
diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php
index 89563dd2fcd..87de14ce12f 100644
--- a/htdocs/compta/bank/info.php
+++ b/htdocs/compta/bank/info.php
@@ -55,7 +55,7 @@ $hselected = $h;
$h++;
-dolibarr_fiche_head($head, $hselected, $langs->trans("LineRecord"));
+dol_fiche_head($head, $hselected, $langs->trans("LineRecord"));
print '| ';
dol_print_object_info($line);
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 7754e26b9be..0f682cd6f18 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -63,7 +63,7 @@ if ($_POST["action"] == 'confirm_delete_categ' && $_POST["confirm"] == "yes")
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_GET["cat1"];
if (! $db->query($sql))
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
@@ -72,13 +72,13 @@ if ($_POST["action"] == 'class')
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = $rowid AND fk_categ = ".$_POST["cat1"];
if (! $db->query($sql))
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES (".$_GET["rowid"].", ".$_POST["cat1"].")";
if (! $db->query($sql))
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
@@ -114,7 +114,7 @@ if ($_POST["action"] == "update")
else
{
$db->rollback();
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
@@ -156,7 +156,7 @@ if ($user->rights->banque->consolidate && $_POST["action"] == 'num_releve')
else
{
$db->rollback();
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
@@ -200,7 +200,7 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$_GET["rowid"];
$head[$h][1] = $langs->trans("Info");
$h++;
-dolibarr_fiche_head($head, $hselected, $langs->trans('LineRecord'));
+dol_fiche_head($head, $hselected, $langs->trans('LineRecord'));
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do,".$db->pdate("b.datev")." as dv, b.amount, b.label, b.rappro,";
@@ -279,7 +279,7 @@ if ($result)
else
{
print ' | ';
- print dolibarr_print_date($objp->do);
+ print dol_print_date($objp->do);
}
print ' | ';
@@ -300,7 +300,7 @@ if ($result)
else
{
print '';
- print dolibarr_print_date($objp->dv,"day");
+ print dol_print_date($objp->dv,"day");
print ' | ';
}
print "";
diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php
index 3f3f19d6e45..1dc10c8dd31 100644
--- a/htdocs/compta/bank/rappro.php
+++ b/htdocs/compta/bank/rappro.php
@@ -81,7 +81,7 @@ if ($_GET["action"] == 'del')
$result=$accline->delete();
if ($result < 0)
{
- dolibarr_print_error($db,$accline->error);
+ dol_print_error($db,$accline->error);
}
}
@@ -159,7 +159,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print '';
@@ -188,13 +188,13 @@ if ($resql)
print "rowid."\">";
// Date op
- print '| '.dolibarr_print_date($objp->do,"day").' | ';
+ print ''.dol_print_date($objp->do,"day").' | ';
// Date value
if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate))
{
print '';
- print dolibarr_print_date($objp->dv,"day");
+ print dol_print_date($objp->dv,"day");
print ' ';
print 'rowid.'">';
print img_edit_remove() . " ";
@@ -205,7 +205,7 @@ if ($resql)
else
{
print ' | ';
- print dolibarr_print_date($objp->dv,"day");
+ print dol_print_date($objp->dv,"day");
print ' | ';
}
@@ -255,7 +255,7 @@ if ($resql)
elseif ($links[$key]['type']=='company') {
print '';
print img_object($langs->trans('ShowCustomer'),'company').' ';
- print dolibarr_trunc($links[$key]['label'],24);
+ print dol_trunc($links[$key]['label'],24);
print '';
$newline=0;
}
@@ -369,7 +369,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$db->close();
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index affa50ee225..b4ea48a5125 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -99,7 +99,7 @@ if (! isset($_GET["num"]))
// Onglets
$head=bank_prepare_head($acct);
- dolibarr_fiche_head($head,'statement',$langs->trans("FinancialAccount"),0);
+ dol_fiche_head($head,'statement',$langs->trans("FinancialAccount"),0);
print '';
@@ -146,7 +146,7 @@ if (! isset($_GET["num"]))
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
else
@@ -264,13 +264,13 @@ else
print "";
// Date operation
- print '| '.dolibarr_print_date($objp->do,"day").' | ';
+ print ''.dol_print_date($objp->do,"day").' | ';
// Date de valeur
print '';
print 'rowid.'">';
print img_previous().' ';
- print dolibarr_print_date($objp->dv,"day") .' ';
+ print dol_print_date($objp->dv,"day") .' ';
print 'rowid.'">';
print img_next().'';
print " | \n";
@@ -313,7 +313,7 @@ else
elseif ($links[$key]['type']=='company') {
print '';
print img_object($langs->trans('ShowCustomer'),'company').' ';
- print dolibarr_trunc($links[$key]['label'],24);
+ print dol_trunc($links[$key]['label'],24);
print '';
$newline=0;
}
@@ -374,7 +374,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index 47772ab380b..a66f3a68f31 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -181,13 +181,13 @@ if ($resql)
print '';
// Date
- print ''.dolibarr_print_date($db->jdate($objp->do),"day")." | \n";
+ print ''.dol_print_date($db->jdate($objp->do),"day")." | \n";
print "rowid&account=$objp->fk_account\">";
$reg=array();
eregi('\((.+)\)',$objp->label,$reg); // Si texte entouré de parenthèe on tente recherche de traduction
if ($reg[1] && $langs->trans($reg[1])!=$reg[1]) print $langs->trans($reg[1]);
- else print dolibarr_trunc($objp->label,40);
+ else print dol_trunc($objp->label,40);
print " ";
// Third party
@@ -234,7 +234,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Si accès issu d'une recherche et rien de trouvé
diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php
index 557f6d0a4d9..eace637a5d6 100644
--- a/htdocs/compta/bank/treso.php
+++ b/htdocs/compta/bank/treso.php
@@ -87,7 +87,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
*/
// Onglets
$head=bank_prepare_head($acct);
- dolibarr_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0);
+ dol_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0);
print '';
@@ -293,7 +293,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$solde += $total_ttc;
print "";
- print '| '.dolibarr_print_date($obj->dlr,"day")." | ";
+ print ''.dol_print_date($obj->dlr,"day")." | ";
print "".$ref." | ";
print "".$refcomp." | ";
if ($obj->total_ttc < 0) { print "".price($total_ttc)." | | "; };
@@ -305,7 +305,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
// Solde actuel
diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php
index 1e15f017fd7..edc13845d41 100644
--- a/htdocs/compta/bank/virement.php
+++ b/htdocs/compta/bank/virement.php
@@ -41,7 +41,7 @@ if ($_POST["action"] == 'add')
$langs->load("errors");
$mesg='';
- $dateo = dolibarr_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
+ $dateo = dol_mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
$label = $_POST["label"];
$amount= $_POST["amount"];
diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 0d3a105fc5a..00475c92fe7 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -104,7 +104,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print ' ';
@@ -147,7 +147,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
$obj = $db->fetch_object($result);
$var=!$var;
print " | ";
- print '| '.dolibarr_print_date($obj->dm,'day')." | \n";
+ print ''.dol_print_date($obj->dm,'day')." | \n";
print "".$obj->label." | \n";
$total = $total + $obj->amount;
@@ -164,7 +164,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php
index 090ba11bd1a..abca12b441e 100644
--- a/htdocs/compta/clients.php
+++ b/htdocs/compta/clients.php
@@ -202,7 +202,7 @@ if ($result)
print ''.$obj->ville.' | ';
print ''.$obj->code_client.' | ';
print ''.$obj->code_compta.' | ';
- print ''.dolibarr_print_date($obj->datec).' | ';
+ print ''.dol_print_date($obj->datec).' | ';
print " \n";
$i++;
}
@@ -214,7 +214,7 @@ if ($result)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$db->close();
diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php
index 1de23104603..01ac0e1f4c6 100644
--- a/htdocs/compta/commande/fiche.php
+++ b/htdocs/compta/commande/fiche.php
@@ -70,7 +70,7 @@ if ($_POST['action'] == 'set_ref_client' && $user->rights->commande->creer)
if ($_POST['action'] == 'setdate_livraison' && $user->rights->commande->creer)
{
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
- $datelivraison=dolibarr_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']);
+ $datelivraison=dol_mktime(0, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']);
$commande = new Commande($db);
$commande->fetch($_GET['id']);
@@ -93,7 +93,7 @@ if ($_POST['action'] == 'setmode' && $user->rights->commande->creer)
$commande = new Commande($db);
$commande->fetch($_GET['id']);
$result=$commande->mode_reglement($_POST['mode_reglement_id']);
- if ($result < 0) dolibarr_print_error($db,$commande->error);
+ if ($result < 0) dol_print_error($db,$commande->error);
}
if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer)
@@ -101,7 +101,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer)
$commande = new Commande($db);
$commande->fetch($_GET['id']);
$result=$commande->cond_reglement($_POST['cond_reglement_id']);
- if ($result < 0) dolibarr_print_error($db,$commande->error);
+ if ($result < 0) dol_print_error($db,$commande->error);
}
@@ -129,7 +129,7 @@ if ($id > 0 || ! empty($ref))
$author->fetch();
$head = commande_prepare_head($commande);
- dolibarr_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder"));
+ dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder"));
/*
* Commande
@@ -205,7 +205,7 @@ if ($id > 0 || ! empty($ref))
// Date
print '| '.$langs->trans('Date').' | ';
- print ''.dolibarr_print_date($commande->date,'daytext').' | ';
+ print ''.dol_print_date($commande->date,'daytext').' | ';
print ''.$langs->trans('Source').' : '.$commande->getLabelSource();
if ($commande->source == 0 && $conf->propal->enabled)
{
@@ -236,7 +236,7 @@ if ($id > 0 || ! empty($ref))
}
else
{
- print dolibarr_print_date($commande->date_livraison,'daytext');
+ print dol_print_date($commande->date_livraison,'daytext');
}
print ' | ';
print ''.$langs->trans('NotePublic').' : ';
@@ -468,7 +468,7 @@ if ($id > 0 || ! empty($ref))
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print ' | ';
@@ -543,7 +543,7 @@ if ($id > 0 || ! empty($ref))
$var=!$var;
print "";
print '| '.img_object($langs->trans("ShowBill"),"bill").' '.$objp->facnumber.' | ';
- print ''.dolibarr_print_date($objp->df).' | ';
+ print ''.dol_print_date($objp->df).' | ';
print ''.$objp->total_ttc.' | ';
$i++;
}
@@ -552,7 +552,7 @@ if ($id > 0 || ! empty($ref))
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
print '';
diff --git a/htdocs/compta/commande/liste.php b/htdocs/compta/commande/liste.php
index d0194da62b0..c0773de49b4 100644
--- a/htdocs/compta/commande/liste.php
+++ b/htdocs/compta/commande/liste.php
@@ -166,10 +166,10 @@ if ($resql)
print " | ";
print "";
- $y = dolibarr_print_date($objp->date_commande,"%Y");
- $m = dolibarr_print_date($objp->date_commande,"%m");
- $mt = dolibarr_print_date($objp->date_commande,"%b");
- $d = dolibarr_print_date($objp->date_commande,"%d");
+ $y = dol_print_date($objp->date_commande,"%Y");
+ $m = dol_print_date($objp->date_commande,"%m");
+ $mt = dol_print_date($objp->date_commande,"%b");
+ $d = dol_print_date($objp->date_commande,"%d");
print $d."\n";
print " ";
print $mt."\n";
@@ -190,7 +190,7 @@ if ($resql)
}
else
{
- print dolibarr_print_error($db);
+ print dol_print_error($db);
}
diff --git a/htdocs/compta/comptacompte.class.php b/htdocs/compta/comptacompte.class.php
index 3cd4328196d..a0bf2840dba 100644
--- a/htdocs/compta/comptacompte.class.php
+++ b/htdocs/compta/comptacompte.class.php
@@ -84,31 +84,31 @@ class ComptaCompte
else
{
$result = -2;
- dolibarr_syslog("ComptaCompte::Create Erreur $result lecture ID");
+ dol_syslog("ComptaCompte::Create Erreur $result lecture ID");
}
}
else
{
$result = -1;
- dolibarr_syslog("ComptaCompte::Create Erreur $result INSERT Mysql");
+ dol_syslog("ComptaCompte::Create Erreur $result INSERT Mysql");
}
}
else
{
$result = -3;
- dolibarr_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
+ dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
}
}
else
{
$result = -5;
- dolibarr_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
+ dol_syslog("ComptaCompte::Create Erreur $result SELECT Mysql");
}
}
else
{
$result = -4;
- dolibarr_syslog("ComptaCompte::Create Erreur $result Valeur Manquante");
+ dol_syslog("ComptaCompte::Create Erreur $result Valeur Manquante");
}
return $result;
diff --git a/htdocs/compta/deplacement/deplacement.class.php b/htdocs/compta/deplacement/deplacement.class.php
index b07b8a9987d..b588b00d447 100644
--- a/htdocs/compta/deplacement/deplacement.class.php
+++ b/htdocs/compta/deplacement/deplacement.class.php
@@ -80,7 +80,7 @@ class Deplacement extends CommonObject
$sql.= " (datec, fk_user_author, fk_user, type)";
$sql.= " VALUES (".$this->db->idate(mktime()).", ".$user->id.", ".$this->fk_user.", '".$this->type."')";
- dolibarr_syslog("Deplacement::create sql=".$sql, LOG_DEBUG);
+ dol_syslog("Deplacement::create sql=".$sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
@@ -138,7 +138,7 @@ class Deplacement extends CommonObject
$sql .= " , fk_soc = ".($this->socid > 0?$this->socid:'null');
$sql .= " WHERE rowid = ".$this->id;
- dolibarr_syslog("Deplacement::update sql=".$sql, LOG_DEBUG);
+ dol_syslog("Deplacement::update sql=".$sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
@@ -160,7 +160,7 @@ class Deplacement extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement";
$sql.= " WHERE rowid = ".$id;
- dolibarr_syslog("Deplacement::fetch sql=".$sql, LOG_DEBUG);
+ dol_syslog("Deplacement::fetch sql=".$sql, LOG_DEBUG);
$result = $this->db->query($sql) ;
if ( $result )
{
diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index 4c22a2d0487..988e66baa00 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -52,7 +52,7 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
{
$deplacement = new Deplacement($db);
- $deplacement->date = dolibarr_mktime(12, 0, 0,
+ $deplacement->date = dol_mktime(12, 0, 0,
$_POST["remonth"],
$_POST["reday"],
$_POST["reyear"]);
@@ -89,7 +89,7 @@ if ($_POST["action"] == 'update' && $user->rights->deplacement->creer)
$deplacement = new Deplacement($db);
$result = $deplacement->fetch($_POST["id"]);
- $deplacement->date = dolibarr_mktime(12, 0 , 0,
+ $deplacement->date = dol_mktime(12, 0 , 0,
$_POST["remonth"],
$_POST["reday"],
$_POST["reyear"]);
@@ -183,7 +183,7 @@ else
$head[$h][0] = DOL_URL_ROOT."/compta/deplacement/fiche.php?id=$deplacement->id";
$head[$h][1] = $langs->trans("Card");
- dolibarr_fiche_head($head, $hselected, $langs->trans("TripCard"));
+ dol_fiche_head($head, $hselected, $langs->trans("TripCard"));
print " | ';
print '| '.$langs->trans("Date").' | ';
- print dolibarr_print_date($deplacement->date);
+ print dol_print_date($deplacement->date);
print ' | ';
print '| '.$langs->trans("FeesKilometersOrAmout").' | '.$deplacement->km.' | ';
@@ -281,7 +281,7 @@ else
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
}
}
diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php
index 517beb81dfa..4638173502e 100644
--- a/htdocs/compta/deplacement/index.php
+++ b/htdocs/compta/deplacement/index.php
@@ -108,7 +108,7 @@ if ($resql)
print "";
print '| '.img_object($langs->trans("ShowTrip"),"trip").' '.$objp->rowid.' | ';
print ''.$langs->trans($objp->type).' | ';
- print ''.dolibarr_print_date($objp->dd,'day').' | ';
+ print ''.dol_print_date($objp->dd,'day').' | ';
if ($objp->socid) print ''.$soc->getNomUrl(1).' | ';
else print ' | ';
print ''.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.' | ';
@@ -123,7 +123,7 @@ if ($resql)
}
else
{
- dolibarr_print_error($db);
+ dol_print_error($db);
}
$db->close();
diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php
index 1c29b2967fd..efa2f8e6291 100644
--- a/htdocs/compta/dons/fiche.php
+++ b/htdocs/compta/dons/fiche.php
@@ -178,7 +178,7 @@ if ($_REQUEST['action'] == 'builddoc')
$result=don_create($db, $donation->id, '', $donation->modelpdf, $outputlangs);
if ($result <= 0)
{
- dolibarr_print_error($db,$result);
+ dol_print_error($db,$result);
exit;
}
else
@@ -273,7 +273,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
$hselected=$h;
$h++;
- dolibarr_fiche_head($head, $hselected, $langs->trans("Ref"));
+ dol_fiche_head($head, $hselected, $langs->trans("Ref"));
print '
|