mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Enhancement in category module
This commit is contained in:
parent
bab2b22b3a
commit
e89c3ba08e
|
|
@ -47,6 +47,7 @@ class Adherent extends CommonObject
|
|||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $civilite_id;
|
||||
var $prenom;
|
||||
var $nom;
|
||||
var $fullname;
|
||||
|
|
@ -148,6 +149,7 @@ class Adherent extends CommonObject
|
|||
}
|
||||
|
||||
$infos='';
|
||||
if ($this->civilite_id) $infos.= $langs->trans("UserTitle").": ".$this->getCivilityLabel()."\n";
|
||||
$infos.= $langs->trans("Lastname").": $this->nom\n";
|
||||
$infos.= $langs->trans("Firstname").": $this->prenom\n";
|
||||
$infos.= $langs->trans("Company").": $this->societe\n";
|
||||
|
|
@ -165,7 +167,8 @@ class Adherent extends CommonObject
|
|||
|
||||
// Substitutions
|
||||
$patterns = array (
|
||||
'/%PRENOM%/',
|
||||
'/%CIVILITE%/',
|
||||
'/%PRENOM%/',
|
||||
'/%NOM%/',
|
||||
'/%INFOS%/',
|
||||
'/%DOL_MAIN_URL_ROOT%/',
|
||||
|
|
@ -181,6 +184,7 @@ class Adherent extends CommonObject
|
|||
'/%PASSWORD%/'
|
||||
);
|
||||
$replace = array (
|
||||
$this->getCivilityLabel(),
|
||||
$this->prenom,
|
||||
$this->nom,
|
||||
$infos,
|
||||
|
|
@ -388,7 +392,8 @@ class Adherent extends CommonObject
|
|||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql.= " prenom = ".($this->prenom?"'".addslashes($this->prenom)."'":"null");
|
||||
$sql.= " civilite = ".($this->civilite_id?"'".$this->civilite_id."'":"null");
|
||||
$sql.= ", prenom = ".($this->prenom?"'".addslashes($this->prenom)."'":"null");
|
||||
$sql.= ", nom=" .($this->nom?"'".addslashes($this->nom)."'":"null");
|
||||
$sql.= ", login=" .($this->login?"'".addslashes($this->login)."'":"null");
|
||||
$sql.= ", societe=" .($this->societe?"'".addslashes($this->societe)."'":"null");
|
||||
|
|
@ -504,6 +509,7 @@ class Adherent extends CommonObject
|
|||
|
||||
if ($result >= 0)
|
||||
{
|
||||
$luser->civilite_id=$this->civilite_id;
|
||||
$luser->prenom=$this->prenom;
|
||||
$luser->nom=$this->nom;
|
||||
$luser->login=$this->user_login;
|
||||
|
|
@ -926,7 +932,7 @@ class Adherent extends CommonObject
|
|||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.fk_soc, d.statut, d.public, d.adresse, d.cp, d.ville, d.note,";
|
||||
$sql = "SELECT d.rowid, d.civilite, d.prenom, d.nom, d.societe, d.fk_soc, d.statut, d.public, d.adresse, d.cp, d.ville, d.note,";
|
||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||
$sql.= " d.photo, d.fk_adherent_type, d.morphy,";
|
||||
$sql.= " d.datec as datec,";
|
||||
|
|
@ -957,6 +963,7 @@ class Adherent extends CommonObject
|
|||
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->civilite_id = $obj->civilite;
|
||||
$this->prenom = $obj->prenom;
|
||||
$this->nom = $obj->nom;
|
||||
$this->fullname = trim($obj->nom.' '.$obj->prenom);
|
||||
|
|
@ -1699,6 +1706,18 @@ class Adherent extends CommonObject
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retourne le libelle de civilite du contact
|
||||
* \return string Nom traduit de la civilite
|
||||
*/
|
||||
function getCivilityLabel()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("dict");
|
||||
|
||||
$code=$this->civilite_id;
|
||||
return $langs->trans("Civility".$code)!="Civility".$code ? $langs->trans("Civility".$code) : $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||
|
|
@ -1907,6 +1926,7 @@ class Adherent extends CommonObject
|
|||
// Initialise parametres
|
||||
$this->id=0;
|
||||
$this->specimen=1;
|
||||
$this->civilite_id = 0;
|
||||
$this->nom = 'DOLIBARR';
|
||||
$this->prenom = 'SPECIMEN';
|
||||
$this->fullname=trim($this->nom.' '.$this->prenom);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* \file htdocs/adherents/fiche.php
|
||||
* \ingroup member
|
||||
* \brief Page d'ajout, edition, suppression d'une fiche adherent
|
||||
* \brief Page of member
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
|
@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
|
|||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formcompany.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
|
|
@ -218,14 +219,14 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
|
|||
{
|
||||
$datenaiss=dol_mktime(12, 0, 0, $_POST["naissmonth"], $_POST["naissday"], $_POST["naissyear"]);
|
||||
}
|
||||
//print $_POST["naissmonth"].", ".$_POST["naissday"].", ".$_POST["naissyear"]." ".$datenaiss." ".adodb_strftime('%Y-%m-%d %H:%M:%S',$datenaiss);
|
||||
|
||||
// Create new object
|
||||
if ($result > 0)
|
||||
{
|
||||
$adh->oldcopy=dol_clone($adh);
|
||||
|
||||
// Modifie valeures
|
||||
// Change values
|
||||
$adh->civilite_id = trim($_POST["civilite_id"]);
|
||||
$adh->prenom = trim($_POST["prenom"]);
|
||||
$adh->nom = trim($_POST["nom"]);
|
||||
$adh->fullname = trim($adh->prenom.' '.$adh->nom);
|
||||
|
|
@ -347,6 +348,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
|
|||
}
|
||||
|
||||
$typeid=$_POST["typeid"];
|
||||
$civilite_id=$_POST["civilite_id"];
|
||||
$nom=$_POST["nom"];
|
||||
$prenom=$_POST["prenom"];
|
||||
$societe=$_POST["societe"];
|
||||
|
|
@ -370,6 +372,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
|
|||
$userid=$_POST["userid"];
|
||||
$socid=$_POST["socid"];
|
||||
|
||||
$adh->civilite_id = $civilite_id;
|
||||
$adh->prenom = $prenom;
|
||||
$adh->nom = $nom;
|
||||
$adh->societe = $societe;
|
||||
|
|
@ -650,6 +653,7 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_spip' &&
|
|||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
$html = new Form($db);
|
||||
$htmlcompany = new FormCompany($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$adho->fetch_name_optionals_label();
|
||||
|
|
@ -715,8 +719,10 @@ if ($action == 'edit')
|
|||
// Societe
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2"><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.$adh->nom.'"></td>';
|
||||
// Civilite
|
||||
print '<tr><td width="20%">'.$langs->trans("UserTitle").'</td><td width="35%">';
|
||||
print $htmlcompany->select_civilite($adh->civilite_id);
|
||||
print '</td>';
|
||||
|
||||
// Photo
|
||||
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||
|
|
@ -731,8 +737,12 @@ if ($action == 'edit')
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.$adh->nom.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Prenom
|
||||
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td width="35%"><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
|
||||
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Login
|
||||
|
|
@ -867,6 +877,11 @@ if ($action == 'create')
|
|||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
print $htmlcompany->select_civilite($adh->civilite_id,'civilite_id').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.$adh->nom.'" size="40"></td>';
|
||||
print '</tr>';
|
||||
|
|
@ -1112,7 +1127,11 @@ if ($rowid && $action != 'edit')
|
|||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur" colspan="2">'.$adh->societe.'</td></tr>';
|
||||
|
||||
// Nom
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur" colspan="2">'.$adh->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="2">'.$adh->nom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ class Categorie
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Retourne les produits de la categorie
|
||||
* \brief Return list of contents of a category
|
||||
* \param field Field name for select in table. Full field name will be fk_field.
|
||||
* \param class PHP Class of object to store entity
|
||||
* \param table Table name for select in table. Full table name will be PREFIX_categorie_table.
|
||||
|
|
@ -434,18 +434,17 @@ class Categorie
|
|||
// Clean parameters
|
||||
if (empty($table)) $table=$field;
|
||||
|
||||
|
||||
$sql = "SELECT fk_".$field." FROM ".MAIN_DB_PREFIX."categorie_".$table;
|
||||
$sql .= " WHERE fk_categorie = ".$this->id;
|
||||
$sql = "SELECT fk_".$field." FROM ".MAIN_DB_PREFIX."categorie_".$table;
|
||||
$sql.= " WHERE fk_categorie = ".$this->id;
|
||||
|
||||
dol_syslog("Categorie::get_type sql=".$sql);
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ($rec = $this->db->fetch_array ($res))
|
||||
while ($rec = $this->db->fetch_array($resql))
|
||||
{
|
||||
$obj = new $class ($this->db, $rec['fk_'.$field]);
|
||||
$obj->fetch ($obj->id);
|
||||
$obj = new $class($this->db);
|
||||
$obj->fetch($rec['fk_'.$field]);
|
||||
$objs[] = $obj;
|
||||
}
|
||||
return $objs;
|
||||
|
|
@ -459,8 +458,6 @@ class Categorie
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Retourne les filles de la categorie
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ function formCategory($db,$object,$typeid)
|
|||
if ($typeid == 0) $title=$langs->trans("ProductIsInCategories");
|
||||
if ($typeid == 1) $title=$langs->trans("CompanyIsInSuppliersCategories");
|
||||
if ($typeid == 2) $title=$langs->trans("CompanyIsInCustomersCategories");
|
||||
if ($typeid == 3) $title=$langs->trans("MemberIsInCustomersCategories");
|
||||
if ($typeid == 3) $title=$langs->trans("MemberIsInCategories");
|
||||
print "\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$title.':</td></tr>';
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ else
|
|||
if ($c->type == 0)
|
||||
{
|
||||
|
||||
$prods = $c->get_type ("product","Product");
|
||||
$prods = $c->get_type("product","Product");
|
||||
if ($prods < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
|
|
@ -227,7 +227,7 @@ if ($c->type == 0)
|
|||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print "<tr class='liste_titre'><td colspan='3'>".$langs->trans("ProductsAndServices")."</td></tr>\n";
|
||||
print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("ProductsAndServices")."</td></tr>\n";
|
||||
|
||||
if (sizeof ($prods) > 0)
|
||||
{
|
||||
|
|
@ -243,7 +243,6 @@ if ($c->type == 0)
|
|||
else print img_object($langs->trans("ShowProduct"),"product");
|
||||
print " <a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->ref."</a></td>\n";
|
||||
print '<td valign="top">'.$prod->libelle."</td>\n";
|
||||
print '<td valign="top">'.$prod->description."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +256,7 @@ if ($c->type == 0)
|
|||
|
||||
if ($c->type == 1)
|
||||
{
|
||||
$socs = $c->get_type ("societe","Fournisseur","fournisseur");
|
||||
$socs = $c->get_type("societe","Fournisseur","fournisseur");
|
||||
if ($socs < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
|
|
@ -277,9 +276,10 @@ if ($c->type == 1)
|
|||
$i++;
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
print img_object($langs->trans("ShowSuppliers"),"company");
|
||||
print " <a href='".DOL_URL_ROOT."/categories/categorie.php?socid=".$soc->id."'>".$soc->nom."</a></td>\n";
|
||||
print $soc->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
|
@ -294,7 +294,7 @@ if ($c->type == 1)
|
|||
|
||||
if($c->type == 2)
|
||||
{
|
||||
$socs = $c->get_type ("societe","Societe");
|
||||
$socs = $c->get_type("societe","Societe");
|
||||
if ($socs < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
|
|
@ -309,14 +309,14 @@ if($c->type == 2)
|
|||
{
|
||||
$i = 0;
|
||||
$var=true;
|
||||
foreach ($socs as $soc)
|
||||
foreach ($socs as $key => $soc)
|
||||
{
|
||||
$i++;
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
print img_object($langs->trans("ShowCompany"),"company");
|
||||
print " <a href='".DOL_URL_ROOT."/categories/categorie.php?socid=".$soc->id."'>".$soc->nom."</a></td>\n";
|
||||
print $soc->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
|
@ -332,8 +332,9 @@ if($c->type == 2)
|
|||
// List of members
|
||||
if ($c->type == 3)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/adherents/Adherent.class.php");
|
||||
|
||||
$prods = $c->get_type ("member","Member");
|
||||
$prods = $c->get_type("member","Adherent");
|
||||
if ($prods < 0)
|
||||
{
|
||||
dol_print_error($db,$c->error);
|
||||
|
|
@ -348,16 +349,16 @@ if ($c->type == 3)
|
|||
{
|
||||
$i = 0;
|
||||
$var=true;
|
||||
foreach ($prods as $prod)
|
||||
foreach ($prods as $key => $member)
|
||||
{
|
||||
$i++;
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
print '<td nowrap="nowrap" valign="top">';
|
||||
print img_object($langs->trans("ShowMember"),"member");
|
||||
print " <a href='".DOL_URL_ROOT."/adherent/fiche.php?id=".$prod->id."'>".$prod->ref."</a></td>\n";
|
||||
print '<td valign="top">'.$prod->libelle."</td>\n";
|
||||
print '<td valign="top">'.$prod->description."</td>\n";
|
||||
print $member->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print '<td valign="top">'.$member->nom."</td>\n";
|
||||
print '<td valign="top">'.$member->prenom."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@ if ($step == 4 && $datatoexport)
|
|||
print '</tr>'."\n";
|
||||
|
||||
$liste=$objmodelexport->liste_modeles($db);
|
||||
foreach($liste as $key)
|
||||
foreach($liste as $key => $val)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
/**
|
||||
* \file htdocs/exports/index.php
|
||||
* \ingroup export
|
||||
* \brief Page accueil de la zone export
|
||||
* \brief Home page of export tools
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ print '<table class="notopnoleftnoright" width="100%">';
|
|||
print '<tr><td valign="top" width="40%" class="notopnoleft">';
|
||||
|
||||
|
||||
// Liste des formats d'exports disponibles
|
||||
// List of available export format
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
@ -70,9 +70,8 @@ include_once(DOL_DOCUMENT_ROOT.'/includes/modules/export/modules_export.php');
|
|||
$model=new ModeleExports();
|
||||
$liste=$model->liste_modeles($db);
|
||||
|
||||
foreach($liste as $key)
|
||||
foreach($liste as $key => $val)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>';
|
||||
$text=$model->getDriverDesc($key);
|
||||
|
|
|
|||
|
|
@ -1542,8 +1542,6 @@ class Form
|
|||
{
|
||||
print '<option value="'.$obj->id.'">';
|
||||
}
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
//print ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite!='-'?$obj->civilite:''));
|
||||
print $obj->label;
|
||||
print '</option>';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -321,29 +321,31 @@ class FormCompany
|
|||
|
||||
|
||||
/**
|
||||
* \brief Retourne la liste deroulante des civilite actives
|
||||
* \param selected civilite pre-selectionnee
|
||||
* \brief Retourne la liste deroulante des civilite actives
|
||||
* \param selected civilite pre-selectionnee
|
||||
* \param htmlname Name of HTML select combo field
|
||||
*/
|
||||
function select_civilite($selected='')
|
||||
function select_civilite($selected='',$htmlname='civilite_id')
|
||||
{
|
||||
global $conf,$langs,$user;
|
||||
$langs->load("dict");
|
||||
|
||||
$sql = "SELECT rowid, code, civilite, active FROM ".MAIN_DB_PREFIX."c_civilite";
|
||||
$sql .= " WHERE active = 1";
|
||||
$sql.= " WHERE active = 1";
|
||||
|
||||
dol_syslog("Form::select_civilite sql=".$sql);
|
||||
if ($this->db->query($sql))
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<select class="flat" name="civilite_id">';
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
print '<option value=""> </option>';
|
||||
$num = $this->db->num_rows();
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object();
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($selected == $obj->code)
|
||||
{
|
||||
print '<option value="'.$obj->code.'" selected="true">';
|
||||
|
|
@ -352,7 +354,7 @@ class FormCompany
|
|||
{
|
||||
print '<option value="'.$obj->code.'">';
|
||||
}
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libell<EFBFBD> par d<>faut
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
print ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite!='-'?$obj->civilite:''));
|
||||
print '</option>';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
*
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/**
|
||||
* \defgroup adherent Module foundation
|
||||
* \brief Module pour gerer les adherents d'une association
|
||||
* \brief Module to manage members of a foundation
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +43,7 @@ class modAdherent extends DolibarrModules
|
|||
|
||||
/**
|
||||
* \brief Constructeur. Definit les noms, constantes et boites
|
||||
* \param DB handler d'acc<EFBFBD>s base
|
||||
* \param DB Database handler
|
||||
*/
|
||||
function modAdherent($DB)
|
||||
{
|
||||
|
|
@ -184,9 +184,9 @@ class modAdherent extends DolibarrModules
|
|||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='MembersAndSubscriptions';
|
||||
$this->export_permission[$r]=array(array("adherent","export"));
|
||||
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'MorPhy','a.adresse'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
|
||||
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.adresse'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
|
||||
$this->export_alias_array[$r]=array('a.rowid'=>'Id','a.nom'=>"lastname",'a.prenom'=>"firstname",'a.login'=>"login",'a.morphy'=>'morphy','a.adresse'=>"address",'a.cp'=>"zip",'a.ville'=>"town",'a.pays'=>"country",'a.phone'=>"phone",'a.phone_perso'=>"phone_perso",'a.phone_mobile'=>"phone_mobile",'a.email'=>"email",'a.naiss'=>"birthday",'a.statut'=>"status",'a.photo'=>'photo','a.note'=>'note','a.datec'=>'datec','a.datevalid'=>'datevalid','a.tms'=>'datem','a.datefin'=>'dateend','ta.rowid'=>'type_id','ta.libelle'=>'type_label','c.rowid'=>'id_subscription','c.dateadh'=>'date_subscription','c.cotisation'=>'amount_subscription');
|
||||
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'MorPhy','a.adresse'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
|
||||
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.adresse'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
|
||||
$this->export_alias_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"civility",'a.nom'=>"lastname",'a.prenom'=>"firstname",'a.login'=>"login",'a.morphy'=>'morphy','a.adresse'=>"address",'a.cp'=>"zip",'a.ville'=>"town",'a.pays'=>"country",'a.phone'=>"phone",'a.phone_perso'=>"phone_perso",'a.phone_mobile'=>"phone_mobile",'a.email'=>"email",'a.naiss'=>"birthday",'a.statut'=>"status",'a.photo'=>'photo','a.note'=>'note','a.datec'=>'datec','a.datevalid'=>'datevalid','a.tms'=>'datem','a.datefin'=>'dateend','ta.rowid'=>'type_id','ta.libelle'=>'type_label','c.rowid'=>'id_subscription','c.dateadh'=>'date_subscription','c.cotisation'=>'amount_subscription');
|
||||
// On complete avec champs options
|
||||
$sql='SELECT name, label FROM '.MAIN_DB_PREFIX.'adherent_options_label';
|
||||
$resql=$this->db->query($sql);
|
||||
|
|
|
|||
|
|
@ -143,6 +143,19 @@ class modCategorie extends DolibarrModules
|
|||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_product as cp, '.MAIN_DB_PREFIX.'product as p';
|
||||
$this->export_sql_end[$r] .=' WHERE u.rowid = cp.fk_categorie AND cp.fk_product = p.rowid';
|
||||
$this->export_sql_end[$r] .=' AND u.type = 0'; // Supplier categories
|
||||
|
||||
$r++;
|
||||
$this->export_code[$r]='category_'.$r;
|
||||
$this->export_label[$r]='CatMemberList';
|
||||
$this->export_icon[$r]='category';
|
||||
$this->export_permission[$r]=array(array("categorie","lire"));
|
||||
$this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'Name','p.prenom'=>'Firstname');
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>'member','p.nom'=>'member','p.prenom'=>'member'); // We define here only fields that use another picto
|
||||
$this->export_alias_array[$r]=array('u.rowid'=>"idcateg",'u.label'=>"label",'u.description'=>"description",'p.rowid'=>'idprod','p.nom'=>'name','p.prenom'=>'firstname');
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_member as cp, '.MAIN_DB_PREFIX.'adherent as p';
|
||||
$this->export_sql_end[$r] .=' WHERE u.rowid = cp.fk_categorie AND cp.fk_member = p.rowid';
|
||||
$this->export_sql_end[$r] .=' AND u.type = 3'; // Supplier categories
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -140,13 +140,13 @@ class modProduit extends DolibarrModules
|
|||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]="Products"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r]=array(array("produit","export"));
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.envente'=>"OnSell",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.envente'=>"OnSell",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock','p.pmp'=>'PMPValue'));
|
||||
if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.barcode'=>'Barcode'));
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.envente'=>"product",'p.datec'=>"product",'p.tms'=>"product");
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.envente'=>"product",'p.datec'=>"product",'p.tms'=>"product");
|
||||
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product','p.pmp'=>'product'));
|
||||
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.barcode'=>'product'));
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.length'=>"length",'p.surface'=>"area",'p.volume'=>"volume",'p.weight'=>"weight",'p.price_base_type'=>'pricebase','p.price'=>"priceht",'p.price_ttc'=>"pricettc",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.datec'=>'datecreation','p.tms'=>'datemodification');
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.label'=>"label",'p.description'=>"description",'p.accountancy_code_sell'=>'accountancy_code_sell','p.accountancy_code_buy'=>'accountancy_code_buy','p.note'=>"note",'p.length'=>"length",'p.surface'=>"area",'p.volume'=>"volume",'p.weight'=>"weight",'p.price_base_type'=>'pricebase','p.price'=>"priceht",'p.price_ttc'=>"pricettc",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.datec'=>'datecreation','p.tms'=>'datemodification');
|
||||
if (! empty($conf->stock->enabled)) $this->export_alias_array[$r]=array_merge ($this->export_alias_array[$r],array('p.stock'=>'stock','p.pmp'=>'pmp'));
|
||||
if (! empty($conf->barcode->enabled)) $this->export_alias_array[$r]=array_merge ($this->export_alias_array[$r],array('p.barcode'=>'barcode'));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
|
|
@ -132,11 +132,11 @@ class modService extends DolibarrModules
|
|||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r]=array(array("service","export"));
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock'));
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.envente'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.envente'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
||||
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product'));
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price_base_type'=>'pricebase','p.price'=>"priceht",'p.price_ttc'=>"pricettc",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification');
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.label'=>"label",'p.description'=>"description",'p.accountancy_code_sell'=>'accountancy_code_sell','p.accountancy_code_buy'=>'accountancy_code_buy','p.note'=>"note",'p.price_base_type'=>'pricebase','p.price'=>"priceht",'p.price_ttc'=>"pricettc",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification');
|
||||
if (! empty($conf->stock->enabled)) $this->export_alias_array[$r]=array_merge ($this->export_alias_array[$r],array('p.stock'=>'stock'));
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
|
|
|
|||
|
|
@ -120,3 +120,5 @@ ALTER TABLE llx_facturedet_rec MODIFY total_ht double(24,8);
|
|||
ALTER TABLE llx_facturedet_rec MODIFY total_tva double(24,8);
|
||||
ALTER TABLE llx_facturedet_rec MODIFY total_ttc double(24,8);
|
||||
|
||||
|
||||
ALTER TABLE llx_adherent ADD COLUMN civilite varchar(6) after entity;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ create table llx_adherent
|
|||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
civilite varchar(6),
|
||||
nom varchar(50),
|
||||
prenom varchar(50),
|
||||
login varchar(50) NOT NULL, -- login
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ ProductIsInCategories=Product/service owns to following categories
|
|||
SupplierIsInCategories=Third party owns to following suppliers categories
|
||||
CompanyIsInCustomersCategories=This third party owns to following customers/prospects categories
|
||||
CompanyIsInSuppliersCategories=This third party owns to following suppliers categories
|
||||
MemberIsInCategories=This member owns to following members categories
|
||||
ProductHasNoCategory=This product/service is not in any categories
|
||||
SupplierHasNoCategory=This supplier is not in any categories
|
||||
CompanyHasNoCategory=This company is not in any categories
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ ProductIsInCategories=Ce produit/service est dans les catégories suivantes
|
|||
SupplierIsInCategories=Ce fournisseur est dans les catégories suivantes
|
||||
CompanyIsInCustomersCategories=Cette société est dans les catégories clients/prospects suivantes
|
||||
CompanyIsInSuppliersCategories=Cette société est dans les catégories fournisseurs suivantes
|
||||
MemberIsInCategories=Cet adhérent est dans les catégories adhérent suivantes
|
||||
ProductHasNoCategory=Ce produit/service n'est dans aucune catégorie en particulier
|
||||
SupplierHasNoCategory=Ce fournisseur n'est dans aucune catégorie en particulier
|
||||
CompanyHasNoCategory=Cette société n'est dans aucune catégorie en particulier
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user