Fix: When creating invoice from other object, type must be "standard".

This commit is contained in:
Laurent Destailleur 2013-02-17 16:37:28 +01:00
parent 9f8ffe242a
commit e56e182fe9

View File

@ -1915,14 +1915,6 @@ if ($action == 'create')
print $desc; print $desc;
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Deposit
print '<tr height="18"><td width="16px" valign="middle">';
print '<input type="radio" name="type" value="3"'.(GETPOST('type')==3?' checked="checked"':'').'>';
print '</td><td valign="middle">';
$desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
print $desc;
print '</td></tr>'."\n";
// Proforma // Proforma
if (! empty($conf->global->FACTURE_USE_PROFORMAT)) if (! empty($conf->global->FACTURE_USE_PROFORMAT))
{ {
@ -1934,6 +1926,16 @@ if ($action == 'create')
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
if (empty($origin))
{
// Deposit
print '<tr height="18"><td width="16px" valign="middle">';
print '<input type="radio" name="type" value="3"'.(GETPOST('type')==3?' checked="checked"':'').'>';
print '</td><td valign="middle">';
$desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
print $desc;
print '</td></tr>'."\n";
if ($socid > 0) if ($socid > 0)
{ {
// Replacement // Replacement
@ -1985,6 +1987,7 @@ if ($action == 'create')
print $desc; print $desc;
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
}
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';