mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Renomage dans tout le code du mot dclaratif de fonction php "Function" (avec F majuscule)
par "function" (avec f minuscule), qui est le mot correct (bien que cela ne gne pas le php, cela gne doxygen et autres outils d'analyse syntaxique).
This commit is contained in:
parent
ae84ac3bea
commit
88acbc5134
|
|
@ -67,7 +67,7 @@ class Adherent
|
|||
\param id id de l'adhérent
|
||||
*/
|
||||
|
||||
Function Adherent($DB, $id='')
|
||||
function Adherent($DB, $id='')
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->id = $id;
|
||||
|
|
@ -93,7 +93,7 @@ class Adherent
|
|||
\remarks etc..
|
||||
*/
|
||||
|
||||
Function send_an_email($recipients,$text,$subject="Vos coordonnees sur %SERVEUR%")
|
||||
function send_an_email($recipients,$text,$subject="Vos coordonnees sur %SERVEUR%")
|
||||
{
|
||||
$patterns = array (
|
||||
'/%PRENOM%/',
|
||||
|
|
@ -151,7 +151,7 @@ class Adherent
|
|||
\brief imprime une liste d'erreur.
|
||||
*/
|
||||
|
||||
Function print_error_list()
|
||||
function print_error_list()
|
||||
{
|
||||
$num = sizeof($this->errorstr);
|
||||
for ($i = 0 ; $i < $num ; $i++)
|
||||
|
|
@ -166,7 +166,7 @@ class Adherent
|
|||
\param morphy nature physique ou morale de l'adhérent
|
||||
*/
|
||||
|
||||
Function getmorphylib($morphy='')
|
||||
function getmorphylib($morphy='')
|
||||
{
|
||||
if (! $morphy) { $morphy=$this->morphy; }
|
||||
if ($morphy == 'phy') { return "Physique"; }
|
||||
|
|
@ -179,7 +179,7 @@ class Adherent
|
|||
\param minimum
|
||||
*/
|
||||
|
||||
Function check($minimum=0)
|
||||
function check($minimum=0)
|
||||
{
|
||||
$err = 0;
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ class Adherent
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function create($userid)
|
||||
function create($userid)
|
||||
{
|
||||
/*
|
||||
* Insertion dans la base
|
||||
|
|
@ -310,7 +310,7 @@ class Adherent
|
|||
\brief fonction qui met à jour l'adhérent
|
||||
*/
|
||||
|
||||
Function update()
|
||||
function update()
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET ";
|
||||
|
|
@ -372,7 +372,7 @@ class Adherent
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function delete($rowid)
|
||||
function delete($rowid)
|
||||
|
||||
{
|
||||
$result = 0;
|
||||
|
|
@ -415,7 +415,7 @@ class Adherent
|
|||
\param login login de l'adhérent
|
||||
*/
|
||||
|
||||
Function fetch_login($login)
|
||||
function fetch_login($login)
|
||||
{
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login' LIMIT 1";
|
||||
if ( $this->db->query( $sql) )
|
||||
|
|
@ -438,7 +438,7 @@ class Adherent
|
|||
*/
|
||||
|
||||
|
||||
Function fetch($rowid)
|
||||
function fetch($rowid)
|
||||
{
|
||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.public, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.login, d.pass, d.naiss, d.photo, d.fk_adherent_type, d.morphy, t.libelle as type";
|
||||
$sql .= ",".$this->db->pdate("d.datefin")." as datefin";
|
||||
|
|
@ -487,7 +487,7 @@ class Adherent
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function fetch_optionals($rowid)
|
||||
function fetch_optionals($rowid)
|
||||
{
|
||||
$tab=array();
|
||||
$sql = "SELECT *";
|
||||
|
|
@ -516,7 +516,7 @@ class Adherent
|
|||
/*
|
||||
* fetch optional attribute name
|
||||
*/
|
||||
Function fetch_name_optionals()
|
||||
function fetch_name_optionals()
|
||||
{
|
||||
$array_name_options=array();
|
||||
$sql = "SHOW COLUMNS FROM ".MAIN_DB_PREFIX."adherent_options";
|
||||
|
|
@ -547,7 +547,7 @@ class Adherent
|
|||
\param montant
|
||||
*/
|
||||
|
||||
Function cotisation($date, $montant)
|
||||
function cotisation($date, $montant)
|
||||
|
||||
{
|
||||
|
||||
|
|
@ -588,7 +588,7 @@ class Adherent
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function validate($userid)
|
||||
function validate($userid)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET ";
|
||||
|
|
@ -616,7 +616,7 @@ class Adherent
|
|||
\param userid userid de de l'adhérent
|
||||
*/
|
||||
|
||||
Function resiliate($userid)
|
||||
function resiliate($userid)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET ";
|
||||
|
|
@ -646,7 +646,7 @@ class Adherent
|
|||
\remarks mailing-list, spip, glasnost, etc...
|
||||
*/
|
||||
|
||||
Function add_to_abo($adht)
|
||||
function add_to_abo($adht)
|
||||
{
|
||||
$err=0;
|
||||
// mailman
|
||||
|
|
@ -690,7 +690,7 @@ class Adherent
|
|||
\remarks mailing-list, spip, glasnost, etc...
|
||||
*/
|
||||
|
||||
Function del_to_abo($adht)
|
||||
function del_to_abo($adht)
|
||||
{
|
||||
$err=0;
|
||||
// mailman
|
||||
|
|
@ -730,7 +730,7 @@ class Adherent
|
|||
\brief fonction qui donne les droits rédacteurs dans spip
|
||||
*/
|
||||
|
||||
Function add_to_spip()
|
||||
function add_to_spip()
|
||||
{
|
||||
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||
|
|
@ -762,7 +762,7 @@ class Adherent
|
|||
\brief fonction qui enlève les droits rédacteurs dans spip
|
||||
*/
|
||||
|
||||
Function del_to_spip()
|
||||
function del_to_spip()
|
||||
{
|
||||
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||
|
|
@ -791,7 +791,7 @@ class Adherent
|
|||
\brief fonction qui dit si cet utilisateur est rédacteur dans spip
|
||||
*/
|
||||
|
||||
Function is_in_spip()
|
||||
function is_in_spip()
|
||||
{
|
||||
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 &&
|
||||
defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' &&
|
||||
|
|
@ -828,7 +828,7 @@ class Adherent
|
|||
\brief fonction qui ajoute l'utilisateur dans glasnost
|
||||
*/
|
||||
|
||||
Function add_to_glasnost()
|
||||
function add_to_glasnost()
|
||||
{
|
||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||
|
|
@ -893,7 +893,7 @@ class Adherent
|
|||
\brief fonction qui enlève l'utilisateur de glasnost
|
||||
*/
|
||||
|
||||
Function del_to_glasnost()
|
||||
function del_to_glasnost()
|
||||
{
|
||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||
|
|
@ -998,7 +998,7 @@ class Adherent
|
|||
\brief fonction qui vérifie si l'utilisateur est dans glasnost
|
||||
*/
|
||||
|
||||
Function is_in_glasnost()
|
||||
function is_in_glasnost()
|
||||
{
|
||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||
|
|
@ -1055,7 +1055,7 @@ class Adherent
|
|||
\brief fonction qui rajoute l'utilisateur dans mailman
|
||||
*/
|
||||
|
||||
Function add_to_mailman($listes='')
|
||||
function add_to_mailman($listes='')
|
||||
{
|
||||
if (defined("ADHERENT_MAILMAN_URL") && ADHERENT_MAILMAN_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '')
|
||||
{
|
||||
|
|
@ -1121,7 +1121,7 @@ class Adherent
|
|||
\ remarks utilie lors de la résiliation d'adhésion
|
||||
*/
|
||||
|
||||
Function del_to_mailman($listes='')
|
||||
function del_to_mailman($listes='')
|
||||
{
|
||||
if (defined("ADHERENT_MAILMAN_UNSUB_URL") && ADHERENT_MAILMAN_UNSUB_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class AdherentOptions
|
|||
\param id id de l'adhérent
|
||||
*/
|
||||
|
||||
Function AdherentOptions($DB, $id='')
|
||||
function AdherentOptions($DB, $id='')
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->id = $id;
|
||||
|
|
@ -71,8 +71,7 @@ class AdherentOptions
|
|||
/*!
|
||||
\brief fonction qui imprime un liste d'erreurs
|
||||
*/
|
||||
|
||||
Function print_error_list()
|
||||
function print_error_list()
|
||||
{
|
||||
$num = sizeof($this->errorstr);
|
||||
for ($i = 0 ; $i < $num ; $i++)
|
||||
|
|
@ -85,8 +84,7 @@ class AdherentOptions
|
|||
\brief fonction qui vérifie les données entrées
|
||||
\param minimum
|
||||
*/
|
||||
|
||||
Function check($minimum=0)
|
||||
function check($minimum=0)
|
||||
{
|
||||
$err = 0;
|
||||
|
||||
|
|
@ -123,15 +121,15 @@ class AdherentOptions
|
|||
}
|
||||
|
||||
/*!
|
||||
\brief fonction qui crée un attribut optionnel
|
||||
\brief fonction qui crée un attribut optionnel
|
||||
\param attrname nom de l'atribut
|
||||
\param type type de l'attribut
|
||||
\param type type de l'attribut
|
||||
\param length longuer de l'attribut
|
||||
|
||||
\remarks Ceci correspond a une modification de la table et pas a un rajout d'enregistrement
|
||||
*/
|
||||
|
||||
Function create($attrname,$type='varchar',$length=255) {
|
||||
function create($attrname,$type='varchar',$length=255) {
|
||||
/*
|
||||
* Insertion dans la base
|
||||
*/
|
||||
|
|
@ -173,25 +171,24 @@ class AdherentOptions
|
|||
\param label nom du label
|
||||
*/
|
||||
|
||||
Function create_label($attrname,$label='') {
|
||||
function create_label($attrname,$label='') {
|
||||
/*
|
||||
* Insertion dans la base
|
||||
*/
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET ";
|
||||
$escaped_label=mysql_escape_string($label);
|
||||
$sql .= " name='$attrname',label='$escaped_label' ";
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
print $this->db->error();
|
||||
print "<h2><br>$sql<br></h2>";
|
||||
return 0;
|
||||
}
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)) {
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET ";
|
||||
$escaped_label=mysql_escape_string($label);
|
||||
$sql .= " name='$attrname',label='$escaped_label' ";
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
print dolibarr_print_error($this->db);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +197,7 @@ class AdherentOptions
|
|||
\param attrname nom de l'atribut
|
||||
*/
|
||||
|
||||
Function delete($attrname)
|
||||
function delete($attrname)
|
||||
{
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
|
||||
$sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options DROP COLUMN $attrname";
|
||||
|
|
@ -226,7 +223,7 @@ class AdherentOptions
|
|||
\param attrname nom du label
|
||||
*/
|
||||
|
||||
Function delete_label($attrname)
|
||||
function delete_label($attrname)
|
||||
{
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options_label WHERE name='$attrname'";
|
||||
|
|
@ -254,7 +251,7 @@ class AdherentOptions
|
|||
\param length longuer de l'attribut
|
||||
*/
|
||||
|
||||
Function update($attrname,$type='varchar',$length=255)
|
||||
function update($attrname,$type='varchar',$length=255)
|
||||
{
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
|
||||
$sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options ";
|
||||
|
|
@ -296,7 +293,7 @@ class AdherentOptions
|
|||
\param label nom du label
|
||||
*/
|
||||
|
||||
Function update_label($attrname,$label='')
|
||||
function update_label($attrname,$label='')
|
||||
{
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
|
||||
$escaped_label=mysql_escape_string($label);
|
||||
|
|
@ -318,13 +315,13 @@ class AdherentOptions
|
|||
|
||||
}
|
||||
|
||||
Function fetch_optionals()
|
||||
function fetch_optionals()
|
||||
{
|
||||
$this->fetch_name_optionals();
|
||||
$this->fetch_name_optionals_label();
|
||||
}
|
||||
|
||||
Function fetch_name_optionals()
|
||||
function fetch_name_optionals()
|
||||
{
|
||||
$array_name_options=array();
|
||||
$sql = "SHOW COLUMNS FROM ".MAIN_DB_PREFIX."adherent_options";
|
||||
|
|
@ -353,7 +350,7 @@ class AdherentOptions
|
|||
|
||||
}
|
||||
|
||||
Function fetch_name_optionals_label()
|
||||
function fetch_name_optionals_label()
|
||||
{
|
||||
$array_name_label=array();
|
||||
$sql = "SELECT name,label FROM ".MAIN_DB_PREFIX."adherent_options_label";
|
||||
|
|
|
|||
|
|
@ -44,17 +44,20 @@ class AdherentType
|
|||
|
||||
/*!
|
||||
\brief AdherentType
|
||||
\param DB base de données
|
||||
\param soc_idp
|
||||
\param DB handler accès base de données
|
||||
*/
|
||||
|
||||
Function AdherentType($DB, $soc_idp="")
|
||||
function AdherentType($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->statut = 1;
|
||||
}
|
||||
|
||||
Function print_error_list()
|
||||
/*!
|
||||
\brief print_error_list
|
||||
*/
|
||||
|
||||
function print_error_list()
|
||||
{
|
||||
$num = sizeof($this->errorstr);
|
||||
for ($i = 0 ; $i < $num ; $i++)
|
||||
|
|
@ -68,7 +71,7 @@ class AdherentType
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function create($userid)
|
||||
function create($userid)
|
||||
{
|
||||
/*
|
||||
* Insertion dans la base
|
||||
|
|
@ -92,7 +95,7 @@ class AdherentType
|
|||
}
|
||||
}
|
||||
|
||||
Function update()
|
||||
function update()
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type SET ";
|
||||
|
|
@ -124,7 +127,7 @@ class AdherentType
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function delete($rowid)
|
||||
function delete($rowid)
|
||||
{
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = $rowid";
|
||||
|
|
@ -152,7 +155,7 @@ class AdherentType
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function fetch($rowid)
|
||||
function fetch($rowid)
|
||||
{
|
||||
$sql = "SELECT *";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
|
|
@ -181,7 +184,7 @@ class AdherentType
|
|||
|
||||
}
|
||||
|
||||
Function liste_array()
|
||||
function liste_array()
|
||||
{
|
||||
$projets = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Cotisation
|
|||
\param soc_idp
|
||||
*/
|
||||
|
||||
Function Cotisation($DB, $soc_idp="")
|
||||
function Cotisation($DB, $soc_idp="")
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->modepaiementid = 0;
|
||||
|
|
@ -72,7 +72,7 @@ class Cotisation
|
|||
*
|
||||
*/
|
||||
|
||||
Function print_error_list()
|
||||
function print_error_list()
|
||||
{
|
||||
$num = sizeof($this->errorstr);
|
||||
for ($i = 0 ; $i < $num ; $i++)
|
||||
|
|
@ -86,7 +86,7 @@ class Cotisation
|
|||
*
|
||||
*/
|
||||
|
||||
Function check($minimum=0)
|
||||
function check($minimum=0)
|
||||
{
|
||||
$err = 0;
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ class Cotisation
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function create($userid)
|
||||
function create($userid)
|
||||
{
|
||||
/*
|
||||
* Insertion dans la base
|
||||
|
|
@ -206,7 +206,7 @@ class Cotisation
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function update($userid)
|
||||
function update($userid)
|
||||
{
|
||||
|
||||
$this->date = $this->db->idate($this->date);
|
||||
|
|
@ -249,7 +249,7 @@ class Cotisation
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function delete($rowid)
|
||||
function delete($rowid)
|
||||
|
||||
{
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ class Cotisation
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function fetch($rowid)
|
||||
function fetch($rowid)
|
||||
{
|
||||
$sql = "SELECT d.rowid, ".$this->db->pdate("d.datedon")." as datedon, d.prenom, d.nom, d.societe, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d, ".MAIN_DB_PREFIX."don_projet as p, ".MAIN_DB_PREFIX."c_paiement as cp";
|
||||
|
|
@ -325,7 +325,7 @@ class Cotisation
|
|||
\param userid userid de l'adhérent
|
||||
*/
|
||||
|
||||
Function valid_promesse($rowid, $userid)
|
||||
function valid_promesse($rowid, $userid)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 1, fk_user_valid = $userid WHERE rowid = $rowid AND fk_statut = 0;";
|
||||
|
|
@ -354,7 +354,7 @@ class Cotisation
|
|||
\param modedepaiement
|
||||
*/
|
||||
|
||||
Function set_paye($rowid, $modepaiement='')
|
||||
function set_paye($rowid, $modepaiement='')
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2";
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ class Cotisation
|
|||
\param commentaire
|
||||
*/
|
||||
|
||||
Function set_commentaire($rowid, $commentaire='')
|
||||
function set_commentaire($rowid, $commentaire='')
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET note = '$commentaire'";
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ class Cotisation
|
|||
\param rowid
|
||||
*/
|
||||
|
||||
Function set_encaisse($rowid)
|
||||
function set_encaisse($rowid)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 3 WHERE rowid = $rowid AND fk_statut = 2;";
|
||||
|
|
@ -444,7 +444,7 @@ class Cotisation
|
|||
* Somme des dons encaissés
|
||||
*/
|
||||
|
||||
Function sum_actual()
|
||||
function sum_actual()
|
||||
{
|
||||
$sql = "SELECT sum(amount)";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don";
|
||||
|
|
@ -462,7 +462,7 @@ class Cotisation
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function sum_pending()
|
||||
function sum_pending()
|
||||
{
|
||||
$sql = "SELECT sum(amount)";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don";
|
||||
|
|
@ -482,7 +482,7 @@ class Cotisation
|
|||
*
|
||||
*/
|
||||
|
||||
Function sum_intent()
|
||||
function sum_intent()
|
||||
{
|
||||
$sql = "SELECT sum(amount)";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* $Source$
|
||||
*/
|
||||
|
||||
Function db_create_table($db, $table)
|
||||
function db_create_table($db, $table)
|
||||
{
|
||||
|
||||
$sql = "";
|
||||
|
|
@ -33,7 +33,7 @@ Function db_create_table($db, $table)
|
|||
return $db->query($sql);
|
||||
}
|
||||
|
||||
Function db_drop_table($db, $table)
|
||||
function db_drop_table($db, $table)
|
||||
{
|
||||
|
||||
return $db->query("DROP table $table");
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Auteur {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Auteur($DB, $id=0) {
|
||||
function Auteur($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."auteur (fk_user_author) VALUES (".$user->id.")";
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function liste_array ()
|
||||
function liste_array ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."auteur ";
|
||||
|
|
@ -124,7 +124,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function liste_livre($id_type='', $status=0)
|
||||
function liste_livre($id_type='', $status=0)
|
||||
{
|
||||
$ga = array();
|
||||
if ($id_type == 'oscid')
|
||||
|
|
@ -172,7 +172,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."auteur WHERE rowid = $id";
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ class Auteur {
|
|||
*
|
||||
*/
|
||||
|
||||
Function delete() {
|
||||
function delete() {
|
||||
|
||||
$livres = $this->liste_livre();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*! \file Client.class.php
|
||||
/*! \file client.class.php
|
||||
\brief Classe permettant de gèrer des clients de la boutique online
|
||||
\author Rodolphe Quiedeville
|
||||
\version $Revision$
|
||||
|
|
@ -36,7 +36,7 @@ class Client {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Client($DB, $id=0) {
|
||||
function Client($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ class Client {
|
|||
\param id id du client
|
||||
*/
|
||||
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT customers_id, customers_lastname, customers_firstname FROM ".DB_NAME_OSC.".customers WHERE customers_id = $id";
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Commande {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Commande($DB, $id=0) {
|
||||
function Commande($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ class Commande {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, ".$this->db->pdate("date_purchased") . " as date_purchased, orders_status, orders_date_finished, currency, currency_value";
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Editeur {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Editeur($DB, $id=0) {
|
||||
function Editeur($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."editeur (fk_user_author) VALUES (".$user->id.")";
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_array ()
|
||||
function liste_array ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."editeur ";
|
||||
|
|
@ -108,7 +108,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."editeur WHERE rowid = $id";
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_livre()
|
||||
function liste_livre()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete() {
|
||||
function delete() {
|
||||
|
||||
$livres = $this->liste_livre();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Livre {
|
|||
var $price ;
|
||||
var $status ;
|
||||
|
||||
Function Livre($DB, $id=0) {
|
||||
function Livre($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
if (strlen($this->annee))
|
||||
{
|
||||
|
|
@ -110,7 +110,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function linkga($id, $gaid)
|
||||
function linkga($id, $gaid)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."livre_to_auteur (fk_livre, fk_auteur) values ($id, $gaid)";
|
||||
|
|
@ -128,7 +128,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_auteur()
|
||||
function liste_auteur()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function auteur_unlink($auteur_id)
|
||||
function auteur_unlink($auteur_id)
|
||||
{
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."livre_to_auteur ";
|
||||
|
|
@ -183,7 +183,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function unlinkcategorie($categories_id)
|
||||
function unlinkcategorie($categories_id)
|
||||
{
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products_to_categories ";
|
||||
|
|
@ -204,7 +204,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function linkcategorie($categories_id)
|
||||
function linkcategorie($categories_id)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".DB_NAME_OSC.".products_to_categories ";
|
||||
|
|
@ -225,7 +225,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function listcategorie()
|
||||
function listcategorie()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update_status($status)
|
||||
function update_status($status)
|
||||
{
|
||||
$sql = "UPDATE ".DB_NAME_OSC.".products ";
|
||||
$sql .= " SET products_status = ".$status;
|
||||
|
|
@ -309,7 +309,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function updateosc($noupdate_other=0)
|
||||
function updateosc($noupdate_other=0)
|
||||
{
|
||||
$desc = trim(addslashes($this->description));
|
||||
$desc .= "<p>";
|
||||
|
|
@ -434,7 +434,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
if (strlen($this->annee)==0)
|
||||
|
|
@ -467,7 +467,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id, $oscid=0) {
|
||||
function fetch ($id, $oscid=0) {
|
||||
|
||||
$sql = "SELECT rowid, fk_editeur, ref, prix, annee, oscid, title, description, frais_de_port FROM ".MAIN_DB_PREFIX."livre";
|
||||
if ($id)
|
||||
|
|
@ -537,7 +537,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update_image($file_name)
|
||||
function update_image($file_name)
|
||||
{
|
||||
$sql = "UPDATE ".DB_NAME_OSC.".products SET products_image='".$file_name."'";
|
||||
$sql .= " WHERE products_id = " . $this->oscid;
|
||||
|
|
@ -553,7 +553,7 @@ class Livre {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete()
|
||||
function delete()
|
||||
{
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = ".$this->oscid;
|
||||
$result = $this->db->query($sql) ;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Newsletter {
|
|||
var $email_body;
|
||||
var $status;
|
||||
|
||||
Function Newsletter($DB, $id=0) {
|
||||
function Newsletter($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."newsletter (fk_user_author, datec, nbsent) VALUES (".$user->id.",now(), 0)";
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
if (strlen(trim($this->email_replyto))==0)
|
||||
|
|
@ -97,7 +97,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, email_subject, email_from_name, email_from_email, email_replyto, email_body, target, sql_target, status, date_send_request,".$this->db->pdate("date_send_begin")." as date_send_begin,".$this->db->pdate("date_send_end")." as date_send_end, nbsent, nberror";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."newsletter WHERE rowid=$id";
|
||||
|
|
@ -136,7 +136,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_array ()
|
||||
function liste_array ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function validate($user) {
|
||||
function validate($user) {
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."newsletter SET status=1, fk_user_valid = $user->id WHERE rowid = $this->id";
|
||||
$return = $this->db->query($sql) ;
|
||||
|
|
@ -180,7 +180,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function send($user) {
|
||||
function send($user) {
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."newsletter SET status=2, date_send_request=now() WHERE rowid = $this->id";
|
||||
$return = $this->db->query($sql) ;
|
||||
|
|
@ -190,7 +190,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function build_sql($target)
|
||||
function build_sql($target)
|
||||
{
|
||||
if ($target == 1)
|
||||
{
|
||||
|
|
@ -207,7 +207,7 @@ class Newsletter {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete() {
|
||||
function delete() {
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."newsletter WHERE rowid = $this->id ";
|
||||
$return = $this->db->query($sql) ;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Editeur {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Editeur($DB, $id=0) {
|
||||
function Editeur($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."editeur (fk_user_author) VALUES (".$user->id.")";
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_array ()
|
||||
function liste_array ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."editeur ";
|
||||
|
|
@ -108,7 +108,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."editeur WHERE rowid = $id";
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ class Editeur {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc ";
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ require (DOL_DOCUMENT_ROOT ."/includes/fpdf/fpdf_html.php");
|
|||
|
||||
Class CommActionRapport {
|
||||
|
||||
Function CommActionRapport($db=0, $month, $year)
|
||||
function CommActionRapport($db=0, $month, $year)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "";
|
||||
|
|
@ -34,7 +34,7 @@ Class CommActionRapport {
|
|||
$this->year = $year;
|
||||
}
|
||||
|
||||
Function generate($socid = 0, $catid = 0)
|
||||
function generate($socid = 0, $catid = 0)
|
||||
{
|
||||
global $user;
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ Class CommActionRapport {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _cover(&$pdf)
|
||||
function _cover(&$pdf)
|
||||
{
|
||||
$pdf->AddPage();
|
||||
$pdf->SetAutoPageBreak(false);
|
||||
|
|
@ -131,7 +131,7 @@ Class CommActionRapport {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function _pages(&$pdf)
|
||||
function _pages(&$pdf)
|
||||
{
|
||||
$pdf->AddPage();
|
||||
$pdf->SetAutoPageBreak(true);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class PropaleStats extends Stats
|
|||
{
|
||||
var $db ;
|
||||
|
||||
Function PropaleStats($DB)
|
||||
function PropaleStats($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ class PropaleStats extends Stats
|
|||
* Renvoie le nombre de proposition par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getNbByMonth($year)
|
||||
function getNbByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datep,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
@ -49,7 +49,7 @@ class PropaleStats extends Stats
|
|||
* Renvoie le nombre de propale par année
|
||||
*
|
||||
*/
|
||||
Function getNbByYear()
|
||||
function getNbByYear()
|
||||
{
|
||||
$sql = "SELECT date_format(datep,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."propal GROUP BY dm DESC WHERE fk_statut > 0";
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ class PropaleStats extends Stats
|
|||
* Renvoie le nombre de propale par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getAmountByMonth($year)
|
||||
function getAmountByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datep,'%m') as dm, sum(price) FROM ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
@ -71,7 +71,7 @@ class PropaleStats extends Stats
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function getAverageByMonth($year)
|
||||
function getAverageByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datep,'%m') as dm, avg(price) FROM ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Propal_Model_Pdf {
|
|||
|
||||
var $nom;
|
||||
|
||||
Function Propal_Model_Pdf($DB)
|
||||
function Propal_Model_Pdf($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ class Propal_Model_Pdf {
|
|||
*
|
||||
*/
|
||||
|
||||
Function liste_array()
|
||||
function liste_array()
|
||||
{
|
||||
$projets = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Commande
|
|||
* Initialisation
|
||||
*
|
||||
*/
|
||||
Function Commande($DB)
|
||||
function Commande($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ class Commande
|
|||
* Créé la facture depuis une propale existante
|
||||
*
|
||||
*/
|
||||
Function create_from_propale($user, $propale_id)
|
||||
function create_from_propale($user, $propale_id)
|
||||
{
|
||||
$propal = new Propal($this->db);
|
||||
$propal->fetch($propale_id);
|
||||
|
|
@ -90,7 +90,7 @@ class Commande
|
|||
* Valide la commande
|
||||
*
|
||||
*/
|
||||
Function valid($user)
|
||||
function valid($user)
|
||||
{
|
||||
$result = 0;
|
||||
if ($user->rights->commande->valider)
|
||||
|
|
@ -135,7 +135,7 @@ class Commande
|
|||
* Cloture la commande
|
||||
*
|
||||
*/
|
||||
Function cloture($user)
|
||||
function cloture($user)
|
||||
{
|
||||
if ($user->rights->commande->valider)
|
||||
{
|
||||
|
|
@ -158,7 +158,7 @@ class Commande
|
|||
* Annule la commande
|
||||
*
|
||||
*/
|
||||
Function cancel($user)
|
||||
function cancel($user)
|
||||
{
|
||||
if ($user->rights->commande->valider)
|
||||
{
|
||||
|
|
@ -181,7 +181,7 @@ class Commande
|
|||
* Créé la commande
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
/* On positionne en mode brouillon la commande */
|
||||
$this->brouillon = 1;
|
||||
|
|
@ -274,7 +274,7 @@ class Commande
|
|||
* Ajoute un produit
|
||||
*
|
||||
*/
|
||||
Function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0)
|
||||
function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0)
|
||||
{
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
|
|
@ -320,7 +320,7 @@ class Commande
|
|||
* Ajoute une ligne de commande
|
||||
*
|
||||
*/
|
||||
Function addline( $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0)
|
||||
function addline( $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0)
|
||||
{
|
||||
if ($this->brouillon && strlen(trim($desc)))
|
||||
{
|
||||
|
|
@ -369,7 +369,7 @@ class Commande
|
|||
* Ajoute un produit dans la commande
|
||||
*
|
||||
*/
|
||||
Function add_product($idproduct, $qty, $remise_percent=0)
|
||||
function add_product($idproduct, $qty, $remise_percent=0)
|
||||
{
|
||||
if ($idproduct > 0)
|
||||
{
|
||||
|
|
@ -388,7 +388,7 @@ class Commande
|
|||
* Lit une commande
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva";
|
||||
$sql .= ", ".$this->db->pdate("c.date_commande")." as date_commande, c.fk_projet, c.remise_percent, c.source, c.facture";
|
||||
|
|
@ -453,7 +453,7 @@ class Commande
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch_lignes($only_product=0)
|
||||
function fetch_lignes($only_product=0)
|
||||
{
|
||||
$this->lignes = array();
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ class Commande
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function livraison_array()
|
||||
function livraison_array()
|
||||
{
|
||||
$this->livraisons = array();
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ class Commande
|
|||
* Renvoie un tableau avec les livraison par ligne
|
||||
*
|
||||
*/
|
||||
Function nb_expedition()
|
||||
function nb_expedition()
|
||||
{
|
||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."expedition as e";
|
||||
$sql .=" WHERE e.fk_commande = $this->id";
|
||||
|
|
@ -549,7 +549,7 @@ class Commande
|
|||
* Supprime une ligne de la commande
|
||||
*
|
||||
*/
|
||||
Function delete_line($idligne)
|
||||
function delete_line($idligne)
|
||||
{
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
|
|
@ -571,7 +571,7 @@ class Commande
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function set_remise($user, $remise)
|
||||
function set_remise($user, $remise)
|
||||
{
|
||||
if ($user->rights->commande->creer)
|
||||
{
|
||||
|
|
@ -597,7 +597,7 @@ class Commande
|
|||
* Classe la facture comme facturée
|
||||
*
|
||||
*/
|
||||
Function classer_facturee()
|
||||
function classer_facturee()
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET facture = 1";
|
||||
$sql .= " WHERE rowid = ".$this->id." AND fk_statut > 0 ;";
|
||||
|
|
@ -616,7 +616,7 @@ class Commande
|
|||
* Mettre à jour le prix
|
||||
*
|
||||
*/
|
||||
Function update_price()
|
||||
function update_price()
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . "/lib/price.lib.php";
|
||||
|
||||
|
|
@ -673,7 +673,7 @@ class Commande
|
|||
* Mets à jour une ligne de commande
|
||||
*
|
||||
*/
|
||||
Function update_line($rowid, $desc, $pu, $qty, $remise_percent=0)
|
||||
function update_line($rowid, $desc, $pu, $qty, $remise_percent=0)
|
||||
{
|
||||
if ($this->brouillon)
|
||||
{
|
||||
|
|
@ -711,7 +711,7 @@ class Commande
|
|||
* Supprime la commande
|
||||
*
|
||||
*/
|
||||
Function delete()
|
||||
function delete()
|
||||
{
|
||||
$err = 0;
|
||||
|
||||
|
|
@ -750,7 +750,7 @@ class Commande
|
|||
* Classe la commande
|
||||
*
|
||||
*/
|
||||
Function classin($cat_id)
|
||||
function classin($cat_id)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_projet = $cat_id";
|
||||
$sql .= " WHERE rowid = $this->id;";
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class OscCommande {
|
|||
var $id ;
|
||||
var $client_name ;
|
||||
|
||||
Function OscCommande($DB, $id=0) {
|
||||
function OscCommande($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ class OscCommande {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
|
||||
$sql = "SELECT o.orders_id, o.customers_name, o.orders_status FROM ".DB_NAME_OSC.".orders as o";
|
||||
|
|
@ -61,7 +61,7 @@ class OscCommande {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_products ()
|
||||
function liste_products ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ class CommandeStats
|
|||
{
|
||||
var $db ;
|
||||
|
||||
Function CommandeStats($DB, $socidp)
|
||||
function CommandeStats($DB, $socidp)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->socidp = $socidp;
|
||||
}
|
||||
|
||||
Function getNbCommandeByMonthWithPrevYear($year)
|
||||
function getNbCommandeByMonthWithPrevYear($year)
|
||||
{
|
||||
$data1 = $this->getNbCommandeByMonth($year - 1);
|
||||
$data2 = $this->getNbCommandeByMonth($year);
|
||||
|
|
@ -49,7 +49,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getNbCommandeByMonth($year)
|
||||
function getNbCommandeByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
@ -93,7 +93,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par année
|
||||
*
|
||||
*/
|
||||
Function getNbByYear()
|
||||
function getNbByYear()
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%Y') as dm, count(*), sum(total_ht) FROM ".MAIN_DB_PREFIX."commande WHERE fk_statut > 0";
|
||||
|
|
@ -121,7 +121,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getCommandeAmountByMonth($year)
|
||||
function getCommandeAmountByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, sum(total_ht) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
@ -157,7 +157,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getCommandeAverageByMonth($year)
|
||||
function getCommandeAverageByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, avg(total_ht) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Account
|
|||
var $proprio;
|
||||
var $adresse_proprio;
|
||||
|
||||
Function Account($DB, $rowid=0)
|
||||
function Account($DB, $rowid=0)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class Account
|
|||
* Efface une entree dans la table ".MAIN_DB_PREFIX."bank
|
||||
*/
|
||||
|
||||
Function deleteline($rowid)
|
||||
function deleteline($rowid)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=$rowid";
|
||||
$result = $this->db->query($sql);
|
||||
|
|
@ -70,7 +70,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function add_url_line($line_id, $url_id, $url, $label)
|
||||
function add_url_line($line_id, $url_id, $url, $label)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (fk_bank, url_id, url, label)";
|
||||
$sql .= " VALUES ('$line_id', '$url_id', '$url', '$label')";
|
||||
|
|
@ -91,7 +91,7 @@ class Account
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function get_url($line_id)
|
||||
function get_url($line_id)
|
||||
{
|
||||
$lines = array();
|
||||
$sql = "SELECT fk_bank, url_id, url, label FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank = $line_id";
|
||||
|
|
@ -116,7 +116,7 @@ class Account
|
|||
* Ajoute une entree dans la table ".MAIN_DB_PREFIX."bank
|
||||
*
|
||||
*/
|
||||
Function addline($date, $oper, $label, $amount, $num_chq='', $categorie='',$user)
|
||||
function addline($date, $oper, $label, $amount, $num_chq='', $categorie='',$user)
|
||||
{
|
||||
if ($this->rowid)
|
||||
{
|
||||
|
|
@ -181,7 +181,7 @@ class Account
|
|||
* Creation du compte bancaire
|
||||
*
|
||||
*/
|
||||
Function create()
|
||||
function create()
|
||||
{
|
||||
// Chargement librairie pour acces fonction controle RIB
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/bank/bank.lib.php';
|
||||
|
|
@ -224,7 +224,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($user='')
|
||||
function update($user='')
|
||||
{
|
||||
// Chargement librairie pour acces fonction controle RIB
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/bank/bank.lib.php';
|
||||
|
|
@ -272,7 +272,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch($id)
|
||||
function fetch($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
$sql = "SELECT rowid, label, bank, number, courant, clos, code_banque, code_guichet, cle_rib, bic, iban_prefix, domiciliation, proprio, adresse_proprio FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
|
|
@ -312,7 +312,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function solde()
|
||||
function solde()
|
||||
{
|
||||
$sql = "SELECT sum(amount) FROM ".MAIN_DB_PREFIX."bank WHERE fk_account=$this->id AND dateo <=" . $this->db->idate(time() );
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function datev_next($rowid)
|
||||
function datev_next($rowid)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank SET ";
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ class Account
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function datev_previous($rowid)
|
||||
function datev_previous($rowid)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."bank SET ";
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ llxFooter("<em>Dernière modification $Date$ révision $Revision$</e
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function _print_lines($db,$sql,$acct)
|
||||
function _print_lines($db,$sql,$acct)
|
||||
{
|
||||
global $bc, $nbline, $viewline, $user, $page;
|
||||
$var=True;
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ function gljCreate_Login_Cand($db, $login, $pass, $pass2) {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function gljCreateCompany($db, $company_name, $address, $cp, $ville, $fkpays, $phone, $fax, $url,
|
||||
function gljCreateCompany($db, $company_name, $address, $cp, $ville, $fkpays, $phone, $fax, $url,
|
||||
$fksecteur, $fkeffectif, $fktypent, $c_nom, $c_prenom, $c_phone, $c_mail, $siren,
|
||||
$parentidp=0, $setid=0, &$numerror) {
|
||||
/*
|
||||
|
|
@ -271,7 +271,7 @@ Function gljCreateCompany($db, $company_name, $address, $cp, $ville, $fkpays, $p
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function gljVerifCompany(&$company_name, &$address, &$cp, &$ville, &$fkpays, &$phone, &$fax, &$url, &$fksecteur,&$fkeffectif, &$c_nom, &$c_prenom, &$c_phone, &$c_mail, &$numerror) {
|
||||
function gljVerifCompany(&$company_name, &$address, &$cp, &$ville, &$fkpays, &$phone, &$fax, &$url, &$fksecteur,&$fkeffectif, &$c_nom, &$c_prenom, &$c_phone, &$c_mail, &$numerror) {
|
||||
$numerror = 0;
|
||||
|
||||
if (!strlen(trim($company_name))) { $numerror = 4; }
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Deplacement
|
|||
/*
|
||||
* Initialistation automatique de la classe
|
||||
*/
|
||||
Function Deplacement($DB)
|
||||
function Deplacement($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class Deplacement
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."deplacement (datec, fk_user_author) VALUES (now(), $user->id)";
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ class Deplacement
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function update($user)
|
||||
function update($user)
|
||||
{
|
||||
if (strlen($this->km)==0)
|
||||
$this->km = 0;
|
||||
|
|
@ -84,7 +84,7 @@ class Deplacement
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
$sql = "SELECT fk_user, km, fk_soc,".$this->db->pdate("dated")." as dated";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = $id";
|
||||
|
|
@ -111,7 +111,7 @@ class Deplacement
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function delete($id)
|
||||
function delete($id)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = $id";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class FactureRec
|
|||
* Initialisation de la class
|
||||
*
|
||||
*/
|
||||
Function FactureRec($DB, $facid=0)
|
||||
function FactureRec($DB, $facid=0)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->facid = $facid;
|
||||
|
|
@ -53,7 +53,7 @@ class FactureRec
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
/*
|
||||
*
|
||||
|
|
@ -128,7 +128,7 @@ class FactureRec
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch($rowid, $societe_id=0)
|
||||
function fetch($rowid, $societe_id=0)
|
||||
{
|
||||
|
||||
$sql = "SELECT f.fk_soc,f.titre,f.amount,f.tva,f.total,f.total_ttc,f.remise,f.remise_percent,f.fk_projet, c.rowid as crid, c.libelle, c.libelle_facture, f.note, f.fk_user_author";
|
||||
|
|
@ -228,7 +228,7 @@ class FactureRec
|
|||
* Recupére l'objet client lié à la facture
|
||||
*
|
||||
*/
|
||||
Function fetch_client()
|
||||
function fetch_client()
|
||||
{
|
||||
$client = new Societe($this->db);
|
||||
$client->fetch($this->socidp);
|
||||
|
|
@ -240,7 +240,7 @@ class FactureRec
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function valid($userid, $dir)
|
||||
function valid($userid, $dir)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET fk_statut = 1, date_valid=now(), fk_user_valid=$userid";
|
||||
$sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;";
|
||||
|
|
@ -259,7 +259,7 @@ class FactureRec
|
|||
* Supprime la facture
|
||||
*
|
||||
*/
|
||||
Function delete($rowid)
|
||||
function delete($rowid)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = $rowid;";
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ class FactureRec
|
|||
* Valide la facture
|
||||
*
|
||||
*/
|
||||
Function set_valid($rowid, $user, $soc)
|
||||
function set_valid($rowid, $user, $soc)
|
||||
{
|
||||
if ($this->brouillon)
|
||||
{
|
||||
|
|
@ -344,7 +344,7 @@ class FactureRec
|
|||
* Ajoute un produit dans la facture
|
||||
*
|
||||
*/
|
||||
Function add_product($idproduct, $qty, $remise_percent)
|
||||
function add_product($idproduct, $qty, $remise_percent)
|
||||
{
|
||||
if ($idproduct > 0)
|
||||
{
|
||||
|
|
@ -362,7 +362,7 @@ class FactureRec
|
|||
* Ajoute une ligne de facture
|
||||
*
|
||||
*/
|
||||
Function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0)
|
||||
function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0)
|
||||
{
|
||||
if ($this->brouillon)
|
||||
{
|
||||
|
|
@ -398,7 +398,7 @@ class FactureRec
|
|||
* Mets à jour une ligne de facture
|
||||
*
|
||||
*/
|
||||
Function updateline($rowid, $desc, $pu, $qty, $remise_percent=0)
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0)
|
||||
{
|
||||
if ($this->brouillon)
|
||||
{
|
||||
|
|
@ -429,7 +429,7 @@ class FactureRec
|
|||
* Supprime une ligne
|
||||
*
|
||||
*/
|
||||
Function deleteline($rowid)
|
||||
function deleteline($rowid)
|
||||
{
|
||||
if ($this->brouillon)
|
||||
{
|
||||
|
|
@ -443,7 +443,7 @@ class FactureRec
|
|||
* Mise à jour des sommes de la facture
|
||||
*
|
||||
*/
|
||||
Function updateprice($facid)
|
||||
function updateprice($facid)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . "/lib/price.lib.php";
|
||||
$err=0;
|
||||
|
|
@ -512,7 +512,7 @@ class FactureRec
|
|||
* Applique une remise
|
||||
*
|
||||
*/
|
||||
Function set_remise($user, $remise)
|
||||
function set_remise($user, $remise)
|
||||
{
|
||||
if ($user->rights->facture->creer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class FactureStats extends Stats
|
|||
{
|
||||
var $db ;
|
||||
|
||||
Function FactureStats($DB, $socidp=0)
|
||||
function FactureStats($DB, $socidp=0)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->socidp = $socidp;
|
||||
|
|
@ -37,7 +37,7 @@ class FactureStats extends Stats
|
|||
* Renvoie le nombre de facture par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getNbByMonth($year)
|
||||
function getNbByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datef,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
@ -55,7 +55,7 @@ class FactureStats extends Stats
|
|||
* Renvoie le nombre de facture par année
|
||||
*
|
||||
*/
|
||||
Function getNbByYear()
|
||||
function getNbByYear()
|
||||
{
|
||||
$sql = "SELECT date_format(datef,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."facture GROUP BY dm DESC WHERE fk_statut > 0";
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class FactureStats extends Stats
|
|||
* Renvoie le nombre de facture par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getAmountByMonth($year)
|
||||
function getAmountByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datef,'%m') as dm, sum(total) FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
@ -81,7 +81,7 @@ class FactureStats extends Stats
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function getAverageByMonth($year)
|
||||
function getAverageByMonth($year)
|
||||
{
|
||||
$sql = "SELECT date_format(datef,'%m') as dm, avg(total) FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class Reduc {
|
|||
var $price;
|
||||
var $label;
|
||||
|
||||
Function Reduc($DB, $rowid=0) {
|
||||
function Reduc($DB, $rowid=0) {
|
||||
global $config;
|
||||
|
||||
$this->db = $DB;
|
||||
|
|
@ -34,7 +34,7 @@ class Reduc {
|
|||
return 1;
|
||||
}
|
||||
|
||||
Function fetch($id) {
|
||||
function fetch($id) {
|
||||
$sql = "SELECT b.rowid,".$this->db->pdate("b.date_debut")." as debut,".$this->db->pdate("b.date_fin")." as fin, b.amount, b.label ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."voyage_reduc as b WHERE rowid = $id";
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Conf
|
|||
var $readonly;
|
||||
var $dbi;
|
||||
|
||||
Function Conf()
|
||||
function Conf()
|
||||
{
|
||||
$this->db = new DbConf();
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ class Conf
|
|||
|
||||
class ComptaConf
|
||||
{
|
||||
Function ComptaConf()
|
||||
function ComptaConf()
|
||||
{
|
||||
$this->tva = 1;
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ class ComptaConf
|
|||
|
||||
class PropalConf
|
||||
{
|
||||
Function PropalConf()
|
||||
function PropalConf()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ class PropalConf
|
|||
*/
|
||||
|
||||
class DbConf {
|
||||
Function DbConf()
|
||||
function DbConf()
|
||||
{
|
||||
$this->type = "mysql";
|
||||
$this->host = "";
|
||||
|
|
@ -109,7 +109,7 @@ class DbConf {
|
|||
|
||||
/** return the dsn according to the pear syntax
|
||||
*/
|
||||
Function getdsn()
|
||||
function getdsn()
|
||||
{
|
||||
return ($this->type.'://'.$this->user.':'.$this->pass.'@'.$this->host.'/'.$this->name);
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ class DbConf {
|
|||
*/
|
||||
class WebcalConf
|
||||
{
|
||||
Function WebcalConf()
|
||||
function WebcalConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
$this->url = defined("PHPWEBCALENDAR_URL")?PHPWEBCALENDAR_URL:"";
|
||||
|
|
@ -140,7 +140,7 @@ class WebcalConf
|
|||
*/
|
||||
class FactureConf
|
||||
{
|
||||
Function FactureConf()
|
||||
function FactureConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ class FactureConf
|
|||
*/
|
||||
class DonConf
|
||||
{
|
||||
Function DonConf()
|
||||
function DonConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ class DonConf
|
|||
*/
|
||||
class ProduitConf
|
||||
{
|
||||
Function ProduitConf()
|
||||
function ProduitConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ class ProduitConf
|
|||
*/
|
||||
class ServiceConf
|
||||
{
|
||||
Function ServiceConf()
|
||||
function ServiceConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ class ServiceConf
|
|||
*
|
||||
*/
|
||||
class AdherentConf {
|
||||
Function AdherentConf() {
|
||||
function AdherentConf() {
|
||||
$this->enabled = 0;
|
||||
$this->email_new = "Merci de votre inscription. Votre adhesion devrait etre rapidement validee.\nVoici le rappel des coordonnees que vous avez rentrees (toute information erronee entrainera la non validation de votre inscription) :\n\n%INFO%\n\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l'adresse suivante :\n%SERVEUR%public/adherents/\n\n";
|
||||
$this->email_new_subject = 'Vos coordonnees sur %SERVEUR%';
|
||||
|
|
@ -214,7 +214,7 @@ class AdherentConf {
|
|||
*/
|
||||
class DomaineConf
|
||||
{
|
||||
Function DomaineConf()
|
||||
function DomaineConf()
|
||||
{
|
||||
$this->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Contrat
|
|||
*
|
||||
*/
|
||||
|
||||
Function Contrat($DB)
|
||||
function Contrat($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->product = new Product($DB);
|
||||
|
|
@ -45,7 +45,7 @@ class Contrat
|
|||
* Si la duree est renseignée, date_start=date_start et date_end=date_start+duree
|
||||
* sinon date_start=date_start et date_end=date_end
|
||||
*/
|
||||
Function mise_en_service($user, $date_start, $duree=0, $date_end)
|
||||
function mise_en_service($user, $date_start, $duree=0, $date_end)
|
||||
{
|
||||
if ($duree) {
|
||||
// Si duree renseignee
|
||||
|
|
@ -89,7 +89,7 @@ class Contrat
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function cloture($user)
|
||||
function cloture($user)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET enservice = 2";
|
||||
$sql .= " , date_cloture = now(), fk_user_cloture = ".$user->id;
|
||||
|
|
@ -101,7 +101,7 @@ class Contrat
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function annule($user)
|
||||
function annule($user)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET enservice = 0";
|
||||
$sql .= " , date_cloture = now(), fk_user_cloture = ".$user->id;
|
||||
|
|
@ -113,7 +113,7 @@ class Contrat
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
$sql = "SELECT rowid, enservice, fk_soc, fk_product, ".$this->db->pdate("mise_en_service")." as datemise";
|
||||
$sql .= ", fk_user_mise_en_service, ".$this->db->pdate("date_cloture")." as datecloture";
|
||||
|
|
@ -155,7 +155,7 @@ class Contrat
|
|||
* Crée autant de contrats que de lignes de facture, pour une facture donnée
|
||||
*
|
||||
*/
|
||||
Function create_from_facture($factureid, $user, $socid)
|
||||
function create_from_facture($factureid, $user, $socid)
|
||||
{
|
||||
$sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Expedition
|
|||
* Initialisation
|
||||
*
|
||||
*/
|
||||
Function Expedition($DB)
|
||||
function Expedition($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->lignes = array();
|
||||
|
|
@ -52,7 +52,7 @@ class Expedition
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php";
|
||||
$error = 0;
|
||||
|
|
@ -133,7 +133,7 @@ class Expedition
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create_line($transaction, $commande_ligne_id, $qty)
|
||||
function create_line($transaction, $commande_ligne_id, $qty)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ class Expedition
|
|||
* Lit une commande
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
$sql = "SELECT e.rowid, e.date_creation, e.ref, e.fk_user_author, e.fk_statut, e.fk_commande, e.fk_entrepot";
|
||||
$sql .= ", ".$this->db->pdate("e.date_expedition")." as date_expedition ";
|
||||
|
|
@ -205,7 +205,7 @@ class Expedition
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function valid($user)
|
||||
function valid($user)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php";
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ class Expedition
|
|||
* Ajoute un produit
|
||||
*
|
||||
*/
|
||||
Function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0)
|
||||
function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0)
|
||||
{
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
|
|
@ -302,7 +302,7 @@ class Expedition
|
|||
* Ajoute une ligne
|
||||
*
|
||||
*/
|
||||
Function addline( $id, $qty )
|
||||
function addline( $id, $qty )
|
||||
{
|
||||
$num = sizeof($this->lignes);
|
||||
$ligne = new ExpeditionLigne();
|
||||
|
|
@ -317,7 +317,7 @@ class Expedition
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete_line($idligne)
|
||||
function delete_line($idligne)
|
||||
{
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
|
|
@ -339,7 +339,7 @@ class Expedition
|
|||
* Supprime la fiche
|
||||
*
|
||||
*/
|
||||
Function delete()
|
||||
function delete()
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ class Expedition
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function classin($cat_id)
|
||||
function classin($cat_id)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_projet = $cat_id";
|
||||
$sql .= " WHERE rowid = $this->id;";
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if ( $db->query($sql) )
|
|||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print_liste_field_titre_new ("Réf","liste.php","e.ref","","&socidp=$socidp",'width="15%"',$sortfield);
|
||||
print_liste_field_titre_new ($langs->trans("Ref"),"liste.php","e.ref","","&socidp=$socidp",'width="15%"',$sortfield);
|
||||
|
||||
print_liste_field_titre_new ("Date","liste.php","e.date_expedition","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class ExpeditionStats
|
|||
{
|
||||
var $db ;
|
||||
|
||||
Function ExpeditionStats($DB)
|
||||
function ExpeditionStats($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ class ExpeditionStats
|
|||
* Renvoie le nombre de expedition par année
|
||||
*
|
||||
*/
|
||||
Function getNbExpeditionByYear()
|
||||
function getNbExpeditionByYear()
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_expedition,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."expedition GROUP BY dm DESC WHERE fk_statut > 0";
|
||||
|
|
@ -55,7 +55,7 @@ class ExpeditionStats
|
|||
* Renvoie le nombre de expedition par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getNbExpeditionByMonth($year)
|
||||
function getNbExpeditionByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_expedition,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."expedition";
|
||||
|
|
@ -92,7 +92,7 @@ class ExpeditionStats
|
|||
}
|
||||
|
||||
|
||||
Function getNbExpeditionByMonthWithPrevYear($year)
|
||||
function getNbExpeditionByMonthWithPrevYear($year)
|
||||
{
|
||||
$data1 = $this->getNbExpeditionByMonth($year);
|
||||
$data2 = $this->getNbExpeditionByMonth($year - 1);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Fichinter
|
|||
var $note;
|
||||
var $projet_id;
|
||||
|
||||
Function Fichinter($DB, $soc_idp="")
|
||||
function Fichinter($DB, $soc_idp="")
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->socidp = $soc_idp;
|
||||
|
|
@ -40,7 +40,7 @@ class Fichinter
|
|||
$this->projet_id = 0;
|
||||
}
|
||||
|
||||
Function add_product($idproduct)
|
||||
function add_product($idproduct)
|
||||
{
|
||||
if ($idproduct > 0)
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create()
|
||||
function create()
|
||||
{
|
||||
/*
|
||||
* Insertion dans la base
|
||||
|
|
@ -75,7 +75,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id)
|
||||
function update($id)
|
||||
{
|
||||
if (! strlen($this->projet_id))
|
||||
{
|
||||
|
|
@ -104,7 +104,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function get_new_num($prefix_comm)
|
||||
function get_new_num($prefix_comm)
|
||||
{
|
||||
|
||||
$sql = "SELECT max(ref) FROM ".MAIN_DB_PREFIX."fichinter WHERE ref like 'FI-".$prefix_comm."-%'";
|
||||
|
|
@ -141,7 +141,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch($rowid)
|
||||
function fetch($rowid)
|
||||
{
|
||||
|
||||
$sql = "SELECT ref,note,fk_soc,fk_statut,duree,".$this->db->pdate(datei)."as di, fk_projet FROM ".MAIN_DB_PREFIX."fichinter WHERE rowid=$rowid;";
|
||||
|
|
@ -176,7 +176,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function valid($userid, $outputdir)
|
||||
function valid($userid, $outputdir)
|
||||
{
|
||||
$action_notify = 1; // ne pas modifier cette valeur
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ class Fichinter
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch_client()
|
||||
function fetch_client()
|
||||
{
|
||||
$client = new Societe($this->db);
|
||||
$client->fetch($this->societe_id);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class PaiementFourn
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function PaiementFourn($DB)
|
||||
function PaiementFourn($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@ class PaiementFourn
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
/*
|
||||
* Insertion dans la base
|
||||
|
|
@ -99,7 +99,7 @@ class PaiementFourn
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function select($name, $filtre='', $id='')
|
||||
function select($name, $filtre='', $id='')
|
||||
{
|
||||
$form = new Form($this->db);
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ class PaiementFourn
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($id)
|
||||
function delete($id)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn WHERE rowid = $id";
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function DolibarrModules($DB)
|
||||
function DolibarrModules($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function _init($array_sql)
|
||||
function _init($array_sql)
|
||||
{
|
||||
/*
|
||||
* Activation du module:
|
||||
|
|
@ -146,7 +146,7 @@ class DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _remove($array_sql)
|
||||
function _remove($array_sql)
|
||||
{
|
||||
$err = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@
|
|||
|
||||
Class mod_commande_ivoire
|
||||
{
|
||||
Function mod_commande_ivoire()
|
||||
function mod_commande_ivoire()
|
||||
{
|
||||
$this->nom = "Ivoire";
|
||||
}
|
||||
|
||||
Function info()
|
||||
function info()
|
||||
{
|
||||
return "Renvoie le numéro sous la forme numérique C0M1, COM2, COM3, ...";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Class pdf_adytek extends FPDF{
|
||||
|
||||
Function pdf_adytek($db=0)
|
||||
function pdf_adytek($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de facture avec remise et infos réglement à la mode de chez nous";
|
||||
|
|
@ -34,13 +34,13 @@ Class pdf_adytek extends FPDF{
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -263,7 +263,7 @@ Class pdf_adytek extends FPDF{
|
|||
$x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
|
||||
}
|
||||
///////////////////////////////
|
||||
Function _tableau_compl(&$pdf, $fac)
|
||||
function _tableau_compl(&$pdf, $fac)
|
||||
{
|
||||
$tab3_top = 240;
|
||||
$tab3_height = 18;
|
||||
|
|
@ -287,7 +287,7 @@ Class pdf_adytek extends FPDF{
|
|||
$pdf->MultiCell(20, 6, "Banque", 0, 'L', 0);
|
||||
}
|
||||
|
||||
Function _tableau_tot(&$pdf, $fac)
|
||||
function _tableau_tot(&$pdf, $fac)
|
||||
{
|
||||
$tab2_top = 212;
|
||||
$tab2_hl = 5;
|
||||
|
|
@ -360,7 +360,7 @@ Class pdf_adytek extends FPDF{
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ Class pdf_adytek extends FPDF{
|
|||
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
$tab4_top = 60;
|
||||
$tab4_hl = 6;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Class pdf_bernique {
|
||||
|
||||
Function pdf_bernique($db=0)
|
||||
function pdf_bernique($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle pour les factures avec plusieurs taux de tva, inclus aussi le numéro de TVA Intracommunautaire";
|
||||
|
|
@ -34,13 +34,13 @@ Class pdf_bernique {
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -189,7 +189,7 @@ Class pdf_bernique {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _tableau_compl(&$pdf, $fac)
|
||||
function _tableau_compl(&$pdf, $fac)
|
||||
{
|
||||
$tab3_top = 240;
|
||||
$tab3_height = 18;
|
||||
|
|
@ -218,7 +218,7 @@ Class pdf_bernique {
|
|||
$pdf->MultiCell(120, 5, $titre, 0, 'J');
|
||||
}
|
||||
|
||||
Function _tableau_tot(&$pdf, $fac, $top, $height)
|
||||
function _tableau_tot(&$pdf, $fac, $top, $height)
|
||||
{
|
||||
$tab2_top = $top + $height;
|
||||
$tab2_hl = 5;
|
||||
|
|
@ -282,7 +282,7 @@ Class pdf_bernique {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ Class pdf_bernique {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
|
||||
$pdf->SetXY(10,5);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Class pdf_bigorneau {
|
||||
|
||||
Function pdf_bigorneau($db=0)
|
||||
function pdf_bigorneau($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de facture sans boite info réglement";
|
||||
|
|
@ -34,13 +34,13 @@ Class pdf_bigorneau {
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -227,7 +227,7 @@ Class pdf_bigorneau {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ Class pdf_bigorneau {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
|
||||
$pdf->SetXY(10,5);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Class pdf_bulot {
|
||||
|
||||
Function pdf_bulot($db=0)
|
||||
function pdf_bulot($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de facture avec remise et infos réglement";
|
||||
|
|
@ -34,13 +34,13 @@ Class pdf_bulot {
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -193,7 +193,7 @@ Class pdf_bulot {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _tableau_compl(&$pdf, $fac)
|
||||
function _tableau_compl(&$pdf, $fac)
|
||||
{
|
||||
$tab3_top = 240;
|
||||
$tab3_height = 18;
|
||||
|
|
@ -217,7 +217,7 @@ Class pdf_bulot {
|
|||
$pdf->MultiCell(20, 6, "Banque", 0, 'L', 0);
|
||||
}
|
||||
|
||||
Function _tableau_tot(&$pdf, $fac)
|
||||
function _tableau_tot(&$pdf, $fac)
|
||||
{
|
||||
$tab2_top = 212;
|
||||
$tab2_hl = 5;
|
||||
|
|
@ -290,7 +290,7 @@ Class pdf_bulot {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ Class pdf_bulot {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
|
||||
$pdf->SetXY(10,5);
|
||||
|
|
|
|||
|
|
@ -21,22 +21,29 @@
|
|||
*
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
/*! \file pdf_crabe.modules.php
|
||||
\brief Classe permettant de générer lune facture au modèle Crabe
|
||||
\brief Fichier de la classe permettant de générer les factures au modèle Crabe
|
||||
\author Laurent Destailleur
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
|
||||
|
||||
/*! \class pdf_crabe
|
||||
\brief Classe permettant de générer les factures au modèle Crabe
|
||||
*/
|
||||
|
||||
Class pdf_crabe {
|
||||
var $error='';
|
||||
|
||||
/*!
|
||||
\brief Constructeur
|
||||
\param db objet base de donnée
|
||||
\brief Constructeur
|
||||
\param db handler accès base de donnée
|
||||
*/
|
||||
Function pdf_crabe($db=0)
|
||||
function pdf_crabe($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de facture complet (Gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, logo...)";
|
||||
|
|
@ -52,15 +59,16 @@ Class pdf_crabe {
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Fonction générant la facture sur le disque
|
||||
\brief Fonction générant la facture sur le disque
|
||||
\param facid id de la facture à générer
|
||||
\return int 1=ok, 0=ko
|
||||
\remarks Variables utilisées
|
||||
\remarks FAC_OUTPUTDIR
|
||||
\remarks FAC_PDF_LOGO
|
||||
|
|
@ -77,9 +85,8 @@ Class pdf_crabe {
|
|||
\remarks MAIN_INFO_RCS
|
||||
\remarks MAIN_INFO_CAPITAL
|
||||
\remarks MAIN_INFO_TVAINTRA
|
||||
\return 1=ok, 0=ko
|
||||
*/
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -304,7 +311,7 @@ Class pdf_crabe {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _tableau_versements(&$pdf, $fac)
|
||||
function _tableau_versements(&$pdf, $fac)
|
||||
{
|
||||
$tab3_posx = 120;
|
||||
$tab3_top = 240;
|
||||
|
|
@ -386,7 +393,7 @@ Class pdf_crabe {
|
|||
}
|
||||
|
||||
|
||||
Function _tableau_tot(&$pdf, $fac, $deja_regle)
|
||||
function _tableau_tot(&$pdf, $fac, $deja_regle)
|
||||
{
|
||||
$tab2_top = 207;
|
||||
$tab2_hl = 5;
|
||||
|
|
@ -459,7 +466,7 @@ Class pdf_crabe {
|
|||
/*
|
||||
* Grille des lignes de factures
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->Rect( 10, $tab_top, 190, $tab_height);
|
||||
$pdf->line( 10, $tab_top+8, 200, $tab_top+8 );
|
||||
|
|
@ -489,7 +496,7 @@ Class pdf_crabe {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
|
||||
$pdf->SetXY(10,5);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
Class pdf_tourteau {
|
||||
|
||||
Function pdf_tourteau($db=0)
|
||||
function pdf_tourteau($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de facture sans remise";
|
||||
|
|
@ -33,13 +33,13 @@ Class pdf_tourteau {
|
|||
/*!
|
||||
\brief Renvoi le dernier message d'erreur de création de facture
|
||||
*/
|
||||
Function error()
|
||||
function error()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($facid)
|
||||
function write_pdf_file($facid)
|
||||
{
|
||||
global $user;
|
||||
$fac = new Facture($this->db,"",$facid);
|
||||
|
|
@ -278,7 +278,7 @@ Class pdf_tourteau {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ Class pdf_tourteau {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _pagehead(&$pdf, $fac)
|
||||
function _pagehead(&$pdf, $fac)
|
||||
{
|
||||
|
||||
$pdf->SetXY(10,5);
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
Class pdf_soleil
|
||||
{
|
||||
|
||||
Function pdf_soleil($db=0)
|
||||
function pdf_soleil($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Modèle de fiche d'intervention stantdard";
|
||||
}
|
||||
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
|
||||
$fich = new Fichinter($this->db,"",$id);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class modAdherent extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modAdherent($DB)
|
||||
function modAdherent($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 310 ;
|
||||
|
|
@ -95,7 +95,7 @@ class modAdherent extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -114,7 +114,7 @@ class modAdherent extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'adherent';"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modBanque extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modBanque($DB)
|
||||
function modBanque($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 85 ;
|
||||
|
|
@ -55,7 +55,7 @@ class modBanque extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -73,7 +73,7 @@ class modBanque extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'banque';");
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modBoutique extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modBoutique($DB)
|
||||
function modBoutique($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 86 ;
|
||||
|
|
@ -62,7 +62,7 @@ class modBoutique extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -76,7 +76,7 @@ class modBoutique extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modCaisse extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modCaisse($DB)
|
||||
function modCaisse($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 84 ;
|
||||
|
|
@ -54,7 +54,7 @@ class modCaisse extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -72,7 +72,7 @@ class modCaisse extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'caisse';");
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modCommande extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modCommande($DB)
|
||||
function modCommande($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 25 ;
|
||||
|
|
@ -60,7 +60,7 @@ class modCommande extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -80,7 +80,7 @@ class modCommande extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modCommercial extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modCommercial($DB)
|
||||
function modCommercial($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 2 ;
|
||||
|
|
@ -59,7 +59,7 @@ class modCommercial extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -72,7 +72,7 @@ class modCommercial extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modComptabilite extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modComptabilite($DB)
|
||||
function modComptabilite($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 10 ;
|
||||
|
|
@ -58,7 +58,7 @@ class modComptabilite extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -78,7 +78,7 @@ class modComptabilite extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'compta';");
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modContrat extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modcontrat($DB)
|
||||
function modcontrat($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 54 ;
|
||||
|
|
@ -55,7 +55,7 @@ class modContrat extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -70,7 +70,7 @@ class modContrat extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class modDon extends DolibarrModules
|
|||
* Initialisation
|
||||
*
|
||||
*/
|
||||
Function modDon($DB)
|
||||
function modDon($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 700 ;
|
||||
|
|
@ -61,7 +61,7 @@ class modDon extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -75,7 +75,7 @@ class modDon extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modExpedition extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modExpedition($DB)
|
||||
function modExpedition($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 80 ;
|
||||
|
|
@ -58,7 +58,7 @@ class modExpedition extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -78,7 +78,7 @@ class modExpedition extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modExternalRss extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modExternalRss($DB)
|
||||
function modExternalRss($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 320;
|
||||
|
|
@ -63,7 +63,7 @@ class modExternalRss extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -77,7 +77,7 @@ class modExternalRss extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modFacture extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modFacture($DB)
|
||||
function modFacture($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 30 ;
|
||||
|
|
@ -105,7 +105,7 @@ class modFacture extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -127,7 +127,7 @@ class modFacture extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'facture';"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modFicheinter extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modFicheinter($DB)
|
||||
function modFicheinter($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 70 ;
|
||||
|
|
@ -57,7 +57,7 @@ class modFicheinter extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -79,7 +79,7 @@ class modFicheinter extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'ficheinter';");
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modFournisseur extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modFournisseur($DB)
|
||||
function modFournisseur($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 40 ;
|
||||
|
|
@ -57,7 +57,7 @@ class modFournisseur extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -70,7 +70,7 @@ class modFournisseur extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class modLdap extends DolibarrModules
|
|||
* Initialisation
|
||||
*
|
||||
*/
|
||||
Function modLdap($DB)
|
||||
function modLdap($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 200 ;
|
||||
|
|
@ -54,7 +54,7 @@ class modLdap extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -69,7 +69,7 @@ class modLdap extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modPostnuke extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modPostnuke($DB)
|
||||
function modPostnuke($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 210;
|
||||
|
|
@ -54,7 +54,7 @@ class modPostnuke extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -69,7 +69,7 @@ class modPostnuke extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modProduit extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modProduit($DB)
|
||||
function modProduit($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 50 ;
|
||||
|
|
@ -57,7 +57,7 @@ class modProduit extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -79,7 +79,7 @@ class modProduit extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'produit';",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modProjet extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modProjet($DB)
|
||||
function modProjet($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 400 ;
|
||||
|
|
@ -55,7 +55,7 @@ class modProjet extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -77,7 +77,7 @@ class modProjet extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'projet';");
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modPropale extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modPropale($DB)
|
||||
function modPropale($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 20 ;
|
||||
|
|
@ -76,7 +76,7 @@ class modPropale extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions et valeurs par défaut
|
||||
|
|
@ -100,7 +100,7 @@ class modPropale extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'propale';"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modService extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modService($DB)
|
||||
function modService($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 53 ;
|
||||
|
|
@ -58,7 +58,7 @@ class modService extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -80,7 +80,7 @@ class modService extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'produit';",
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class modSociete extends DolibarrModules
|
|||
* Initialisation
|
||||
*
|
||||
*/
|
||||
Function modSociete($DB)
|
||||
function modSociete($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 1 ;
|
||||
|
|
@ -54,7 +54,7 @@ class modSociete extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -72,7 +72,7 @@ class modSociete extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'societe';",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modStock extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modStock($DB)
|
||||
function modStock($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 52 ;
|
||||
|
|
@ -56,7 +56,7 @@ class modStock extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Permissions
|
||||
|
|
@ -71,7 +71,7 @@ class modStock extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array(
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class modWebcalendar extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function modWebcalendar($DB)
|
||||
function modWebcalendar($DB)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->numero = 410 ;
|
||||
|
|
@ -58,7 +58,7 @@ class modWebcalendar extends DolibarrModules
|
|||
*
|
||||
*/
|
||||
|
||||
Function init()
|
||||
function init()
|
||||
{
|
||||
/*
|
||||
* Activation du module
|
||||
|
|
@ -73,7 +73,7 @@ class modWebcalendar extends DolibarrModules
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function remove()
|
||||
function remove()
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
Class mod_propale_ivoire
|
||||
{
|
||||
Function info()
|
||||
function info()
|
||||
{
|
||||
return "Renvoie le numéro sous la forme PR0012";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
Class mod_propale_jade
|
||||
{
|
||||
Function info()
|
||||
function info()
|
||||
{
|
||||
return "Renvoie le numéro sous la forme PROP2, PROP3";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
Class pdf_propale_adytek
|
||||
{
|
||||
|
||||
Function pdf_propale_adytek($db=0)
|
||||
function pdf_propale_adytek($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->name = "Adytek";
|
||||
$this->description = "Modèle de proposition Adytek";
|
||||
}
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user;
|
||||
$propale = new Propal($this->db,"",$id);
|
||||
|
|
@ -189,7 +189,7 @@ Class pdf_propale_adytek
|
|||
}
|
||||
}
|
||||
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
|
||||
$pdf->SetFont('Arial','',11);
|
||||
|
|
@ -234,7 +234,7 @@ Class pdf_propale_adytek
|
|||
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $propale)
|
||||
function _pagehead(&$pdf, $propale)
|
||||
{
|
||||
//insertion de la variable FAC_PDF_INTITULE FAC_PDF_MEL FAC_PDF_WWW FAC_PDF_LOGO
|
||||
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
Class pdf_propale_bleu
|
||||
{
|
||||
|
||||
Function pdf_propale_bleu($db=0)
|
||||
function pdf_propale_bleu($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->name = "bleu";
|
||||
$this->description = "Modèle de propale sans remise.";
|
||||
}
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user;
|
||||
$propale = new Propal($this->db,"",$id);
|
||||
|
|
@ -175,7 +175,7 @@ Class pdf_propale_bleu
|
|||
}
|
||||
}
|
||||
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
|
||||
$pdf->SetFont('Arial','',11);
|
||||
|
|
@ -205,7 +205,7 @@ Class pdf_propale_bleu
|
|||
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $propale)
|
||||
function _pagehead(&$pdf, $propale)
|
||||
{
|
||||
$pdf->SetXY(10,5);
|
||||
if (defined("FAC_PDF_INTITULE"))
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
Class pdf_propale_jaune
|
||||
{
|
||||
|
||||
Function pdf_propale_jaune($db=0)
|
||||
function pdf_propale_jaune($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->name = "Jaune";
|
||||
$this->description = "Modèle de proposition Jaune";
|
||||
}
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user;
|
||||
$propale = new Propal($this->db,"",$id);
|
||||
|
|
@ -173,7 +173,7 @@ Class pdf_propale_jaune
|
|||
}
|
||||
}
|
||||
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
|
||||
$pdf->SetFont('Arial','',11);
|
||||
|
|
@ -208,7 +208,7 @@ Class pdf_propale_jaune
|
|||
$pdf->Text(10,280, $titre);
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $propale)
|
||||
function _pagehead(&$pdf, $propale)
|
||||
{
|
||||
$pdf->SetXY(12,42);
|
||||
if (defined("FAC_PDF_INTITULE"))
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@
|
|||
Class pdf_propale_rouge
|
||||
{
|
||||
|
||||
Function pdf_propale_rouge($db=0)
|
||||
function pdf_propale_rouge($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->name = "rouge";
|
||||
$this->description = "Modèle de propale par défaut";
|
||||
}
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user;
|
||||
$propale = new Propal($this->db,"",$id);
|
||||
|
|
@ -197,7 +197,7 @@ Class pdf_propale_rouge
|
|||
}
|
||||
}
|
||||
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
|
||||
$pdf->SetFont('Arial','',11);
|
||||
|
|
@ -227,7 +227,7 @@ Class pdf_propale_rouge
|
|||
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $propale)
|
||||
function _pagehead(&$pdf, $propale)
|
||||
{
|
||||
$pdf->SetXY(10,5);
|
||||
if (defined("FAC_PDF_INTITULE"))
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
Class pdf_propale_vert
|
||||
{
|
||||
|
||||
Function pdf_propale_vert($db=0)
|
||||
function pdf_propale_vert($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->name = "vert";
|
||||
$this->description = "Affichage de la remise par produit";
|
||||
}
|
||||
|
||||
Function write_pdf_file($id)
|
||||
function write_pdf_file($id)
|
||||
{
|
||||
global $user;
|
||||
$propale = new Propal($this->db,"",$id);
|
||||
|
|
@ -191,7 +191,7 @@ Class pdf_propale_vert
|
|||
}
|
||||
}
|
||||
|
||||
Function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
{
|
||||
$yt = 100;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
|
|
@ -237,7 +237,7 @@ Class pdf_propale_vert
|
|||
$pdf->MultiCell(120,3,$texte,0,'J');
|
||||
}
|
||||
|
||||
Function _pagehead(&$pdf, $propale)
|
||||
function _pagehead(&$pdf, $propale)
|
||||
{
|
||||
$pdf->SetXY(10,5);
|
||||
if (defined("FAC_PDF_INTITULE"))
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
Class pdf_paiement {
|
||||
|
||||
Function pdf_paiement($db=0)
|
||||
function pdf_paiement($db=0)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->description = "Liste des paiements";
|
||||
|
|
@ -38,7 +38,7 @@ Class pdf_paiement {
|
|||
|
||||
}
|
||||
|
||||
Function print_link()
|
||||
function print_link()
|
||||
{
|
||||
if (file_exists($this->file))
|
||||
{
|
||||
|
|
@ -88,7 +88,7 @@ Class pdf_paiement {
|
|||
|
||||
}
|
||||
|
||||
Function Body(&$pdf, $page, $lines)
|
||||
function Body(&$pdf, $page, $lines)
|
||||
{
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$oldprowid = 0;
|
||||
|
|
@ -148,7 +148,7 @@ Class pdf_paiement {
|
|||
}
|
||||
}
|
||||
|
||||
Function write_pdf_file($_dir, $month, $year)
|
||||
function write_pdf_file($_dir, $month, $year)
|
||||
{
|
||||
if (! file_exists($_dir))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,11 +84,11 @@ class DOLIAuth {
|
|||
var $storage = "";
|
||||
|
||||
/**
|
||||
* Function defined by the user, that creates the login screen
|
||||
* function defined by the user, that creates the login screen
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $loginFunction = "";
|
||||
var $loginfunction = "";
|
||||
|
||||
/**
|
||||
* Should the login form be displayed?
|
||||
|
|
@ -151,10 +151,10 @@ class DOLIAuth {
|
|||
* @param boolean Should the login form be displayed if neccessary?
|
||||
* @return void
|
||||
*/
|
||||
function DOLIAuth($storageDriver, $options = "", $loginFunction = "", $showLogin = true)
|
||||
function DOLIAuth($storageDriver, $options = "", $loginfunction = "", $showLogin = true)
|
||||
{
|
||||
if ($loginFunction != "" && function_exists($loginFunction)) {
|
||||
$this->loginFunction = $loginFunction;
|
||||
if ($loginfunction != "" && function_exists($loginfunction)) {
|
||||
$this->loginfunction = $loginfunction;
|
||||
}
|
||||
|
||||
if (is_bool($showLogin)) {
|
||||
|
|
@ -562,8 +562,8 @@ class DOLIAuth {
|
|||
*/
|
||||
function drawLogin($username = "")
|
||||
{
|
||||
if ($this->loginFunction != "") {
|
||||
call_user_func($this->loginFunction, $username, $this->status);
|
||||
if ($this->loginfunction != "") {
|
||||
call_user_func($this->loginfunction, $username, $this->status);
|
||||
} else {
|
||||
$server = &$this->_importGlobalVariable("server");
|
||||
|
||||
|
|
|
|||
|
|
@ -327,9 +327,9 @@ class Auth_Container_DB extends Auth_Container
|
|||
function addUser($username, $password, $additional = "")
|
||||
{
|
||||
if (function_exists($this->options['cryptType'])) {
|
||||
$cryptFunction = $this->options['cryptType'];
|
||||
$cryptfunction = $this->options['cryptType'];
|
||||
} else {
|
||||
$cryptFunction = 'md5';
|
||||
$cryptfunction = 'md5';
|
||||
}
|
||||
|
||||
$additional_key = '';
|
||||
|
|
@ -348,7 +348,7 @@ class Auth_Container_DB extends Auth_Container
|
|||
$this->options['passwordcol'],
|
||||
$additional_key,
|
||||
$username,
|
||||
$cryptFunction($password),
|
||||
$cryptfunction($password),
|
||||
$additional_value
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
$etapes=5;
|
||||
$docurl = '<a href="doc/dolibarr-install.html">documentation</a>';
|
||||
|
||||
Function pHeader($soutitre,$next)
|
||||
function pHeader($soutitre,$next)
|
||||
{
|
||||
|
||||
print '
|
||||
|
|
@ -46,7 +46,7 @@ print '<div class="main"><div class="soustitre">'.$soutitre.'</div>
|
|||
}
|
||||
|
||||
|
||||
Function pFooter($nonext=0)
|
||||
function pFooter($nonext=0)
|
||||
{
|
||||
print '</div></div>';
|
||||
if ($nonext == 0)
|
||||
|
|
@ -60,7 +60,7 @@ print '
|
|||
}
|
||||
|
||||
|
||||
Function dolibarr_syslog($message)
|
||||
function dolibarr_syslog($message)
|
||||
{
|
||||
define_syslog_variables();
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function dolibarr_syslog($message)
|
|||
\brief Affiche le header d'une fiche
|
||||
\param links liens
|
||||
\param active 0 par défaut
|
||||
\param title
|
||||
\param title titre ("" par defaut)
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -1154,7 +1154,7 @@ function print_heure_select($prefix,$begin=1,$end=23) {
|
|||
|
||||
/*!
|
||||
\brief Fonction servant a afficher une durée dans une liste déroulante
|
||||
\param prefix
|
||||
\param prefix prefix
|
||||
*/
|
||||
|
||||
function print_duree_select($prefix)
|
||||
|
|
@ -1203,8 +1203,8 @@ function price($amount, $html=0)
|
|||
|
||||
/*!
|
||||
\brief Fonction qui convertit des euros en francs
|
||||
\param euros somme en euro à convertir
|
||||
\return price
|
||||
\param euros somme en euro à convertir
|
||||
\return price prix converti et formaté
|
||||
*/
|
||||
|
||||
function francs($euros)
|
||||
|
|
@ -1249,56 +1249,6 @@ function yn($yesno, $case=1) {
|
|||
return "unknown";
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Fonction qui affiche des statistiques
|
||||
\param basename
|
||||
\param bc1
|
||||
\param bc2
|
||||
\param ftc
|
||||
\param jour
|
||||
*/
|
||||
function stat_print($basename,$bc1,$bc2,$ftc, $jour) {
|
||||
|
||||
$db = pg_Connect("","","","","$basename");
|
||||
if (!$db) {
|
||||
echo "Pas de connexion a la base\n";
|
||||
exit ;
|
||||
}
|
||||
|
||||
$offset = $jour * 9;
|
||||
|
||||
$sql="SELECT s.date, s.nb, l.libelle FROM stat_base as s, stat_cat as l WHERE s.cat = l.id ORDER by s.date DESC, s.cat ASC LIMIT 9 OFFSET $offset";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
print "Erreur SELECT<br><h1>$sql</h1><br>";
|
||||
return 1;
|
||||
}
|
||||
|
||||
print "<table border=1 cellspacing=0 cellpadding=2>";
|
||||
print "<tr><td><font color=\"white\">base <b>$basename</b></font></td>";
|
||||
print "<td><font color=\"white\">libelle</font></td>";
|
||||
print "</tr>";
|
||||
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
$tag = 1;
|
||||
while ( $i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
|
||||
$tag = !$tag;
|
||||
|
||||
print "<TR><TD>$obj->date</TD><TD>$obj->libelle</TD>\n";
|
||||
print "<TD align=\"center\">$obj->nb</TD></TR>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
|
||||
$db->close();
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Fonction qui permet d'envoyer les infos dans un fichier de log
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class Webcal {
|
|||
|
||||
/*!
|
||||
\brief obtient l'id suivant dans le webcalendar
|
||||
\retval id retourne l'id suivant dans le webcalendar
|
||||
\return id retourne l'id suivant dans le webcalendar
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class pnArticle {
|
|||
var $titre;
|
||||
var $body;
|
||||
|
||||
Function pnArticle($DB, $id=0) {
|
||||
function pnArticle($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ class pnArticle {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
if (strlen($this->annee)==0)
|
||||
|
|
@ -66,7 +66,7 @@ class pnArticle {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT p.pn_sid, p.pn_title, p.pn_hometext FROM " . PN_DB_NAME . "." . PN_TABLE_STORIES_NAME . " as p";
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Album {
|
|||
var $price ;
|
||||
var $status ;
|
||||
|
||||
Function Album($DB, $id=0) {
|
||||
function Album($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
if (strlen($this->annee))
|
||||
{
|
||||
|
|
@ -106,7 +106,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function linkga($id, $gaid)
|
||||
function linkga($id, $gaid)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."album_to_groupart (fk_album, fk_groupart) values ($id, $gaid)";
|
||||
|
|
@ -121,7 +121,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_groupart()
|
||||
function liste_groupart()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function updateosc()
|
||||
function updateosc()
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".DB_NAME_OSC.".products_description ";
|
||||
|
|
@ -224,7 +224,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
if (strlen($this->annee)==0)
|
||||
|
|
@ -251,7 +251,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, ref, annee, osc_id, title, description FROM ".MAIN_DB_PREFIX."album WHERE rowid = $id";
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ class Album {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc ";
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Categorie {
|
|||
var $price ;
|
||||
var $status ;
|
||||
|
||||
Function Categorie($DB, $id=0) {
|
||||
function Categorie($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."album (osc_id, fk_user_author) VALUES ($idosc, ".$user->id.")";
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function linkga($id, $gaid)
|
||||
function linkga($id, $gaid)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."album_to_groupart (fk_album, fk_groupart) values ($id, $gaid)";
|
||||
|
|
@ -80,7 +80,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_array()
|
||||
function liste_array()
|
||||
{
|
||||
$cl = array();
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ class Categorie {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function printc($id, $level)
|
||||
function printc($id, $level)
|
||||
{
|
||||
$cr = array();
|
||||
$cat = new Categorie($this->db);
|
||||
|
|
@ -150,7 +150,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_childs_array()
|
||||
function liste_childs_array()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."album ";
|
||||
|
|
@ -211,7 +211,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT c.categories_id, cd.categories_name, c.parent_id";
|
||||
$sql .= " FROM ".DB_NAME_OSC.".categories as c,".DB_NAME_OSC.".categories_description as cd";
|
||||
|
|
@ -239,7 +239,7 @@ class Categorie {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc ";
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ llxFooter("<em>Dernière modification $Date$ révision $Revision$</e
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function printc($id, $db, $level)
|
||||
function printc($id, $db, $level)
|
||||
{
|
||||
|
||||
$cat = new Categorie($db);
|
||||
|
|
@ -191,7 +191,7 @@ Function printc($id, $db, $level)
|
|||
}
|
||||
}
|
||||
|
||||
Function title_url($id, $db)
|
||||
function title_url($id, $db)
|
||||
{
|
||||
|
||||
$cat = new Categorie($db);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Concert {
|
|||
var $lieuid;
|
||||
var $description;
|
||||
|
||||
Function Concert($DB, $id=0) {
|
||||
function Concert($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class Concert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."concert (fk_user_author) VALUES (".$user->id.")";
|
||||
|
|
@ -64,7 +64,7 @@ class Concert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."concert ";
|
||||
|
|
@ -86,7 +86,7 @@ class Concert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid,".$this->db->pdate("date_concert")." as dc, description, fk_groupart, fk_lieu_concert";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."concert WHERE rowid = $id";
|
||||
|
|
@ -119,7 +119,7 @@ class Concert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_groupart()
|
||||
function liste_groupart()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class LieuConcert {
|
|||
var $ville;
|
||||
var $description;
|
||||
|
||||
Function LieuConcert($DB, $id=0)
|
||||
function LieuConcert($DB, $id=0)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
|
|
@ -38,7 +38,7 @@ class LieuConcert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."lieu_concert (fk_user_author) VALUES (".$user->id.")";
|
||||
|
|
@ -64,7 +64,7 @@ class LieuConcert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."lieu_concert ";
|
||||
|
|
@ -85,7 +85,7 @@ class LieuConcert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, nom, ville, description FROM ".MAIN_DB_PREFIX."lieu_concert WHERE rowid = $id";
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ class LieuConcert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class LieuConcert {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste()
|
||||
function liste()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Critique {
|
|||
var $id ;
|
||||
var $nom;
|
||||
|
||||
Function Critique($DB, $id=0) {
|
||||
function Critique($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ class Critique {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
|
||||
$sql = "SELECT r.reviews_id, r.reviews_rating, d.reviews_text, p.products_name";
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Groupart {
|
|||
var $desc ;
|
||||
var $grar ;
|
||||
|
||||
Function Groupart($DB, $id=0) {
|
||||
function Groupart($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user) {
|
||||
function create($user) {
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."groupart (fk_user_author) VALUES (".$user->id.")";
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."groupart ";
|
||||
|
|
@ -84,7 +84,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT rowid, nom, groupart, description FROM ".MAIN_DB_PREFIX."groupart WHERE rowid = $id";
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_albums ()
|
||||
function liste_albums ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function updateosc()
|
||||
function updateosc()
|
||||
{
|
||||
$albs = array();
|
||||
$albs = $this->liste_albums();
|
||||
|
|
@ -159,7 +159,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function liste_array ()
|
||||
function liste_array ()
|
||||
{
|
||||
$ga = array();
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ class Groupart {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc ";
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Promotion {
|
|||
var $price ;
|
||||
var $status ;
|
||||
|
||||
Function Promotion($DB, $id=0) {
|
||||
function Promotion($DB, $id=0) {
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ class Promotion {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user, $pid, $percent) {
|
||||
function create($user, $pid, $percent) {
|
||||
|
||||
$sql = "SELECT products_price ";
|
||||
$sql .= " FROM ".DB_NAME_OSC.".products as p";
|
||||
|
|
@ -79,7 +79,7 @@ class Promotion {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."album ";
|
||||
$sql .= " SET title = '" . trim($this->titre) ."'";
|
||||
|
|
@ -98,7 +98,7 @@ class Promotion {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function set_active($id)
|
||||
function set_active($id)
|
||||
{
|
||||
$sql = "UPDATE ".DB_NAME_OSC.".specials";
|
||||
$sql .= " SET status = 1";
|
||||
|
|
@ -114,7 +114,7 @@ class Promotion {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function set_inactive($id)
|
||||
function set_inactive($id)
|
||||
{
|
||||
$sql = "UPDATE ".DB_NAME_OSC.".specials";
|
||||
$sql .= " SET status = 0";
|
||||
|
|
@ -132,7 +132,7 @@ class Promotion {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id) {
|
||||
function fetch ($id) {
|
||||
|
||||
$sql = "SELECT c.categories_id, cd.categories_name, c.parent_id";
|
||||
$sql .= " FROM ".DB_NAME_OSC.".categories as c,".DB_NAME_OSC.".categories_description as cd";
|
||||
|
|
@ -160,7 +160,7 @@ class Promotion {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete($user) {
|
||||
function delete($user) {
|
||||
|
||||
$sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc ";
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CommandeStats
|
|||
{
|
||||
var $db ;
|
||||
|
||||
Function CommandeStats($DB)
|
||||
function CommandeStats($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par année
|
||||
*
|
||||
*/
|
||||
Function getNbCommandeByYear()
|
||||
function getNbCommandeByYear()
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande GROUP BY dm DESC WHERE fk_statut > 0";
|
||||
|
|
@ -55,7 +55,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getNbCommandeByMonth($year)
|
||||
function getNbCommandeByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
@ -87,7 +87,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getCommandeAmountByMonth($year)
|
||||
function getCommandeAmountByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, sum(total_ht) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
@ -119,7 +119,7 @@ class CommandeStats
|
|||
* Renvoie le nombre de commande par mois pour une année donnée
|
||||
*
|
||||
*/
|
||||
Function getCommandeAverageByMonth($year)
|
||||
function getCommandeAverageByMonth($year)
|
||||
{
|
||||
$result = array();
|
||||
$sql = "SELECT date_format(date_commande,'%m') as dm, avg(total_ht) FROM ".MAIN_DB_PREFIX."commande";
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Entrepot
|
|||
var $description;
|
||||
var $statut;
|
||||
|
||||
Function Entrepot($DB)
|
||||
function Entrepot($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ class Entrepot
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function create($user)
|
||||
function create($user)
|
||||
{
|
||||
// Si libelle non defini, erreur
|
||||
if ($this->libelle == '') {
|
||||
|
|
@ -83,7 +83,7 @@ class Entrepot
|
|||
/*
|
||||
*
|
||||
*/
|
||||
Function update($id, $user)
|
||||
function update($id, $user)
|
||||
{
|
||||
if (strlen(trim($this->libelle)))
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@ class Entrepot
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch ($id)
|
||||
function fetch ($id)
|
||||
{
|
||||
$sql = "SELECT rowid, label, description, statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot WHERE rowid = $id";
|
||||
|
|
@ -144,7 +144,7 @@ class Entrepot
|
|||
* Renvoie la liste des entrepôts ouverts
|
||||
*
|
||||
*/
|
||||
Function list_array()
|
||||
function list_array()
|
||||
{
|
||||
$liste = array();
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ class Entrepot
|
|||
* Renvoie la liste des entrepôts ouverts
|
||||
*
|
||||
*/
|
||||
Function nb_products()
|
||||
function nb_products()
|
||||
{
|
||||
$sql = "SELECT sum(reel) FROM llx_product_stock WHERE fk_entrepot = ".$this->id;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
class MouvementStock
|
||||
{
|
||||
|
||||
Function MouvementStock($DB)
|
||||
function MouvementStock($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ class MouvementStock
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function _create($user, $product_id, $entrepot_id, $qty, $type, $transaction=1)
|
||||
function _create($user, $product_id, $entrepot_id, $qty, $type, $transaction=1)
|
||||
{
|
||||
|
||||
if ($this->db->begin($transaction) )
|
||||
|
|
@ -70,7 +70,7 @@ class MouvementStock
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function livraison($user, $product_id, $entrepot_id, $qty, $transaction=1)
|
||||
function livraison($user, $product_id, $entrepot_id, $qty, $transaction=1)
|
||||
{
|
||||
|
||||
return $this->_create($user, $product_id, $entrepot_id, (0 - $qty), 2, $transaction);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Project {
|
|||
var $socidp;
|
||||
var $societe;
|
||||
|
||||
Function Project($DB)
|
||||
function Project($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->societe = new Societe($DB);
|
||||
|
|
@ -39,7 +39,7 @@ class Project {
|
|||
*
|
||||
*/
|
||||
|
||||
Function create($creatorid)
|
||||
function create($creatorid)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."projet (ref, title, fk_soc, fk_user_creat, dateo) ";
|
||||
$sql .= " VALUES ('$this->ref', '$this->title', $this->socidp, $creatorid, now()) ;";
|
||||
|
|
@ -58,7 +58,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function update()
|
||||
function update()
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."projet ";
|
||||
$sql .= " SET ref = '$this->ref', title = '$this->title'";
|
||||
|
|
@ -73,7 +73,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function delete()
|
||||
function delete()
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."projet WHERE rowid = $this->id";
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch($rowid)
|
||||
function fetch($rowid)
|
||||
{
|
||||
|
||||
$sql = "SELECT fk_soc, title, ref FROM ".MAIN_DB_PREFIX."projet WHERE rowid=$rowid;";
|
||||
|
|
@ -125,7 +125,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function get_propal_list()
|
||||
function get_propal_list()
|
||||
{
|
||||
$propales = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."propal WHERE fk_projet=$this->id;";
|
||||
|
|
@ -161,7 +161,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function get_facture_list()
|
||||
function get_facture_list()
|
||||
{
|
||||
$factures = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture WHERE fk_projet=$this->id;";
|
||||
|
|
@ -197,7 +197,7 @@ class Project {
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function get_commande_list()
|
||||
function get_commande_list()
|
||||
{
|
||||
$commandes = array();
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande WHERE fk_projet=$this->id;";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Atome
|
|||
*
|
||||
*/
|
||||
|
||||
Function AtomeInitialize($periode, $name, $daystart)
|
||||
function AtomeInitialize($periode, $name, $daystart)
|
||||
{
|
||||
$this->year = strftime("%Y", $daystart);
|
||||
$this->month = strftime("%m", $daystart);
|
||||
|
|
@ -46,7 +46,7 @@ class Atome
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function BarGraph()
|
||||
function BarGraph()
|
||||
{
|
||||
$filename = DOL_DOCUMENT_ROOT.'/document/';
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class AtomeFactureValidee extends Atome
|
|||
* Initialisation de la classe
|
||||
*
|
||||
*/
|
||||
Function AtomeFactureValidee($DB, $periode, $daystart)
|
||||
function AtomeFactureValidee($DB, $periode, $daystart)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->name = 'AtomeFactureValidee';
|
||||
|
|
@ -45,7 +45,7 @@ class AtomeFactureValidee extends Atome
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch()
|
||||
function fetch()
|
||||
{
|
||||
if ($this->periode == 'year')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class AtomePropaleValidee extends Atome
|
|||
* Initialisation de la classe
|
||||
*
|
||||
*/
|
||||
Function AtomePropaleValidee($DB,$periode, $daystart)
|
||||
function AtomePropaleValidee($DB,$periode, $daystart)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->AtomeInitialize($periode, 'AtomePropaleValidee', $daystart);
|
||||
|
|
@ -43,7 +43,7 @@ class AtomePropaleValidee extends Atome
|
|||
*
|
||||
*
|
||||
*/
|
||||
Function fetch()
|
||||
function fetch()
|
||||
{
|
||||
$sql = "SELECT date_format(f.datep,'%Y%m'), sum(f.price) as am";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as f";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user