From d28eacebd7e4b6993cfedbcbcb17894a0337fbd8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 14:53:08 +0100 Subject: [PATCH] Fix: Remove an edit button that is not implemented. --- htdocs/societe/localtaxes.php | 106 +++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/htdocs/societe/localtaxes.php b/htdocs/societe/localtaxes.php index 68a2957eeb8..4471c163f44 100644 --- a/htdocs/societe/localtaxes.php +++ b/htdocs/societe/localtaxes.php @@ -47,17 +47,14 @@ $parameters=array('id'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors); + /* * View */ $contactstatic = new Contact($db); - $form = new Form($db); -/* - * Fiche categorie de client et/ou fournisseur - */ if ($socid) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -140,43 +137,45 @@ if ($socid) print ''.$langs->trans('Phone').''.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').''; print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').''; - - if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") - { - print ''.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; - print yn($soc->localtax1_assuj); - print ''; - print ''.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; - print yn($soc->localtax2_assuj); - print ''; - } - elseif($mysoc->localtax1_assuj=="1") - { - print ''.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; - print yn($soc->localtax1_assuj); - print ''; - } - elseif($mysoc->localtax2_assuj=="1") - { - print ''.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; - print yn($soc->localtax2_assuj); - print ''; - } - - + + if ($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") + { + print ''.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; + print yn($soc->localtax1_assuj); + print ''; + print ''.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; + print yn($soc->localtax2_assuj); + print ''; + } + elseif($mysoc->localtax1_assuj=="1") + { + print ''.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; + print yn($soc->localtax1_assuj); + print ''; + } + elseif($mysoc->localtax2_assuj=="1") + { + print ''.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; + print yn($soc->localtax2_assuj); + print ''; + } + print ''; - print ''; - - - // TODO: Improve and move to tpl - + dol_fiche_end(); + + + print '
'; + print ''; + print ''; + print ''; + // Localtaxes - + print ''; - + print ''; - + // Description print ''; @@ -195,8 +194,8 @@ if ($socid) print ''; // No width to allow autodim print "\n"; - - + + $sql = "SELECT DISTINCT t.rowid, t.note, t.taux, t.localtax1, t.localtax2, t.recuperableonly"; $sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p"; $sql.= " WHERE t.fk_pays = p.rowid"; @@ -215,21 +214,16 @@ if ($socid) { $var=!$var; - + $obj = $db->fetch_object($resql); - + if ($action == 'edit' && $obj->rowid==$vatid && $user->rights->societe->creer) { - print ''; - print ''; - print ''; - print ''; - print ''; - + print ''; print ''; - + if ($mysoc->localtax1_assuj=="1" && $soc->localtax1_assuj) print ''; if ($mysoc->localtax2_assuj=="1" && $soc->localtax2_assuj) @@ -238,27 +232,33 @@ if ($socid) print ''; print ''; - print ''; } - else + else { print ''; - + print ''; print ''; if ($mysoc->localtax1_assuj=="1" && $soc->localtax1_assuj) print ''; if ($mysoc->localtax2_assuj=="1" && $soc->localtax2_assuj) print ''; + print ''; + { + // TODO Comment this because the action to save is not supported + //print 'id.'&vatid='.$obj->rowid.'">'.img_edit().''; + } + print ''; print "\n"; } - - } } } + + print '
'.$langs->trans('Description').'
'.$obj->note.''.$obj->taux.''; print '
'.$obj->note.''.$obj->taux.''.$obj->localtax1.''.$obj->localtax2.''; if ($user->rights->societe->creer) - print 'id.'&vatid='.$obj->rowid.'">'.img_edit().'
'; + + print ''; }