[ task #652 ] Reduce clicks into creaton of orders, invoices, etc.

This commit is contained in:
simnandez 2013-01-13 10:57:39 +01:00
parent b1369a2f01
commit ffbb611eb4

View File

@ -1734,7 +1734,7 @@ if ($action == 'create')
print_fiche_titre($langs->trans('NewBill')); print_fiche_titre($langs->trans('NewBill'));
$soc = new Societe($db); $soc = new Societe($db);
if ($socid>1) $res=$soc->fetch($socid); if ($socid>0) $res=$soc->fetch($socid);
if (! empty($origin) && ! empty($originid)) 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>'; print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
// Factures predefinies // 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 = 'SELECT r.rowid, r.titre, r.total_ttc';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_rec as r'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_rec as r';
@ -1849,7 +1849,7 @@ if ($action == 'create')
// Tiers // Tiers
print '<tr>'; print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>'; print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>';
if($socid>1) if($socid>0)
{ {
print '<td colspan="2">'; print '<td colspan="2">';
print $soc->getNomUrl(1); print $soc->getNomUrl(1);
@ -1935,7 +1935,7 @@ if ($action == 'create')
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
if ($socid>1) if ($socid>0)
{ {
// Replacement // Replacement
print '<tr height="18"><td valign="middle">'; print '<tr height="18"><td valign="middle">';
@ -1989,7 +1989,7 @@ if ($action == 'create')
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';
if($socid>1) if($socid>0)
{ {
// Discounts for third party // Discounts for third party
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">'; print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">';
@ -2021,7 +2021,7 @@ if ($action == 'create')
print '</td></tr>'; print '</td></tr>';
// Project // Project
if (! empty($conf->projet->enabled) && $socid>1) if (! empty($conf->projet->enabled) && $socid>0)
{ {
$langs->load('projects'); $langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';