diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 56a8ed25c44..2c4bbf372a0 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1734,7 +1734,7 @@ if ($action == 'create') print_fiche_titre($langs->trans('NewBill')); $soc = new Societe($db); - if ($socid>1) $res=$soc->fetch($socid); + if ($socid>0) $res=$soc->fetch($socid); if (! empty($origin) && ! empty($originid)) { @@ -1811,7 +1811,7 @@ if ($action == 'create') print ''.$langs->trans('Ref').''.$langs->trans('Draft').''; // Factures predefinies - if (empty($origin) && empty($originid) && $socid>1) + if (empty($origin) && empty($originid) && $socid>0) { $sql = 'SELECT r.rowid, r.titre, r.total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_rec as r'; @@ -1849,7 +1849,7 @@ if ($action == 'create') // Tiers print ''; print ''.$langs->trans('Customer').''; - if($socid>1) + if($socid>0) { print ''; print $soc->getNomUrl(1); @@ -1935,7 +1935,7 @@ if ($action == 'create') print ''."\n"; } - if ($socid>1) + if ($socid>0) { // Replacement print ''; @@ -1989,7 +1989,7 @@ if ($action == 'create') print ''; print ''; - if($socid>1) + if($socid>0) { // Discounts for third party print ''.$langs->trans('Discounts').''; @@ -2021,7 +2021,7 @@ if ($action == 'create') print ''; // Project - if (! empty($conf->projet->enabled) && $socid>1) + if (! empty($conf->projet->enabled) && $socid>0) { $langs->load('projects'); print ''.$langs->trans('Project').'';