diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index 8f7d869479d..0ebba6c18a4 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -180,10 +180,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
}
}
// Other checks
- if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && GETPOSTISSET("type") && in_array($_POST["type"], array('system', 'systemauto'))) {
- $ok = 0;
- setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors');
- }
if (GETPOSTISSET("pcg_version")) {
if (GETPOST("pcg_version") == '0') {
$ok = 0;
diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php
index 89c8a2b3b71..deae39aef54 100644
--- a/htdocs/accountancy/admin/categories_list.php
+++ b/htdocs/accountancy/admin/categories_list.php
@@ -185,7 +185,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
}
}
if (GETPOSTISSET("code")) {
- if ($_POST["code"] == '0') {
+ if (GETPOST("code") == '0') {
$ok = 0;
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
}
diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php
index 410807144f5..16463ec027b 100644
--- a/htdocs/accountancy/admin/fiscalyear_card.php
+++ b/htdocs/accountancy/admin/fiscalyear_card.php
@@ -121,8 +121,8 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
if (!GETPOST('cancel', 'alpha')) {
$result = $object->fetch($id);
- $object->date_start = empty($_POST["fiscalyear"]) ? '' : $date_start;
- $object->date_end = empty($_POST["fiscalyearend"]) ? '' : $date_end;
+ $object->date_start = GETPOST("fiscalyear") ? $date_start : '';
+ $object->date_end = GETPOST("fiscalyearend") ? $date_end : '';
$object->label = GETPOST('label', 'alpha');
$object->statut = GETPOST('statut', 'int');
diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index 970609fce65..3c6e72cc783 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -253,23 +253,23 @@ abstract class ActionsAdherentCardCommon
// phpcs:enable
global $langs, $mysoc;
- $this->object->old_name = $_POST["old_name"];
- $this->object->old_firstname = $_POST["old_firstname"];
+ $this->object->old_name = GETPOST("old_name");
+ $this->object->old_firstname = GETPOST("old_firstname");
- $this->object->fk_soc = $_POST["fk_soc"];
- $this->object->lastname = $_POST["lastname"];
- $this->object->firstname = $_POST["firstname"];
- $this->object->civility_id = $_POST["civility_id"];
- $this->object->address = $_POST["address"];
- $this->object->zip = $_POST["zipcode"];
- $this->object->town = $_POST["town"];
- $this->object->country_id = $_POST["country_id"] ? $_POST["country_id"] : $mysoc->country_id;
- $this->object->state_id = $_POST["state_id"];
- $this->object->phone_perso = $_POST["phone_perso"];
- $this->object->phone_mobile = $_POST["phone_mobile"];
- $this->object->email = $_POST["email"];
- $this->object->note = $_POST["note"];
- $this->object->canvas = $_POST["canvas"];
+ $this->object->fk_soc = GETPOST("fk_soc");
+ $this->object->lastname = GETPOST("lastname");
+ $this->object->firstname = GETPOST("firstname");
+ $this->object->civility_id = GETPOST("civility_id");
+ $this->object->address = GETPOST("address");
+ $this->object->zip = GETPOST("zipcode");
+ $this->object->town = GETPOST("town");
+ $this->object->country_id = GETPOST("country_id", 'int') ? GETPOST("country_id", 'int') : $mysoc->country_id;
+ $this->object->state_id = GETPOST("state_id", 'int');
+ $this->object->phone_perso = GETPOST("phone_perso");
+ $this->object->phone_mobile = GETPOST("phone_mobile");
+ $this->object->email = GETPOST("email", 'alphawithlgt');
+ $this->object->note = GETPOST("note", 'restricthtml');
+ $this->object->canvas = GETPOST("canvas");
// We set country_id, and country_code label of the chosen country
if ($this->object->country_id) {
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index e36e96f0833..d857a789df1 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1072,9 +1072,9 @@ abstract class CommonObject
// Insert into database
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
$sql .= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
- $sql .= " VALUES (".$this->id.", ".$fk_socpeople." , ";
+ $sql .= " VALUES (".$this->id.", ".((int) $fk_socpeople)." , ";
$sql .= "'".$this->db->idate($datecreate)."'";
- $sql .= ", 4, ".$id_type_contact;
+ $sql .= ", 4, ".((int) $id_type_contact);
$sql .= ")";
$resql = $this->db->query($sql);
diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php
index 061332c2e8b..4afcf295d40 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -144,13 +144,13 @@ class DiscountAbsolute
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fsup ON sr.fk_invoice_supplier_source = fsup.rowid";
$sql .= " WHERE sr.entity IN (".getEntity('invoice').")";
if ($rowid) {
- $sql .= " AND sr.rowid=".$rowid;
+ $sql .= " AND sr.rowid=".((int) $rowid);
}
if ($fk_facture_source) {
- $sql .= " AND sr.fk_facture_source=".$fk_facture_source;
+ $sql .= " AND sr.fk_facture_source = ".((int) $fk_facture_source);
}
if ($fk_invoice_supplier_source) {
- $sql .= " AND sr.fk_invoice_supplier_source=".$fk_invoice_supplier_source;
+ $sql .= " AND sr.fk_invoice_supplier_source = ".((int) $fk_invoice_supplier_source);
}
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6ba05b04d9c..5a1745a9822 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -355,6 +355,7 @@ function GETPOSTISSET($paramname)
* 'int'=check it's numeric (integer or float)
* 'intcomma'=check it's integer+comma ('1,2,3,4...')
* 'alpha'=Same than alphanohtml since v13
+ * 'alphawithlgt'=alpha with lgt
* 'alphanohtml'=check there is no html content and no " and no ../
* 'aZ'=check it's a-z only
* 'aZ09'=check it's simple alpha string (recommended for keys)
diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php
index 8b8a57f6628..b3b88224df6 100644
--- a/htdocs/core/modules/mailings/thirdparties.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties.modules.php
@@ -83,13 +83,13 @@ class mailing_thirdparties extends MailingTargets
if (GETPOSTISSET("filter_client") && GETPOST("filter_client") <> '-1') {
$addFilter .= " AND s.client=".((int) GETPOST("filter_client", 'int'));
$addDescription = $langs->trans('ProspectCustomer')."=";
- if ($_POST["filter_client"] == 0) {
+ if (GETPOST("filter_client") == 0) {
$addDescription .= $langs->trans('NorProspectNorCustomer');
- } elseif ($_POST["filter_client"] == 1) {
+ } elseif (GETPOST("filter_client") == 1) {
$addDescription .= $langs->trans('Customer');
- } elseif ($_POST["filter_client"] == 2) {
+ } elseif (GETPOST("filter_client") == 2) {
$addDescription .= $langs->trans('Prospect');
- } elseif ($_POST["filter_client"] == 3) {
+ } elseif (GETPOST("filter_client") == 3) {
$addDescription .= $langs->trans('ProspectCustomer');
} else {
$addDescription .= "Unknown status ".GETPOST("filter_client");
diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php
index 3940f0c38e5..9f77eaca415 100644
--- a/htdocs/core/tpl/extrafields_view.tpl.php
+++ b/htdocs/core/tpl/extrafields_view.tpl.php
@@ -81,7 +81,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra])) {
$perms = dol_eval($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra], 1);
}
- //print $tmpkeyextra.'-'.$enabled.'-'.$perms.'-'.$tmplabelextra.$_POST["options_" . $tmpkeyextra].'
'."\n";
+ //print $tmpkeyextra.'-'.$enabled.'-'.$perms.'
'."\n";
if (empty($enabled)) {
continue; // 0 = Never visible field
diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php
index ca33d6ffc23..d571940cc9b 100644
--- a/htdocs/don/payment/payment.php
+++ b/htdocs/don/payment/payment.php
@@ -29,9 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("bills");
-$chid = GETPOST("rowid");
+$chid = GETPOST("rowid", 'int');
$action = GETPOST('action', 'aZ09');
$amounts = array();
+$cancel = GETPOST('cancel');
// Security check
$socid = 0;
@@ -49,15 +50,15 @@ $object = new Don($db);
if ($action == 'add_payment') {
$error = 0;
- if ($_POST["cancel"]) {
+ if ($cancel) {
$loc = DOL_URL_ROOT.'/don/card.php?rowid='.$chid;
header("Location: ".$loc);
exit;
}
- $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
+ $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
- if (!$_POST["paymenttype"] > 0) {
+ if (!(GETPOST("paymenttype") > 0)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors');
$error++;
}
@@ -65,7 +66,7 @@ if ($action == 'add_payment') {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors');
$error++;
}
- if (!empty($conf->banque->enabled) && !$_POST["accountid"] > 0) {
+ if (!empty($conf->banque->enabled) && !(GETPOST("accountid", 'int') > 0)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors');
$error++;
}
@@ -183,8 +184,8 @@ if ($action == 'create') {
print '
| '.$langs->trans("Date").' | '; - $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaid) : 0; + $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); + $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOST("remonth") ? $datepaid : -1) : 0; print $form->selectDate($datepayment, '', 0, 0, 0, "add_payment", 1, 1, 0, '', '', $object->date, '', 1, $langs->trans("DonationDate")); print " | "; print ''; - print $form->load_tva('vatrate', (isset($_POST["vatrate"]) ? $_POST["vatrate"] : $line->vatrate), $mysoc, '', 0, 0, '', false, 1); + print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $line->vatrate), $mysoc, '', 0, 0, '', false, 1); print ' | '; // Unit price diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 926559769b4..d50f6336669 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -36,6 +36,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $amounts = array(); $accountid = GETPOST('accountid', 'int'); +$cancel = GETPOST('cancel'); // Security check $socid = 0; @@ -51,7 +52,7 @@ if ($user->socid > 0) { if ($action == 'add_payment') { $error = 0; - if ($_POST["cancel"]) { + if ($cancel) { $loc = DOL_URL_ROOT.'/expensereport/card.php?id='.$id; header("Location: ".$loc); exit; @@ -64,9 +65,9 @@ if ($action == 'add_payment') { setEventMessages($expensereport->error, $expensereport->errors, 'errors'); } - $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - if (!($_POST["fk_typepayment"] > 0)) { + if (!(GETPOST("fk_typepayment", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index ebc884eb033..88c5a1cefc0 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -875,9 +875,9 @@ if ($action == 'create') { print '
| '.$langs->trans("Project").' | ';
/* Fix: If a project must be linked to any companies (suppliers or not), project must be not be set as limited to customer but must be not linked to any particular thirdparty
if ($societe->fournisseur==1)
- $numprojet=select_projects(-1,$_POST["projectid"],'projectid');
+ $numprojet=select_projects(-1, GETPOST("projectid", 'int'), 'projectid');
else
- $numprojet=select_projects($societe->id,$_POST["projectid"],'projectid');
+ $numprojet=select_projects($societe->id, GETPOST("projectid", 'int'), 'projectid');
*/
$numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid');
if ($numprojet == 0) {
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index fe854c72d48..6def24cf64b 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1883,7 +1883,7 @@ if ($action == 'create') {
// Confirmation de l'envoi de la commande
if ($action == 'commande') {
$date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
- $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"), $langs->trans("ConfirmMakeOrder", dol_print_date($date_com, 'day')), "confirm_commande", '', 0, 2);
+ $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".GETPOST("methodecommande")."&comment=".urlencode(GETPOST("comment")), $langs->trans("MakeOrder"), $langs->trans("ConfirmMakeOrder", dol_print_date($date_com, 'day')), "confirm_commande", '', 0, 2);
}
// Confirmation to delete line
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 0d48c7d30dd..0402fa7a99b 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -1046,7 +1046,7 @@ if ($id > 0 || !empty($ref)) {
if (empty($conf->reception->enabled)) {
print $langs->trans("Comment").' : ';
print 'trans("DispatchSupplierOrder", $object->ref);
+ print GETPOSTISSET("comment") ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
// print ' / '.$object->ref_supplier; // Not yet available
print '" class="flat"> '; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index ab673e45447..5094f178cea 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -58,8 +58,8 @@ if ($result) { } if ($action == 'add' || GETPOST('modify', 'alpha')) { - $ftp_name = "FTP_NAME_".$entry; // $_POST["numero_entry"]; - $ftp_server = "FTP_SERVER_".$entry; //$_POST["numero_entry"]; + $ftp_name = "FTP_NAME_".$entry; + $ftp_server = "FTP_SERVER_".$entry; $error = 0; @@ -203,7 +203,7 @@ if (!function_exists('ftp_connect')) { print ' | |
| '.$langs->trans("FTPPassiveMode").' | '; $defaultpassive = GETPOST("FTP_PASSIVE_".($lastftpentry + 1)); - if (!isset($_POST["FTP_PASSIVE_".($lastftpentry + 1)])) { + if (!GETPOSTISSET("FTP_PASSIVE_".($lastftpentry + 1))) { $defaultpassive = empty($conf->global->FTP_SUGGEST_PASSIVE_BYDEFAULT) ? 0 : 1; } print ''.$form->selectyesno('FTP_PASSIVE_'.($lastftpentry + 1), $defaultpassive, 2).' | '; diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index a46ebfa28f3..96874db6504 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -80,9 +80,9 @@ if ($action == 'confirm_delete' && $confirm == "yes") { if (empty($error)) { $object->address = GETPOST('address', 'alpha'); - $object->zip = GETPOST('zipcode', 'alpha'); - $object->town = GETPOST('town', 'alpha'); - $object->country_id = $_POST["country_id"]; + $object->zip = GETPOST('zipcode', 'alpha'); + $object->town = GETPOST('town', 'alpha'); + $object->country_id = GETPOST("country_id", 'int'); $object->status = GETPOST('status', 'int'); $object->fk_user_author = $user->id; $object->datec = dol_now(); diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index e841a352b40..86e970f8194 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -231,7 +231,6 @@ if (!$error) { $databasefortest = 'master'; } } - //print $_POST["db_type"].",".$_POST["db_host"].",$userroot,$passroot,$databasefortest,".$_POST["db_port"]; $db = getDoliDBInstance($db_type, $db_host, $userroot, $passroot, $databasefortest, $db_port); diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 7bba308ba9c..41ad839cb94 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -41,7 +41,7 @@ $action = GETPOST('action', 'aZ09'); if ($action == 'setvalue' && $user->admin) { $db->begin(); - //$result=dolibarr_set_const($db, "PAYBOX_IBS_DEVISE",$_POST["PAYBOX_IBS_DEVISE"],'chaine',0,'',$conf->entity); + //$result=dolibarr_set_const($db, "PAYBOX_IBS_DEVISE", GETPOST("PAYBOX_IBS_DEVISE"),'chaine',0,'',$conf->entity); $result = dolibarr_set_const($db, "PAYBOX_CGI_URL_V1", GETPOST('PAYBOX_CGI_URL_V1', 'alpha'), 'chaine', 0, '', $conf->entity); if (!$result > 0) { $error++; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index d65ea3499fc..916f23eb056 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -224,12 +224,10 @@ if (empty($reshook)) { if (empty($ref)) { $error++; - //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); } - if (empty($_POST["title"])) { + if (!GETPOST("title")) { $error++; - //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ProjectLabel")), null, 'errors'); } @@ -512,7 +510,7 @@ if ($action == 'create' && $user->rights->projet->creer) { } // Ref - $suggestedref = ($_POST["ref"] ? $_POST["ref"] : $defaultref); + $suggestedref = (GETPOST("ref") ? GETPOST("ref") : $defaultref); print '|
| '.$langs->trans("Ref").' | '; print ' '.$form->textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); print ' | '; - //$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); $newdate = ''; print $form->selectDate($newdate, 'time', ($conf->browser->layout == 'phone' ? 2 : 1), 1, 2, "timespent_date", 1, 0); print ' | '; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 90dab0379ff..5f5446ae3f1 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -203,7 +203,6 @@ if ($testmodifier) { //var_dump($_POST);exit; $nouveauchoix = ''; for ($i = 0; $i < $nbcolonnes; $i++) { - //var_dump($_POST["choix$i"]); if (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '1') { $nouveauchoix .= "1"; } elseif (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '2') { @@ -217,7 +216,7 @@ if ($testmodifier) { accessforbidden('', 0, 0, 1); } - $idtomodify = $_POST["idtomodify".$modifier]; + $idtomodify = GETPOST("idtomodify".$modifier); $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql .= " WHERE id_users = '".$db->escape($idtomodify)."'"; diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index f25843f69e4..048df9c41b3 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -223,11 +223,11 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('Nature'))."
| '.$langs->trans("RemainderToPay").' | '.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).' | |
| '.$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) : ''; + $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOST("remonth") ? $datepaye : -1) : ''; print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); print " | "; print '|
| '.$langs->trans("PaymentMode").' | '; - $form->select_types_paiements(isset($_POST["paiementtype"]) ? $_POST["paiementtype"] : $salary->type_payment, "paiementtype"); + $form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype") : $salary->type_payment, "paiementtype"); print " | \n"; print '|
| '.$langs->trans('AccountToDebit').' | '; print ''; - $form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $salary->accountid, "accountid", 0, '', 1); // Show opend bank account list + $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $salary->accountid, "accountid", 0, '', 1); // Show opend bank account list print ' | |