From c0b57fccaf5b07eb78cac340c49781efbf9fdbd0 Mon Sep 17 00:00:00 2001 From: simnandez Date: Tue, 17 Sep 2013 17:43:14 +0200 Subject: [PATCH] [ task #1063 ] Allow edit localtaxes rate for thirds --- htdocs/societe/localtaxes.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/localtaxes.php b/htdocs/societe/localtaxes.php index 22d41484720..1f5d81bc5bd 100644 --- a/htdocs/societe/localtaxes.php +++ b/htdocs/societe/localtaxes.php @@ -78,7 +78,7 @@ if ($socid) print ''; print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -167,6 +167,9 @@ if ($socid) print '
'.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); + print $form->showrefnav($soc,'socid','',0,'rowid','nom'); print '
'; print ''; + + + // TODO: Improve and move to tpl // Localtaxes @@ -188,8 +191,8 @@ if ($socid) print ''.$langs->trans('Localtax2').' (%)'; //print ''; - - print ''; // No width to allow autodim + if ($user->rights->societe->creer) + print ''; // No width to allow autodim print "\n"; @@ -215,7 +218,7 @@ if ($socid) $obj = $db->fetch_object($resql); - if ($action == 'edit' && $obj->rowid==$vatid) + if ($action == 'edit' && $obj->rowid==$vatid && $user->rights->societe->creer) { print '
'; print ''; @@ -247,7 +250,8 @@ if ($socid) print ''.$obj->localtax1.''; if ($mysoc->localtax2_assuj=="1" && $soc->localtax2_assuj) print ''.$obj->localtax2.''; - print 'id.'&vatid='.$obj->rowid.'">'.img_edit().''; + if ($user->rights->societe->creer) + print 'id.'&vatid='.$obj->rowid.'">'.img_edit().''; print "\n"; }