Fix: When creating invoice from other object, type must be standard only
This commit is contained in:
parent
d2074d1a17
commit
b434f58af3
@ -1919,32 +1919,35 @@ if ($action == 'create')
|
|||||||
$desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
|
$desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
|
||||||
print $desc;
|
print $desc;
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Replacement
|
// Replacement
|
||||||
print '<tr height="18"><td valign="middle">';
|
print '<tr height="18"><td valign="middle">';
|
||||||
print '<input type="radio" name="type" value="1"'.(GETPOST('type')==1?' checked="checked"':'');
|
print '<input type="radio" name="type" value="1"'.(GETPOST('type')==1?' checked="checked"':'');
|
||||||
if (! $options) print ' disabled="disabled"';
|
if (! $options) print ' disabled="disabled"';
|
||||||
print '>';
|
print '>';
|
||||||
print '</td><td valign="middle">';
|
print '</td><td valign="middle">';
|
||||||
$text=$langs->trans("InvoiceReplacementAsk").' ';
|
$text=$langs->trans("InvoiceReplacementAsk").' ';
|
||||||
$text.='<select class="flat" name="fac_replacement" id="fac_replacement"';
|
$text.='<select class="flat" name="fac_replacement" id="fac_replacement"';
|
||||||
if (! $options) $text.=' disabled="disabled"';
|
if (! $options) $text.=' disabled="disabled"';
|
||||||
$text.='>';
|
$text.='>';
|
||||||
if ($options)
|
if ($options)
|
||||||
{
|
{
|
||||||
$text.='<option value="-1"></option>';
|
$text.='<option value="-1"></option>';
|
||||||
$text.=$options;
|
$text.=$options;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text.='<option value="-1">'.$langs->trans("NoReplacableInvoice").'</option>';
|
$text.='<option value="-1">'.$langs->trans("NoReplacableInvoice").'</option>';
|
||||||
}
|
}
|
||||||
$text.='</select>';
|
$text.='</select>';
|
||||||
$desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1);
|
$desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1);
|
||||||
print $desc;
|
print $desc;
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Credit note
|
if (empty($origin))
|
||||||
|
{
|
||||||
|
// Credit note
|
||||||
print '<tr height="18"><td valign="middle">';
|
print '<tr height="18"><td valign="middle">';
|
||||||
print '<input type="radio" name="type" value="2"'.(GETPOST('type')==2?' checked=true':'');
|
print '<input type="radio" name="type" value="2"'.(GETPOST('type')==2?' checked=true':'');
|
||||||
if (! $optionsav) print ' disabled="disabled"';
|
if (! $optionsav) print ' disabled="disabled"';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user