diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index ac89cfef0b6..f67bed0ec63 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -223,14 +223,16 @@ if ($action == 'create')
print '
| '.$langs->trans("RemainderToPay").' | '.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).' |
';*/
print '| '.$langs->trans("Date").' | ';
+ $empty=1;
+ $datepayment='';
if (GETPOSTISSET('remonth')) {
$datepayment = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
+ $empty=0;
} elseif (!empty($conf->global->MAIN_AUTOFILL_DATE)) {
$datepayment = dol_mktime(12, 0, 0, dol_print_date(dol_now(), '%m'), dol_print_date(dol_now(), '%d'), dol_print_date(dol_now(), '%Y'));
- } else {
- $datepayment = '' ;
+ $empty=0;
}
- print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
+ print $form->selectDate($datepayment, '', '', '', $empty, "add_payment", 1, 1);
print " | ";
print '
';