diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 715a0851c65..7ed5baafcab 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -248,7 +248,7 @@ if ($action == 'create')
print '
';
print '| '.$langs->trans("Comments").' | ';
- print ' | ';
+ print ' | ';
print '
';
print '';
@@ -296,6 +296,7 @@ if ($action == 'create')
print ''.price($objp->amount - $sumpaid)." | ";
print '';
+
if ($sumpaid < $objp->amount)
{
$namef = "amount_".$objp->id;
@@ -304,7 +305,7 @@ if ($action == 'create')
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'");
$remaintopay = $objp->amount - $sumpaid;
print '';
- print '';
+ print '';
}
else
{
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index d2609fd4ff5..1b5bf72727f 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -45,7 +45,7 @@ $langs->loadLangs(array('compta', 'bills', 'banks'));
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm');
-$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
+$fk_project = (GETPOST('fk_project') ? GETPOST('fk_project', 'int') : 0);
$dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear'));
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
@@ -91,7 +91,7 @@ if ($action == 'reopen' && $user->rights->tax->charges->creer) {
if ($action == 'classin' && $user->rights->tax->charges->creer)
{
$object->fetch($id);
- $object->setProject(GETPOST('projectid'));
+ $object->setProject(GETPOST('fk_project'));
}
if ($action == 'setlib' && $user->rights->tax->charges->creer)
@@ -375,21 +375,21 @@ if ($action == 'create')
print ' | | '.$langs->trans("Project").' | ';
- $numproject = $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
+ $numproject = $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, 1);
print ' |
';
}
// Payment Mode
print '| '.$langs->trans('PaymentMode').' | ';
- $form->select_types_paiements($mode_reglement_id, 'mode_reglement_id');
+ $form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id');
print ' |
';
// Bank Account
if (!empty($conf->banque->enabled))
{
print '| '.$langs->trans('BankAccount').' | ';
- $form->select_comptes($fk_account, 'fk_account', 0, '', 1);
+ $form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 1);
print ' |
';
}
@@ -482,7 +482,7 @@ if ($id > 0)
$morehtmlref .= '';
} else {