diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 247f66b5acf..45ad2114368 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -247,7 +247,7 @@ if ($action == 'create')
print '
';
print '| '.$langs->trans("Comments").' | ';
- print ' | ';
+ print ' | ';
print '
';
print '';
@@ -293,6 +293,7 @@ if ($action == 'create')
print ''.price($objp->amount - $sumpaid)." | ";
print '';
+
if ($sumpaid < $objp->amount)
{
$namef = "amount_".$objp->id;
@@ -301,7 +302,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 {
print '-';
}
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index b44968e21bf..25e96c79a28 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)
@@ -352,21 +352,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, '', 2);
+ $form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 2);
print ' |
';
}
@@ -457,7 +457,7 @@ if ($id > 0)
$morehtmlref .= '';
} else {
diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php
index 18947732b16..accdfae89f6 100644
--- a/htdocs/core/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php
@@ -305,6 +305,11 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
{
$this->error = $result;
return -6;
+ } else {
+ $is_dispo = $this->verif_dispo($db, $code, $soc, $type);
+ if ($is_dispo <> 0) {
+ $result = -3;
+ }
}
}
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 364cb30633a..e986fc4c8fa 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -215,7 +215,7 @@ if (empty($reshook))
}
} else {
$db->rollback();
-
+ unset($_POST["ref"]);
$action = 'create';
}
} else {