diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7c42593f70b..49604013c19 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1935,63 +1935,66 @@ if ($action == 'create') $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); print $desc; print ''."\n"; + } - if ($socid > 0) - { - // Replacement - print ''; - print ''; - print ''; - $text=$langs->trans("InvoiceReplacementAsk").' '; - $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); - print $desc; - print ''."\n"; + if ($socid > 0) + { + // Replacement + print ''; + print ''; + print ''; + $text=$langs->trans("InvoiceReplacementAsk").' '; + $text.=''; + $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); + print $desc; + print ''."\n"; + } - // Credit note - print ''; - print ''; - print ''; - $text=$langs->transnoentities("InvoiceAvoirAsk").' '; - // $text.=''; - $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); - print $desc; - print ''."\n"; - } + if (empty($origin) && $socid > 0) + { + // Credit note + print ''; + print ''; + print ''; + $text=$langs->transnoentities("InvoiceAvoirAsk").' '; + // $text.=''; + $text.=''; + $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); + print $desc; + print ''."\n"; } print ''; print ''; - if($socid>0) + if ($socid > 0) { // Discounts for third party print ''.$langs->trans('Discounts').'';