Fix Quick hack to solve legal problem in some countries.

This commit is contained in:
Laurent Destailleur 2016-08-31 18:35:15 +02:00
parent 45fceaeea5
commit 56d6510472

View File

@ -2190,6 +2190,8 @@ if ($action == 'create')
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid)))) if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
{ {
// Deposit // Deposit
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> '; $tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript"> print '<script type="text/javascript" language="javascript">
@ -2216,6 +2218,7 @@ if ($action == 'create')
print '</div></div>'; print '</div></div>';
} }
}
if ($socid > 0) if ($socid > 0)
{ {
@ -2244,7 +2247,10 @@ if ($action == 'create')
} }
// Replacement // Replacement
print '<!-- replacement line --><div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
{
print '<!-- replacement line -->';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : ''); $tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled'; if (! $options) $tmp.=' disabled';
$tmp.='> '; $tmp.='> ';
@ -2271,6 +2277,7 @@ if ($action == 'create')
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
} }
}
else else
{ {
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
@ -2287,6 +2294,8 @@ if ($action == 'create')
if ($socid > 0) if ($socid > 0)
{ {
// Credit note // Credit note
if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : ''); $tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled'; if (! $optionsav) $tmp.=' disabled';
@ -2329,6 +2338,7 @@ if ($action == 'create')
print '</div></div>'; print '</div></div>';
} }
}
else else
{ {
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';