diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index ec5b9945c8e..8b9926e6458 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1162,7 +1162,7 @@ class Propal extends CommonObject } // Call trigger - $result=$this->call_trigger('PROPAL_CLONE',$user); + $result=$clonedObj->call_trigger('PROPAL_CLONE',$user); if ($result < 0) { $error++; } // End call triggers } diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index a497b3cb7e2..52da8c51fe8 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -148,7 +148,9 @@ class HookManager 'printAddress', 'printSearchForm', 'formatEvent', - 'addCalendarChoice' + 'addCalendarChoice', + 'createDictionaryFieldList', + 'editDictionaryFieldlist' ) )) $hooktype='addreplace'; // Deprecated hook types ('returnvalue') diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 97b060dac54..da22c014e50 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -891,7 +891,7 @@ class Form $outarray=array(); // On recherche les societes - $sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.code_client, s.code_fournisseur"; + $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX ."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; @@ -967,6 +967,10 @@ class Form $label=$obj->name; } + if(!empty($obj->name_alias)) { + $label.=' ('.$obj->name_alias.')'; + } + if ($showtype) { if ($obj->client || $obj->fournisseur) $label.=' ('; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index bd0387d392f..4aab3a99573 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014-2015 Ferran Marcet * Copyright (C) 201 Charlie Benke * * This program is free software; you can redistribute it and/or modify @@ -1525,7 +1525,7 @@ else if ($id > 0 || ! empty($ref)) print ''; $selectmode='select'; if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text'; - $form->select_duration('duration',$objp->duree, $selectmode); + $form->select_duration('duration',$objp->duree,0, $selectmode); print ''; print ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7f475f87f24..06da62fd016 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -53,12 +53,10 @@ class CommandeFournisseur extends CommonOrder var $id; /** - * TODO: Remove - * @deprecated - * @see product_ref + * Supplier invoice reference + * @var string */ var $ref; - var $product_ref; var $ref_supplier; var $brouillon; var $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially @@ -574,7 +572,7 @@ class CommandeFournisseur extends CommonOrder */ function getNomUrl($withpicto=0,$option='') { - global $langs; + global $langs, $conf; $result=''; $label = '' . $langs->trans("ShowOrder") . ''; @@ -1213,7 +1211,9 @@ class CommandeFournisseur extends CommonOrder */ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0, $fk_unit=null) { - global $langs,$mysoc; + global $langs,$mysoc, $conf; + + $error = 0; dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2. $fk_product, $fk_prod_fourn_price, $fourn_ref, $remise_percent, $price_base_type, $pu_ttc, $type, $fk_unit"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 32525114ee3..efea924b280 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -36,7 +36,7 @@ $langs->load("margins"); // Security check -if ($user->rights->margin->read->all) { +if ($user->rights->margins->read->all) { $agentid = GETPOST('agentid', 'int'); } else { $agentid = $user->id; @@ -91,7 +91,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto); print '
'; print ''; -if ($user->rights->margin->read->all) { +if ($user->rights->margins->read->all) { print ''; print '
'.$langs->trans('SalesRepresentative').''; print $form->select_dolusers($agentid, 'agentid', 1); diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 1478dd9dcb0..ce100d49390 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -77,7 +77,7 @@ function marges_prepare_head() $h++; } - if ($user->rights->margin->read->all) { + if ($user->rights->margins->read->all) { $title = 'UserMargins'; } else { $title = 'SalesRepresentativeMargins';