From 0a92849de3fce4da8eced75797abf4fa45708243 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Mon, 16 Nov 2015 10:57:47 +0100 Subject: [PATCH 1/9] FIX: Can't update line's duration --- htdocs/fichinter/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ''; From 73da011461922b97fa3e7f5974b39b5fe63cf986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:16:54 +0100 Subject: [PATCH 2/9] FIX #3997 Wrong permission key used for Margins > Read all --- htdocs/margin/agentMargins.php | 4 ++-- htdocs/margin/lib/margins.lib.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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'; From 8e9e2911ae4aa551975b635cf0b0d4ed1e40fec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:18:25 +0100 Subject: [PATCH 3/9] FIX #3996 Dictionnary hooks are not working in 3.8 --- htdocs/core/class/hookmanager.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') From be460b6cbf0a8ac88d5bc76b420c5e02b2185786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:20:56 +0100 Subject: [PATCH 4/9] FIX #3992 CommandeFournisseur::ref is marked as deprecated and it shouldn't be --- htdocs/fourn/class/fournisseur.commande.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7f475f87f24..8ba74dda8ce 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 From 0880b13142b21ea8092de6dc9dbad24a8c84eae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:24:11 +0100 Subject: [PATCH 5/9] FIX #3988 Undefined variable $conf and $error in CommandeFournisseur::addline --- htdocs/fourn/class/fournisseur.commande.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7f475f87f24..ec1eb933b28 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1213,7 +1213,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'; From ec7e4cb3d4cc15286a2ef0c16c1b9ea850003fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:25:00 +0100 Subject: [PATCH 6/9] FIX #3989 Undefined variable $conf in CommandeFournisseur::getNomUrl --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7f475f87f24..7dbd6e902f3 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -574,7 +574,7 @@ class CommandeFournisseur extends CommonOrder */ function getNomUrl($withpicto=0,$option='') { - global $langs; + global $langs, $conf; $result=''; $label = '' . $langs->trans("ShowOrder") . ''; From 53fb085766bbccebde5fbf840fc23c5f0c0c5ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 16 Nov 2015 13:29:37 +0100 Subject: [PATCH 7/9] Corrected indent --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 8ba74dda8ce..d667799f64b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -54,7 +54,7 @@ class CommandeFournisseur extends CommonOrder /** * Supplier invoice reference - * @var string + * @var string */ var $ref; var $ref_supplier; From c21354101fb739e19a574ac42ada5bc35cfe90d6 Mon Sep 17 00:00:00 2001 From: phf Date: Mon, 16 Nov 2015 15:33:10 +0100 Subject: [PATCH 8/9] FIX can not have access to the new ids or propal lines on PROPAL_CLONE --- htdocs/comm/propal/class/propal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } From a7d2bdc2c1bbd9919d19bd382241c828075a762c Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 16 Nov 2015 19:10:20 +0100 Subject: [PATCH 9/9] FIX 3.8 allow to search on alias name into select --- htdocs/core/class/html.form.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.=' (';