diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 9c5ceea22bf..298866a2020 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -41,6 +41,8 @@ if ($user->socid > 0)
$socid = $user->socid;
}
+$charge = new ChargeSociales($db);
+
/*
* Actions
@@ -161,7 +163,6 @@ $form = new Form($db);
// Formulaire de creation d'un paiement de charge
if ($action == 'create')
{
- $charge = new ChargeSociales($db);
$charge->fetch($chid);
$charge->accountid = $charge->fk_account ? $charge->fk_account : $charge->accountid;
$charge->paiementtype = $charge->mode_reglement_id ? $charge->mode_reglement_id : $charge->paiementtype;
@@ -223,7 +224,7 @@ if ($action == 'create')
print '
| '.$langs->trans("Date").' | ';
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0;
- print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
+ print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution"));
print " | ";
print '
';
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index f9d5a90d543..bcdfe1f5238 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -481,6 +481,8 @@ if ($id > 0)
}
$morehtmlref .= '';
+ $morehtmlright = '';
+
$linkback = '