Fix: Hide if supplier module is disabled

This commit is contained in:
Laurent Destailleur 2011-01-26 19:41:51 +00:00
parent e40cef2b85
commit 3e27fb9d97

View File

@ -1103,6 +1103,8 @@ else
print '</td></tr>'; print '</td></tr>';
// Supplier // Supplier
if ($conf->fournisseur->enabled)
{
print '<tr>'; print '<tr>';
print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>'; print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>';
print $form->selectyesno("fournisseur",$soc->fournisseur,1); print $form->selectyesno("fournisseur",$soc->fournisseur,1);
@ -1133,7 +1135,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Category // Category
if ($soc->fournisseur) if ($conf->categorie->enabled && $soc->fournisseur)
{ {
$load = $soc->LoadSupplierCateg(); $load = $soc->LoadSupplierCateg();
if ( $load == 0) if ( $load == 0)
@ -1147,6 +1149,7 @@ else
} }
} }
} }
}
if ($conf->global->MAIN_MODULE_BARCODE) if ($conf->global->MAIN_MODULE_BARCODE)
{ {