diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index bccac8d8354..7c42593f70b 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1915,14 +1915,6 @@ if ($action == 'create')
print $desc;
print ''."\n";
- // Deposit
- print '
| ';
- print '';
- print ' | ';
- $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
- print $desc;
- print ' |
'."\n";
-
// Proforma
if (! empty($conf->global->FACTURE_USE_PROFORMAT))
{
@@ -1934,56 +1926,67 @@ if ($action == 'create')
print ''."\n";
}
- if ($socid>0)
- {
- // Replacement
- print '| ';
- print '';
+ if (empty($origin))
+ {
+ // Deposit
+ print ' |
| ';
+ print '';
print ' | ';
- $text=$langs->trans("InvoiceReplacementAsk").' ';
- $text.='';
- $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1);
+ $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),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 ($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";
+ }
}
print '';
print '';