From ffbb611eb4cb2035b262a935c9dd80f77d0f8946 Mon Sep 17 00:00:00 2001 From: simnandez <jmenent@2byte.es> Date: Sun, 13 Jan 2013 10:57:39 +0100 Subject: [PATCH] [ task #652 ] Reduce clicks into creaton of orders, invoices, etc. --- htdocs/compta/facture.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>'; // 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 '<tr>'; print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>'; - if($socid>1) + if($socid>0) { print '<td colspan="2">'; print $soc->getNomUrl(1); @@ -1935,7 +1935,7 @@ if ($action == 'create') print '</td></tr>'."\n"; } - if ($socid>1) + if ($socid>0) { // Replacement print '<tr height="18"><td valign="middle">'; @@ -1989,7 +1989,7 @@ if ($action == 'create') print '</table>'; print '</td></tr>'; - if($socid>1) + if($socid>0) { // Discounts for third party print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">'; @@ -2021,7 +2021,7 @@ if ($action == 'create') print '</td></tr>'; // Project - if (! empty($conf->projet->enabled) && $socid>1) + if (! empty($conf->projet->enabled) && $socid>0) { $langs->load('projects'); print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; -- GitLab