From 84764771373f06b9fd62ea691ddac377bbdfe848 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Thu, 27 Feb 2020 09:19:39 +0100 Subject: [PATCH] add const NOTMODIFYOTHERENTITYFOURNPRICE if const NOTMODIFYOTHERENTITYFOURNPRICE, can't modify other shared fourn prices. --- htdocs/product/fournisseurs.php | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 0bda7d44564..797f350627e 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -1,14 +1,15 @@ - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2010-2012 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2014 Ion Agorria - * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2016 Ferran Marcet - * Copyright (C) 2019 Frédéric France +/* Copyright (C) 2001-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2014 Ion Agorria + * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2020 Pierre Ardoin * * 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 @@ -933,7 +934,14 @@ SCRIPT; // Modify-Remove print ''; - if ($usercancreate) + + if (!empty($conf->global->NOTMODIFYOTHERENTITYFOURNPRICE) && $productfourn->product_fourn_entity!=$conf->entity) { + $canmodifyotherentityfournprice = 0; + }else{ + $canmodifyotherentityfournprice = 1; + } + + if ($usercancreate && $canmodifyotherentityfournprice == 1) { print ''.img_edit().""; print '   ';