forked from Wavyzz/dolibarr
Renaming some libelle into label
This commit is contained in:
@@ -323,11 +323,11 @@ if ($result) {
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
$chargestatic->label = $langs->trans($reg[1]);
|
||||
} else {
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
$chargestatic->label = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$chargestatic->ref = $chargestatic->label;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
$tabpay[$obj->rowid]["paymentscid"] = $chargestatic->id;
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ print '<td width="200" class="center">'.$langs->trans("Example").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT rowid, code as encoding, libelle, coder, example";
|
||||
$sql = "SELECT rowid, code as encoding, libelle as label, coder, example";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
$sql.= " ORDER BY code";
|
||||
@@ -225,7 +225,7 @@ if ($resql)
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print $obj->libelle;
|
||||
print $obj->label;
|
||||
print "</td><td>\n";
|
||||
print $langs->trans('BarcodeDesc'.$obj->encoding);
|
||||
//print "L'EAN se compose de 8 caracteres, 7 chiffres plus une cle de controle.<br>";
|
||||
|
||||
@@ -1344,7 +1344,6 @@ class ActionComm extends CommonObject
|
||||
$linkstart = '';
|
||||
$linkend = '';
|
||||
}
|
||||
//print 'rrr'.$this->libelle.'rrr'.$this->label.'rrr'.$withpicto;
|
||||
|
||||
if ($withpicto == 2)
|
||||
{
|
||||
@@ -1463,7 +1462,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " u.firstname, u.lastname, u.email,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||
@@ -1568,7 +1567,7 @@ class ActionComm extends CommonObject
|
||||
$event['location']=$obj->location;
|
||||
$event['transparency']=(($obj->transparency > 0)?'OPAQUE':'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy)
|
||||
$event['punctual']=$obj->punctual;
|
||||
$event['category']=$obj->libelle; // libelle type action
|
||||
$event['category']=$obj->type_label;
|
||||
$event['email']=$obj->email;
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
|
||||
@@ -614,7 +614,7 @@ if ($resql)
|
||||
$event->type_label=$obj->type_label;
|
||||
$event->type_color=$obj->type_color;
|
||||
|
||||
$event->libelle=$obj->label;
|
||||
$event->libelle=$obj->label; // deprecated
|
||||
$event->label=$obj->label;
|
||||
$event->percentage=$obj->percent;
|
||||
$event->authorid=$obj->fk_user_author; // user id of creator
|
||||
@@ -720,7 +720,7 @@ if ($showbirthday)
|
||||
$event->datep=dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output
|
||||
$event->datef=$event->datep;
|
||||
$event->type_code='BIRTHDAY';
|
||||
$event->libelle=$langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||
$event->label=$langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||
$event->percentage=100;
|
||||
$event->fulldayevent=1;
|
||||
|
||||
@@ -949,9 +949,9 @@ if (count($listofextcals))
|
||||
$event->datef=$dateend+$usertime;
|
||||
$event->type_code="ICALEVENT";
|
||||
|
||||
if($icalevent['SUMMARY']) $event->libelle=$icalevent['SUMMARY'];
|
||||
elseif($icalevent['DESCRIPTION']) $event->libelle=dol_nl2br($icalevent['DESCRIPTION'], 1);
|
||||
else $event->libelle = $langs->trans("ExtSiteNoLabel");
|
||||
if($icalevent['SUMMARY']) $event->label=$icalevent['SUMMARY'];
|
||||
elseif($icalevent['DESCRIPTION']) $event->label=dol_nl2br($icalevent['DESCRIPTION'], 1);
|
||||
else $event->label = $langs->trans("ExtSiteNoLabel");
|
||||
|
||||
$event->date_start_in_calendar=$event->datep;
|
||||
|
||||
@@ -1554,7 +1554,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
|
||||
// Show title
|
||||
$titletoshow = $daterange;
|
||||
$titletoshow.=($titletoshow?' ':'').$event->libelle;
|
||||
$titletoshow.=($titletoshow?' ':'').($event->label?$event->label:$event->libelle);
|
||||
|
||||
if ($event->type_code == 'ICALEVENT') print $titletoshow;
|
||||
else
|
||||
|
||||
@@ -616,12 +616,12 @@ $typeofevents=array();
|
||||
// Load array of colors by type
|
||||
$colorsbytype=array();
|
||||
$labelbytype=array();
|
||||
$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
||||
$sql="SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position";
|
||||
$resql=$db->query($sql);
|
||||
while ($obj = $db->fetch_object($resql))
|
||||
{
|
||||
$colorsbytype[$obj->code]=$obj->color;
|
||||
$labelbytype[$obj->code]=$obj->libelle;
|
||||
$labelbytype[$obj->code]=$obj->label;
|
||||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
|
||||
@@ -752,12 +752,12 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
// Load array of colors by type
|
||||
$colorsbytype=array();
|
||||
$labelbytype=array();
|
||||
$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position";
|
||||
$sql="SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position";
|
||||
$resql=$db->query($sql);
|
||||
while ($obj = $db->fetch_object($resql))
|
||||
{
|
||||
$colorsbytype[$obj->code]=$obj->color;
|
||||
$labelbytype[$obj->code]=$obj->libelle;
|
||||
$labelbytype[$obj->code]=$obj->label;
|
||||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
|
||||
@@ -1695,13 +1695,13 @@ class Propal extends CommonObject
|
||||
|
||||
$line->fk_product = $objp->fk_product;
|
||||
|
||||
$line->ref = $objp->product_ref; // TODO deprecated
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->libelle = $objp->product_label; // TODO deprecated
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc; // Description produit
|
||||
$line->product_tobatch = $objp->product_tobatch;
|
||||
$line->fk_product_type = $objp->fk_product_type; // TODO deprecated
|
||||
$line->fk_product_type = $objp->fk_product_type; // deprecated
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
$line->weight = $objp->weight;
|
||||
$line->weight_units = $objp->weight_units;
|
||||
|
||||
@@ -258,7 +258,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
{
|
||||
$socialcontribstatic->ref=$obj->ref;
|
||||
$socialcontribstatic->id=$obj->objid;
|
||||
$socialcontribstatic->lib=$obj->type;
|
||||
$socialcontribstatic->label=$obj->type;
|
||||
$ref = $socialcontribstatic->getNomUrl(1, 24);
|
||||
|
||||
$totalpayment = -1*$socialcontribstatic->getSommePaiement(); // Payment already done
|
||||
|
||||
@@ -1127,7 +1127,7 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
$line = new FactureLigne($this->db);
|
||||
|
||||
$line->libelle = $object->lines[$i]->libelle;
|
||||
$line->libelle = $object->lines[$i]->libelle; // deprecated
|
||||
$line->label = $object->lines[$i]->label;
|
||||
$line->desc = $object->lines[$i]->desc;
|
||||
$line->subprice = $object->lines[$i]->subprice;
|
||||
@@ -1551,7 +1551,7 @@ class Facture extends CommonInvoice
|
||||
$line->product_type = $objp->product_type; // Type of line
|
||||
$line->ref = $objp->product_ref; // Ref product
|
||||
$line->product_ref = $objp->product_ref; // Ref product
|
||||
$line->libelle = $objp->product_label; // TODO deprecated
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_label = $objp->product_label; // Label product
|
||||
$line->product_desc = $objp->product_desc; // Description product
|
||||
$line->fk_product_type = $objp->fk_product_type; // Type of product
|
||||
|
||||
@@ -958,7 +958,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
{
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye";
|
||||
$sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle as label, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye";
|
||||
$sql.= ", ff.date_lim_reglement";
|
||||
$sql.= ", s.nom as name";
|
||||
$sql.= ", s.rowid as socid, s.email";
|
||||
@@ -1075,9 +1075,8 @@ if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.dol_print_date($db->jdate($obj->da), "day").'</td>';
|
||||
print '<td><a href="action/card.php">'.$obj->libelle.' '.$obj->label.'</a></td></tr>';
|
||||
print '<td><a href="action/card.php">'.$obj->label.'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
@@ -100,7 +100,7 @@ $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
$idpays = $p[0];
|
||||
|
||||
|
||||
$sql = "SELECT f.rowid, f.ref_supplier, f.type, f.datef, f.libelle,";
|
||||
$sql = "SELECT f.rowid, f.ref_supplier, f.type, f.datef, f.libelle as label,";
|
||||
$sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type, fd.localtax1_tx, fd.localtax2_tx, fd.total_localtax1, fd.total_localtax2,";
|
||||
$sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,";
|
||||
$sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,";
|
||||
@@ -158,7 +158,7 @@ if ($result)
|
||||
$tabfac[$obj->rowid]["date"] = $obj->datef;
|
||||
$tabfac[$obj->rowid]["ref"] = $obj->ref_supplier;
|
||||
$tabfac[$obj->rowid]["type"] = $obj->type;
|
||||
$tabfac[$obj->rowid]["lib"] = $obj->libelle;
|
||||
$tabfac[$obj->rowid]["lib"] = $obj->label;
|
||||
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
||||
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
||||
if ($obj->recuperableonly != 1) $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
||||
|
||||
@@ -41,7 +41,14 @@ class Cpaiement
|
||||
public $table_element = 'c_paiement';
|
||||
|
||||
public $code;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see $label
|
||||
*/
|
||||
public $libelle;
|
||||
public $label;
|
||||
|
||||
public $type;
|
||||
public $active;
|
||||
public $accountancy_code;
|
||||
@@ -80,6 +87,9 @@ class Cpaiement
|
||||
if (isset($this->libelle)) {
|
||||
$this->libelle = trim($this->libelle);
|
||||
}
|
||||
if (isset($this->label)) {
|
||||
$this->label = trim($this->label);
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$this->type = trim($this->type);
|
||||
}
|
||||
@@ -100,7 +110,6 @@ class Cpaiement
|
||||
|
||||
// Insert request
|
||||
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
|
||||
|
||||
$sql.= 'entity,';
|
||||
$sql.= 'code,';
|
||||
$sql.= 'libelle,';
|
||||
@@ -108,10 +117,7 @@ class Cpaiement
|
||||
$sql.= 'active,';
|
||||
$sql.= 'accountancy_code,';
|
||||
$sql.= 'module';
|
||||
|
||||
|
||||
$sql .= ') VALUES (';
|
||||
|
||||
$sql .= ' '.(! isset($this->entity)?getEntity('c_paiement'):$this->entity).',';
|
||||
$sql .= ' '.(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").',';
|
||||
$sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").',';
|
||||
@@ -119,8 +125,6 @@ class Cpaiement
|
||||
$sql .= ' '.(! isset($this->active)?'NULL':$this->active).',';
|
||||
$sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'").',';
|
||||
$sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'");
|
||||
|
||||
|
||||
$sql .= ')';
|
||||
|
||||
$this->db->begin();
|
||||
@@ -173,7 +177,7 @@ class Cpaiement
|
||||
$sql = 'SELECT';
|
||||
$sql .= ' t.id,';
|
||||
$sql .= " t.code,";
|
||||
$sql .= " t.libelle,";
|
||||
$sql .= " t.libelle as label,";
|
||||
$sql .= " t.type,";
|
||||
$sql .= " t.active,";
|
||||
$sql .= " t.accountancy_code,";
|
||||
@@ -195,7 +199,8 @@ class Cpaiement
|
||||
$this->id = $obj->id;
|
||||
|
||||
$this->code = $obj->code;
|
||||
$this->libelle = $obj->libelle;
|
||||
$this->libelle = $obj->label;
|
||||
$this->label = $obj->label;
|
||||
$this->type = $obj->type;
|
||||
$this->active = $obj->active;
|
||||
$this->accountancy_code = $obj->accountancy_code;
|
||||
@@ -238,6 +243,9 @@ class Cpaiement
|
||||
if (isset($this->libelle)) {
|
||||
$this->libelle = trim($this->libelle);
|
||||
}
|
||||
if (isset($this->label)) {
|
||||
$this->label = trim($this->label);
|
||||
}
|
||||
if (isset($this->type)) {
|
||||
$this->type = trim($this->type);
|
||||
}
|
||||
@@ -361,6 +369,7 @@ class Cpaiement
|
||||
|
||||
$this->code = '';
|
||||
$this->libelle = '';
|
||||
$this->label = '';
|
||||
$this->type = '';
|
||||
$this->active = '';
|
||||
$this->accountancy_code = '';
|
||||
|
||||
@@ -221,7 +221,7 @@ dol_fiche_end();
|
||||
*/
|
||||
|
||||
$disable_delete = 0;
|
||||
$sql = 'SELECT f.rowid as scid, f.libelle, f.paye, f.amount as sc_amount, pf.amount, pc.libelle as sc_type';
|
||||
$sql = 'SELECT f.rowid as scid, f.libelle as label, f.paye, f.amount as sc_amount, pf.amount, pc.libelle as sc_type';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementcharge as pf,'.MAIN_DB_PREFIX.'chargesociales as f, '.MAIN_DB_PREFIX.'c_chargesociales as pc';
|
||||
$sql.= ' WHERE pf.fk_charge = f.rowid AND f.fk_type = pc.id';
|
||||
$sql.= ' AND f.entity = '.$conf->entity;
|
||||
@@ -263,7 +263,7 @@ if ($resql)
|
||||
/*print $socialcontrib->type;*/
|
||||
print "</td>\n";
|
||||
// Label
|
||||
print '<td>'.$objp->libelle.'</td>';
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
// Expected to pay
|
||||
print '<td class="right">'.price($objp->sc_amount).'</td>';
|
||||
// Status
|
||||
|
||||
@@ -167,7 +167,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer)
|
||||
else
|
||||
{
|
||||
$object->type = $actioncode;
|
||||
$object->lib = GETPOST('label');
|
||||
$object->label = GETPOST('label', 'alpha');
|
||||
$object->date_ech = $dateech;
|
||||
$object->periode = $dateperiod;
|
||||
$object->amount = $amount;
|
||||
@@ -464,8 +464,8 @@ if ($id > 0)
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Ref customer
|
||||
$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
@@ -108,8 +108,8 @@ if ($object->id)
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Label of social contribution
|
||||
$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
@@ -126,8 +126,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT c.id, c.libelle as lib,";
|
||||
$sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,";
|
||||
$sql = "SELECT c.id, c.libelle as type_label,";
|
||||
$sql.= " cs.rowid, cs.libelle as label, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,";
|
||||
$sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment,";
|
||||
$sql.= " pct.code as payment_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
|
||||
@@ -162,10 +162,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
// Ref payment
|
||||
|
||||
$payment_sc_static->id=$obj->pid;
|
||||
$payment_sc_static->ref=$obj->pid;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Ref payment
|
||||
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
|
||||
// Date payment
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
|
||||
@@ -177,11 +179,11 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
print '<td>';
|
||||
$socialcontrib->id=$obj->rowid;
|
||||
$socialcontrib->ref=$obj->rowid;
|
||||
$socialcontrib->label=$obj->libelle;
|
||||
$socialcontrib->label=$obj->label;
|
||||
print $socialcontrib->getNomUrl(1, '20');
|
||||
print '</td>';
|
||||
// Type
|
||||
print '<td><a href="../sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
|
||||
print '<td><a href="../sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->type_label.'</a></td>';
|
||||
// Date
|
||||
$date=$obj->periode;
|
||||
if (empty($date)) $date=$obj->date_ech;
|
||||
|
||||
@@ -170,7 +170,7 @@ if ($type_element == 'fichinter')
|
||||
{ // Customer : show products from invoices
|
||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
$documentstatic=new Fichinter($db);
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle, ';
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'fichinterdet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'fichinter as f ON d.fk_fichinter=f.rowid';
|
||||
$tables_from.= ' INNER JOIN '.MAIN_DB_PREFIX.'element_contact ec ON ec.element_id=f.rowid AND ec.fk_socpeople='.$object->id;
|
||||
@@ -183,7 +183,7 @@ elseif ($type_element == 'invoice')
|
||||
{ // Customer : show products from invoices
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$documentstatic=new Facture($db);
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, ';
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'facturedet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture as f ON d.fk_facture=f.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -198,7 +198,7 @@ elseif ($type_element == 'propal')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
$documentstatic=new Propal($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'propaldet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'propal as c ON d.fk_propal=c.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -213,7 +213,7 @@ elseif ($type_element == 'order')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$documentstatic=new Commande($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'commandedet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande as c ON d.fk_commande=c.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -228,7 +228,7 @@ elseif ($type_element == 'supplier_invoice')
|
||||
{ // Supplier : Show products from invoices.
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$documentstatic=new FactureFournisseur($db);
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, ';
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'facture_fourn_det d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn as f ON d.fk_facture_fourn=f.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -256,7 +256,7 @@ elseif ($type_element == 'supplier_order')
|
||||
{ // Supplier : Show products from orders.
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
$documentstatic=new CommandeFournisseur($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'commande_fournisseurdet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur as c ON d.fk_commande=c.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -272,7 +272,7 @@ elseif ($type_element == 'contract')
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
$documentstatic=new Contrat($db);
|
||||
$documentstaticline=new ContratLigne($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle as type_contact_label, ';
|
||||
$tables_from = MAIN_DB_PREFIX.'contratdet d';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'contrat as c ON d.fk_contrat=c.rowid';
|
||||
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
|
||||
@@ -344,14 +344,14 @@ if ($sql_select)
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param="&socid=".$socid."&type_element=".$type_element;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
$param="&socid=".urlencode($socid)."&type_element=".urlencode($type_element);
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr);
|
||||
if ($sref) $param.= "&sref=".urlencode($sref);
|
||||
if ($month) $param.= "&month=".$month;
|
||||
if ($year) $param.= "&year=".$year;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if ($month) $param.= "&month=".urlencode($month);
|
||||
if ($year) $param.= "&year=".urlencode($year);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
|
||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit);
|
||||
|
||||
@@ -408,6 +408,7 @@ if ($sql_select)
|
||||
$documentstatic->statut=$objp->status;
|
||||
$documentstatic->status=$objp->status;
|
||||
$documentstatic->paye=$objp->paid;
|
||||
$documentstatic->paid=$objp->paid;
|
||||
|
||||
if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status;
|
||||
|
||||
@@ -573,8 +574,7 @@ if ($sql_select)
|
||||
*/
|
||||
print '</td>';
|
||||
|
||||
//print '<td class="left">'.$prodreftxt.'</td>';
|
||||
print '<td>'.$objp->libelle.'</td>';
|
||||
print '<td>'.$objp->type_contact_label.'</td>'; // Type of contact label
|
||||
|
||||
print '<td class="right">'.$objp->prod_qty.'</td>';
|
||||
$total_qty+=$objp->prod_qty;
|
||||
|
||||
@@ -1617,7 +1617,7 @@ function getListOfModels($db, $type, $maxfilenamelength = 0)
|
||||
$found=0;
|
||||
$dirtoscan='';
|
||||
|
||||
$sql = "SELECT nom as id, nom as lib, libelle as label, description as description";
|
||||
$sql = "SELECT nom as id, nom as doc_template_name, libelle as label, description as description";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql.= " WHERE type = '".$type."'";
|
||||
$sql.= " AND entity IN (0,".$conf->entity.")";
|
||||
@@ -1677,18 +1677,18 @@ function getListOfModels($db, $type, $maxfilenamelength = 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($type == 'member' && $obj->lib == 'standard') // Special case, if member template, we add variant per format
|
||||
if ($type == 'member' && $obj->doc_template_name == 'standard') // Special case, if member template, we add variant per format
|
||||
{
|
||||
global $_Avery_Labels;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
|
||||
foreach($_Avery_Labels as $key => $val)
|
||||
{
|
||||
$liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->lib).' '.$val['name'];
|
||||
$liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->doc_template_name).' '.$val['name'];
|
||||
}
|
||||
}
|
||||
else // Common usage
|
||||
{
|
||||
$liste[$obj->id]=$obj->label?$obj->label:$obj->lib;
|
||||
$liste[$obj->id]=$obj->label?$obj->label:$obj->doc_template_name;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
|
||||
@@ -129,7 +129,7 @@ class mailing_fraise extends MailingTargets
|
||||
$s.='</select> ';
|
||||
$s.=$langs->trans("Type").': ';
|
||||
$s.='<select name="filter_type" class="flat">';
|
||||
$sql = "SELECT rowid, libelle, statut";
|
||||
$sql = "SELECT rowid, libelle as label, statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql.= " WHERE entity IN (".getEntity('member_type').")";
|
||||
$sql.= " ORDER BY rowid";
|
||||
@@ -146,7 +146,7 @@ class mailing_fraise extends MailingTargets
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$s.='<option value="'.$obj->rowid.'">'.dol_trunc($obj->libelle, 38, 'middle');
|
||||
$s.='<option value="'.$obj->rowid.'">'.dol_trunc($obj->label, 38, 'middle');
|
||||
$s.='</option>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Stock"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->libelle));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label));
|
||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
@@ -334,7 +334,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$sql = "SELECT label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
$sql.= " WHERE fk_product=".$objp->rowid;
|
||||
$sql.= " AND lang='". $langs->getDefaultLang() ."'";
|
||||
$sql.= " AND lang='". $db->escape($langs->getDefaultLang()) ."'";
|
||||
$sql.= " LIMIT 1";
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -934,7 +934,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->libelle), '', 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->label), '', 'R');
|
||||
|
||||
$posy+=5;
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
@@ -958,7 +958,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$e = new Entrepot($db);
|
||||
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
|
||||
{
|
||||
$pdf->MultiCell(150, 3, $e->libelle, '', 'R');
|
||||
$pdf->MultiCell(150, 3, $e->label, '', 'R');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -256,7 +256,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
$element = 'movement';
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,";
|
||||
$sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,";
|
||||
$sql.= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,";
|
||||
$sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,";
|
||||
$sql.= " m.batch, m.price,";
|
||||
$sql.= " m.type_mouvement,";
|
||||
@@ -443,7 +443,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Stock"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->libelle));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label));
|
||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
@@ -587,7 +587,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
$productlot->sellby= $objp->sellby;
|
||||
|
||||
$warehousestatic->id=$objp->entrepot_id;
|
||||
$warehousestatic->libelle=$objp->stock;
|
||||
$warehousestatic->label=$objp->warehouse_ref;
|
||||
$warehousestatic->lieu=$objp->lieu;
|
||||
|
||||
$arrayofuniqueproduct[$objp->rowid]=$objp->produit;
|
||||
@@ -1015,7 +1015,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->libelle), '', 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->label), '', 'R');
|
||||
|
||||
$posy+=5;
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
@@ -1039,7 +1039,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
$e = new MouvementStock($db);
|
||||
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
|
||||
{
|
||||
$pdf->MultiCell(150, 3, $e->libelle, '', 'R');
|
||||
$pdf->MultiCell(150, 3, $e->label, '', 'R');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1366,7 +1366,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
|
||||
print '<td class="left">';
|
||||
print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->libelle);
|
||||
print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -1548,7 +1548,7 @@ if ($action == 'create')
|
||||
{
|
||||
$warehouseObject=new Entrepot($db);
|
||||
$warehouseObject->fetch($warehouse_selected_id);
|
||||
print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->libelle);
|
||||
print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1777,7 +1777,8 @@ class Expedition extends CommonObject
|
||||
{
|
||||
$line=new ExpeditionLigne($this->db);
|
||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||
$line->libelle=$langs->trans("Description")." ".$xnbp;
|
||||
$line->libelle=$langs->trans("Description")." ".$xnbp; // deprecated
|
||||
$line->label=$langs->trans("Description")." ".$xnbp;
|
||||
$line->qty=10;
|
||||
$line->qty_asked=5;
|
||||
$line->qty_shipped=4;
|
||||
@@ -1836,7 +1837,7 @@ class Expedition extends CommonObject
|
||||
global $langs;
|
||||
$this->meths = array();
|
||||
|
||||
$sql = "SELECT em.rowid, em.code, em.libelle";
|
||||
$sql = "SELECT em.rowid, em.code, em.libelle as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em";
|
||||
$sql.= " WHERE em.active = 1";
|
||||
$sql.= " ORDER BY em.libelle ASC";
|
||||
@@ -1847,7 +1848,7 @@ class Expedition extends CommonObject
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
$label=$langs->trans('SendingMethod'.$obj->code);
|
||||
$this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
|
||||
$this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1867,7 +1868,7 @@ class Expedition extends CommonObject
|
||||
$this->listmeths = array();
|
||||
$i=0;
|
||||
|
||||
$sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active";
|
||||
$sql = "SELECT em.rowid, em.code, em.libelle as label, em.description, em.tracking, em.active";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em";
|
||||
if ($id!='') $sql.= " WHERE em.rowid=".$id;
|
||||
|
||||
@@ -1879,7 +1880,7 @@ class Expedition extends CommonObject
|
||||
$this->listmeths[$i]['rowid'] = $obj->rowid;
|
||||
$this->listmeths[$i]['code'] = $obj->code;
|
||||
$label=$langs->trans('SendingMethod'.$obj->code);
|
||||
$this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
|
||||
$this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label);
|
||||
$this->listmeths[$i]['description'] = $obj->description;
|
||||
$this->listmeths[$i]['tracking'] = $obj->tracking;
|
||||
$this->listmeths[$i]['active'] = $obj->active;
|
||||
|
||||
@@ -663,7 +663,7 @@ class PaymentExpenseReport extends CommonObject
|
||||
|
||||
$result='';
|
||||
|
||||
if (empty($this->ref)) $this->ref=$this->lib;
|
||||
if (empty($this->ref)) $this->ref=$this->label;
|
||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||
|
||||
if (!empty($this->id))
|
||||
|
||||
@@ -342,12 +342,11 @@ class FichinterRec extends Fichinter
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$line = new FichinterLigne($this->db);
|
||||
|
||||
$line->rowid = $objp->rowid;
|
||||
$line->id = $objp->rowid;
|
||||
$line->label = $objp->custom_label; // Label line
|
||||
$line->desc = $objp->description; // Description line
|
||||
$line->product_type = $objp->product_type; // Type of line
|
||||
$line->product_ref = $objp->product_ref; // Ref product
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_label = $objp->product_label; // Label product
|
||||
$line->product_desc = $objp->product_desc; // Description product
|
||||
$line->fk_product_type = $objp->fk_product_type; // Type of product
|
||||
|
||||
@@ -706,7 +706,7 @@ if ($object->id > 0)
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
// TODO move to DAO class
|
||||
$sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,';
|
||||
$sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,';
|
||||
$sql.= ' SUM(pf.amount) as am';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn';
|
||||
@@ -741,13 +741,14 @@ if ($object->id > 0)
|
||||
$facturestatic->id=$obj->rowid;
|
||||
$facturestatic->ref=($obj->ref?$obj->ref:$obj->rowid);
|
||||
$facturestatic->ref_supplier = $obj->ref_supplier;
|
||||
$facturestatic->libelle = $obj->libelle;
|
||||
$facturestatic->libelle = $obj->label; // deprecated
|
||||
$facturestatic->label = $obj->label;
|
||||
$facturestatic->total_ht = $obj->total_ht;
|
||||
$facturestatic->total_tva = $obj->total_tva;
|
||||
$facturestatic->total_ttc = $obj->total_ttc;
|
||||
print $facturestatic->getNomUrl(1);
|
||||
print $obj->ref_supplier?' - '.$obj->ref_supplier:'';
|
||||
print ($obj->libelle?' - ':'').dol_trunc($obj->libelle, 14);
|
||||
print ($obj->label?' - ':'').dol_trunc($obj->label, 14);
|
||||
print '</td>';
|
||||
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->df), 'day').'</td>';
|
||||
print '<td class="right nowrap">'.price($obj->amount).'</td>';
|
||||
|
||||
@@ -439,7 +439,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$line->fk_product = $objp->fk_product;
|
||||
|
||||
$line->libelle = $objp->product_label;
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc;
|
||||
|
||||
@@ -2349,17 +2349,17 @@ class CommandeFournisseur extends CommonOrder
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$prod = new Product($this->db);
|
||||
$libelle = '';
|
||||
$label = '';
|
||||
$ref = '';
|
||||
if ($prod->fetch($comclient->lines[$i]->fk_product) > 0)
|
||||
{
|
||||
$libelle = $prod->libelle;
|
||||
$ref = $prod->ref;
|
||||
$label = $prod->label;
|
||||
$ref = $prod->ref;
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
|
||||
$sql .= " (fk_commande,label,description,fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)";
|
||||
$sql .= " VALUES (".$idc.", '" . $this->db->escape($libelle) . "','" . $this->db->escape($comclient->lines[$i]->desc) . "'";
|
||||
$sql .= " (fk_commande, label, description, fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)";
|
||||
$sql .= " VALUES (".$idc.", '" . $this->db->escape($label) . "','" . $this->db->escape($comclient->lines[$i]->desc) . "'";
|
||||
$sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'";
|
||||
$sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent;
|
||||
$sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."');";
|
||||
|
||||
@@ -637,6 +637,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->libelle = $obj->label; // deprecated
|
||||
$this->label = $obj->label;
|
||||
$this->paye = $obj->paye;
|
||||
$this->paid = $obj->paye;
|
||||
$this->amount = $obj->amount;
|
||||
$this->remise = $obj->remise;
|
||||
$this->close_code = $obj->close_code;
|
||||
|
||||
@@ -158,17 +158,18 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
||||
$datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y"));
|
||||
}
|
||||
if (! $error) {
|
||||
$object->ref = GETPOST('ref');
|
||||
$object->ref_supplier = GETPOST('ref_supplier');
|
||||
$object->ref = GETPOST('ref', 'nohtml');
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->libelle = GETPOST('libelle');
|
||||
$object->libelle = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml'));
|
||||
$object->label = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml'));
|
||||
$object->date = $datefacture;
|
||||
$object->date_echeance = $datedue;
|
||||
$object->note_public = GETPOST('note_public', 'none');
|
||||
$object->note_private = GETPOST('note_private', 'none');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||
$projectid = GETPOST('projectid');
|
||||
$projectid = GETPOST('projectid', 'int');
|
||||
if ($projectid > 0)
|
||||
$object->fk_project = $projectid;
|
||||
|
||||
|
||||
@@ -636,10 +636,10 @@ if (empty($reshook))
|
||||
$result = $object->fetch(GETPOST('fac_replacement'), 'int');
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$object->ref = GETPOST('ref');
|
||||
$object->ref = GETPOST('ref', 'nohtml');
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->libelle = GETPOST('label');
|
||||
$object->libelle = GETPOST('label', 'nohtml');
|
||||
$object->date = $datefacture;
|
||||
$object->date_echeance = $datedue;
|
||||
$object->note_public = GETPOST('note_public', 'none');
|
||||
@@ -700,10 +700,11 @@ if (empty($reshook))
|
||||
$tmpproject = GETPOST('projectid', 'int');
|
||||
|
||||
// Creation facture
|
||||
$object->ref = $_POST['ref'];
|
||||
$object->ref_supplier = $_POST['ref_supplier'];
|
||||
$object->socid = $_POST['socid'];
|
||||
$object->libelle = $_POST['label'];
|
||||
$object->ref = GETPOST('ref', 'nohtml');
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'nohtml');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->libelle = GETPOST('label', 'nohtml');
|
||||
$object->label = GETPOST('label', 'nohtml');
|
||||
$object->date = $datefacture;
|
||||
$object->date_echeance = $datedue;
|
||||
$object->note_public = GETPOST('note_public', 'none');
|
||||
|
||||
@@ -1297,7 +1297,7 @@ if ($ok && GETPOST('clean_perm_table', 'alpha'))
|
||||
{
|
||||
$listofmods.=($listofmods?',':'')."'".$val."'";
|
||||
}
|
||||
$sql = 'SELECT id, libelle, module from '.MAIN_DB_PREFIX.'rights_def WHERE module not in ('.$listofmods.') AND id > 100000';
|
||||
$sql = 'SELECT id, libelle as label, module from '.MAIN_DB_PREFIX.'rights_def WHERE module not in ('.$listofmods.') AND id > 100000';
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@@ -1310,7 +1310,7 @@ if ($ok && GETPOST('clean_perm_table', 'alpha'))
|
||||
$obj=$db->fetch_object($resql);
|
||||
if ($obj->id > 0)
|
||||
{
|
||||
print '<tr><td>Found line with id '.$obj->id.', label "'.$obj->libelle.'" of module "'.$obj->module.'" to delete';
|
||||
print '<tr><td>Found line with id '.$obj->id.', label "'.$obj->label.'" of module "'.$obj->module.'" to delete';
|
||||
if (GETPOST('clean_perm_table', 'alpha') == 'confirmed')
|
||||
{
|
||||
$sqldelete = 'DELETE FROM '.MAIN_DB_PREFIX.'rights_def WHERE id = '.$obj->id;
|
||||
|
||||
@@ -559,7 +559,7 @@ else
|
||||
$entrepot = new Entrepot($db);
|
||||
$entrepot->fetch($object->entrepot_id);
|
||||
print '<tr><td width="20%">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$entrepot->id.'">'.$entrepot->libelle.'</a></td>';
|
||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/product/stock/card.php?id='.$entrepot->id.'">'.$entrepot->label.'</a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -2094,7 +2094,7 @@ class Product extends CommonObject
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->label = $obj->label;
|
||||
$this->label = $obj->label;
|
||||
$this->description = $obj->description;
|
||||
$this->url = $obj->url;
|
||||
$this->note_private = $obj->note_private;
|
||||
@@ -4461,9 +4461,9 @@ class Product extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Retourne le libelle du finished du produit
|
||||
* Retour label of nature of product
|
||||
*
|
||||
* @return string Libelle
|
||||
* @return string Label
|
||||
*/
|
||||
public function getLibFinished()
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,";
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty";
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle as label, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty";
|
||||
if (! $user->rights->societe->client->voir && ! $socid)
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
||||
@@ -221,7 +221,8 @@ if ($id > 0 || ! empty($ref))
|
||||
$supplierinvoicestatic->id = $objp->facid;
|
||||
$supplierinvoicestatic->ref = $objp->ref;
|
||||
$supplierinvoicestatic->ref_supplier = $objp->ref_supplier;
|
||||
$supplierinvoicestatic->libelle = $objp->libelle;
|
||||
$supplierinvoicestatic->libelle = $objp->label;
|
||||
$supplierinvoicestatic->label = $objp->label;
|
||||
$supplierinvoicestatic->total_ht = $objp->total_ht;
|
||||
$supplierinvoicestatic->total_ttc = $objp->total_ttc;
|
||||
$supplierinvoicestatic->total_tva = $objp->total_tva;
|
||||
|
||||
@@ -48,22 +48,13 @@ class Entrepot extends CommonObject
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* Warehouse closed, inactive
|
||||
* @var string Label
|
||||
* @deprecated
|
||||
*/
|
||||
const STATUS_CLOSED = 0;
|
||||
|
||||
/**
|
||||
* Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed.
|
||||
*/
|
||||
const STATUS_OPEN_ALL = 1;
|
||||
|
||||
/**
|
||||
* Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch).
|
||||
*/
|
||||
const STATUS_OPEN_INTERNAL = 2;
|
||||
|
||||
public $libelle;
|
||||
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var string description
|
||||
*/
|
||||
@@ -118,6 +109,21 @@ class Entrepot extends CommonObject
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
|
||||
);
|
||||
|
||||
/**
|
||||
* Warehouse closed, inactive
|
||||
*/
|
||||
const STATUS_CLOSED = 0;
|
||||
|
||||
/**
|
||||
* Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed.
|
||||
*/
|
||||
const STATUS_OPEN_ALL = 1;
|
||||
|
||||
/**
|
||||
* Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch).
|
||||
*/
|
||||
const STATUS_OPEN_INTERNAL = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -443,7 +449,7 @@ class Entrepot extends CommonObject
|
||||
$this->id = $obj->rowid;
|
||||
$this->fk_parent = $obj->fk_parent;
|
||||
$this->ref = $obj->label;
|
||||
$this->label = $obj->label; // deprecated
|
||||
$this->label = $obj->label;
|
||||
$this->libelle = $obj->label; // deprecated
|
||||
$this->description = $obj->description;
|
||||
$this->statut = $obj->statut;
|
||||
|
||||
@@ -444,7 +444,7 @@ $formproduct=new FormProduct($db);
|
||||
if (!empty($conf->projet->enabled)) $formproject=new FormProjets($db);
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,";
|
||||
$sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,";
|
||||
$sql.= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,";
|
||||
$sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,";
|
||||
$sql.= " m.batch, m.price,";
|
||||
$sql.= " m.type_mouvement,";
|
||||
@@ -978,7 +978,8 @@ if ($resql)
|
||||
$productlot->sellby= $objp->sellby;
|
||||
|
||||
$warehousestatic->id=$objp->entrepot_id;
|
||||
$warehousestatic->libelle=$objp->stock;
|
||||
$warehousestatic->libelle=$objp->warehouse_ref; // deprecated
|
||||
$warehousestatic->label=$objp->warehouse_ref;
|
||||
$warehousestatic->lieu=$objp->lieu;
|
||||
|
||||
$arrayofuniqueproduct[$objp->rowid]=$objp->produit;
|
||||
|
||||
@@ -986,7 +986,7 @@ if ($resql)
|
||||
|
||||
$warehousestatic->id=$objp->entrepot_id;
|
||||
$warehousestatic->ref=$objp->warehouse_ref;
|
||||
$warehousestatic->libelle=$objp->warehouse_ref;
|
||||
$warehousestatic->libelle=$objp->warehouse_ref; // deprecated
|
||||
$warehousestatic->label=$objp->warehouse_ref;
|
||||
$warehousestatic->lieu=$objp->lieu;
|
||||
$warehousestatic->fk_parent = $objp->fk_parent;
|
||||
|
||||
@@ -560,7 +560,6 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE))
|
||||
else
|
||||
{
|
||||
$adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE);
|
||||
//print $adht->libelle;
|
||||
print '<input type="hidden" id="type" name="type" value="'.$conf->global->MEMBER_NEWFORM_FORCETYPE.'">';
|
||||
}
|
||||
// Moral/Physic attribute
|
||||
|
||||
@@ -301,6 +301,8 @@ if ($id > 0 || ! empty($ref))
|
||||
// Type
|
||||
$membertypestatic->id=$objp->type_id;
|
||||
$membertypestatic->libelle=$objp->type;
|
||||
$membertypestatic->label=$objp->type;
|
||||
|
||||
print '<td class="nowrap">';
|
||||
print $membertypestatic->getNomUrl(1, 32);
|
||||
print '</td>';
|
||||
|
||||
@@ -1364,9 +1364,9 @@ class SupplierProposal extends CommonObject
|
||||
|
||||
$line->fk_product = $objp->fk_product;
|
||||
|
||||
$line->ref = $objp->product_ref; // TODO deprecated
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
$line->product_ref = $objp->product_ref;
|
||||
$line->libelle = $objp->product_label; // TODO deprecated
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
$line->product_label = $objp->product_label;
|
||||
$line->product_desc = $objp->product_desc; // Description produit
|
||||
$line->fk_product_type = $objp->fk_product_type;
|
||||
|
||||
@@ -45,14 +45,14 @@ $langs->loadLangs(array("admin", "cashdesk"));
|
||||
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
|
||||
$sql = "SELECT code, libelle as label FROM ".MAIN_DB_PREFIX."c_paiement";
|
||||
$sql.= " WHERE entity IN (".getEntity('c_paiement').")";
|
||||
$sql.= " AND active = 1";
|
||||
$sql.= " ORDER BY libelle";
|
||||
$resql = $db->query($sql);
|
||||
$paiements = array();
|
||||
if($resql){
|
||||
while ($obj = $db->fetch_object($resql)){
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
array_push($paiements, $obj);
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ if (! empty($conf->banque->enabled))
|
||||
foreach($paiements as $modep) {
|
||||
if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; // Already managed before
|
||||
$name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse;
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).'</td>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->label).'</td>';
|
||||
print '<td>';
|
||||
if (! empty($conf->global->$name)) $atleastonefound++;
|
||||
$cour=preg_match('/^LIQ.*/', $modep->code)?2:1;
|
||||
|
||||
@@ -2258,7 +2258,7 @@ class Ticket extends CommonObject
|
||||
$sql .= ", t.phone as phone, t.phone_mobile as phone_mobile, t.phone_perso as phone_perso";
|
||||
}
|
||||
|
||||
$sql .= ", tc.source, tc.element, tc.code, tc.libelle";
|
||||
$sql .= ", tc.source, tc.element, tc.code, tc.libelle as type_contact_label";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_type_contact tc";
|
||||
$sql .= ", " . MAIN_DB_PREFIX . "element_contact ec";
|
||||
if ($source == 'internal') {
|
||||
@@ -2296,7 +2296,7 @@ class Ticket extends CommonObject
|
||||
|
||||
if (!$list) {
|
||||
$transkey = "TypeContact_" . $obj->element . "_" . $obj->source . "_" . $obj->code;
|
||||
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
||||
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_contact_label);
|
||||
$tab[$i] = array(
|
||||
'source' => $obj->source,
|
||||
'socid' => $obj->socid,
|
||||
|
||||
@@ -258,7 +258,7 @@ class User extends CommonObject
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.personal_email, u.job, u.skype, u.twitter, u.facebook, u.linkedin,";
|
||||
$sql.= " u.signature, u.office_phone, u.office_fax, u.user_mobile, u.personal_mobile,";
|
||||
$sql.= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,";
|
||||
$sql.= " u.admin, u.login, u.note,";
|
||||
$sql.= " u.admin, u.login, u.note as note_private, u.note_public,";
|
||||
$sql.= " u.pass, u.pass_crypted, u.pass_temp, u.api_key,";
|
||||
$sql.= " u.fk_soc, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid, u.fk_user_expense_validator, u.fk_user_holiday_validator,";
|
||||
$sql.= " u.statut, u.lang, u.entity,";
|
||||
@@ -374,7 +374,9 @@ class User extends CommonObject
|
||||
$this->job = $obj->job;
|
||||
$this->signature = $obj->signature;
|
||||
$this->admin = $obj->admin;
|
||||
$this->note = $obj->note;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note = $obj->note_private;
|
||||
$this->statut = $obj->statut;
|
||||
$this->photo = $obj->photo;
|
||||
$this->openid = $obj->openid;
|
||||
@@ -1222,7 +1224,8 @@ class User extends CommonObject
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
$langs->load("stocks");
|
||||
$entrepot = new Entrepot($this->db);
|
||||
$entrepot->libelle = $langs->trans("PersonalStock", $this->getFullName($langs));
|
||||
$entrepot->label = $langs->trans("PersonalStock", $this->getFullName($langs));
|
||||
$entrepot->libelle = $entrepot->label; // For backward compatibility
|
||||
$entrepot->description = $langs->trans("ThisWarehouseIsPersonalStock", $this->getFullName($langs));
|
||||
$entrepot->statut = 1;
|
||||
$entrepot->country_id = $mysoc->country_id;
|
||||
@@ -1515,7 +1518,8 @@ class User extends CommonObject
|
||||
|
||||
$this->job = trim($this->job);
|
||||
$this->signature = trim($this->signature);
|
||||
$this->note = trim($this->note);
|
||||
$this->note_public = trim($this->note_public);
|
||||
$this->note_private = trim($this->note_private);
|
||||
$this->openid = trim(empty($this->openid)?'':$this->openid); // Avoid warning
|
||||
$this->admin = $this->admin?$this->admin:0;
|
||||
$this->address = empty($this->address)?'':$this->address;
|
||||
@@ -1574,7 +1578,8 @@ class User extends CommonObject
|
||||
$sql.= ", color = '".$this->db->escape($this->color)."'";
|
||||
$sql.= ", dateemployment=".(strval($this->dateemployment)!='' ? "'".$this->db->idate($this->dateemployment)."'" : 'null');
|
||||
$sql.= ", dateemploymentend=".(strval($this->dateemploymentend)!='' ? "'".$this->db->idate($this->dateemploymentend)."'" : 'null');
|
||||
$sql.= ", note = '".$this->db->escape($this->note)."'";
|
||||
$sql.= ", note = '".$this->db->escape($this->note_private)."'";
|
||||
$sql.= ", note_public = '".$this->db->escape($this->note_public)."'";
|
||||
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
||||
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
|
||||
$sql.= ", fk_user = ".($this->fk_user > 0?"'".$this->db->escape($this->fk_user)."'":"null");
|
||||
@@ -2692,7 +2697,8 @@ class User extends CommonObject
|
||||
$this->lastname='DOLIBARR';
|
||||
$this->firstname='SPECIMEN';
|
||||
$this->gender='man';
|
||||
$this->note='This is a note';
|
||||
$this->note_public='This is a note public';
|
||||
$this->note_private='This is a note private';
|
||||
$this->email='email@specimen.com';
|
||||
$this->personal_email='personalemail@specimen.com';
|
||||
$this->skype='skypepseudo';
|
||||
|
||||
@@ -243,7 +243,7 @@ if ($object->id > 0)
|
||||
print '<td>'.$langs->trans("Permissions").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT r.id, r.libelle, r.module";
|
||||
$sql = "SELECT r.id, r.libelle as label, r.module";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
||||
$sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
|
||||
$sql.= " AND r.entity = " . $entity;
|
||||
@@ -330,7 +330,7 @@ if ($object->id > 0)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->libelle)));
|
||||
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->label)));
|
||||
print '<td>'.$perm_libelle. '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
@@ -283,7 +283,7 @@ print '<td>'.$langs->trans("Permissions").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
//print "xx".$conf->global->MAIN_USE_ADVANCED_PERMS;
|
||||
$sql = "SELECT r.id, r.libelle, r.module, r.module_position";
|
||||
$sql = "SELECT r.id, r.libelle as label, r.module, r.module_position";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
||||
$sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
|
||||
$sql.= " AND r.entity = " . $entity;
|
||||
@@ -421,7 +421,7 @@ if ($result)
|
||||
}
|
||||
|
||||
// Label
|
||||
$permlabel=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->libelle)));
|
||||
$permlabel=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->label)));
|
||||
print '<td class="maxwidthonsmartphone">'.$permlabel.'</td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
@@ -518,10 +518,10 @@ function createProductOrService($authentication, $product)
|
||||
$newobject->ref=$product['ref'];
|
||||
$newobject->ref_ext=$product['ref_ext'];
|
||||
$newobject->type=$product['type'];
|
||||
$newobject->libelle=$product['label']; // @deprecated
|
||||
$newobject->label=$product['label'];
|
||||
$newobject->description=$product['description'];
|
||||
$newobject->note=$product['note'];
|
||||
$newobject->note_public=$product['note_public'];
|
||||
$newobject->note_private=$product['note_private'];
|
||||
$newobject->status=$product['status_tosell'];
|
||||
$newobject->status_buy=$product['status_tobuy'];
|
||||
$newobject->price=$product['price_net'];
|
||||
@@ -692,7 +692,6 @@ function updateProductOrService($authentication, $product)
|
||||
if (isset($product['ref'])) $newobject->ref=$product['ref'];
|
||||
if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext'];
|
||||
$newobject->type=$product['type'];
|
||||
$newobject->libelle=$product['label']; // @deprecated
|
||||
$newobject->label=$product['label'];
|
||||
$newobject->description=$product['description'];
|
||||
$newobject->note=$product['note'];
|
||||
|
||||
@@ -290,8 +290,8 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '')
|
||||
'date_modification'=>dol_print_date($invoice->tms, 'dayhourrfc'),
|
||||
'date_invoice'=>dol_print_date($invoice->date, 'dayhourrfc'),
|
||||
'date_term'=>dol_print_date($invoice->date_echeance, 'dayhourrfc'),
|
||||
'label'=>$invoice->libelle,
|
||||
'paid'=>$invoice->paye,
|
||||
'label'=>$invoice->label,
|
||||
'paid'=>$invoice->paid,
|
||||
'note_private'=>$invoice->note_private,
|
||||
'note_public'=>$invoice->note_public,
|
||||
'close_code'=>$invoice->close_code,
|
||||
@@ -422,8 +422,8 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty)
|
||||
'date_modification'=>dol_print_date($invoice->tms, 'dayhourrfc'),
|
||||
'date_invoice'=>dol_print_date($invoice->date, 'dayhourrfc'),
|
||||
'date_term'=>dol_print_date($invoice->date_echeance, 'dayhourrfc'),
|
||||
'label'=>$invoice->libelle,
|
||||
'paid'=>$invoice->paye,
|
||||
'label'=>$invoice->label,
|
||||
'paid'=>$invoice->paid,
|
||||
'note_private'=>$invoice->note_private,
|
||||
'note_public'=>$invoice->note_public,
|
||||
'close_code'=>$invoice->close_code,
|
||||
|
||||
Reference in New Issue
Block a user