diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index aefe642970a..6e5ed9de613 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -3206,13 +3206,13 @@ if ($action == 'create')
$thirdparty = $soc;
$discount_type = 0;
- $backtopage = urlencode($_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid'));
+ $backtopage = urlencode($_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin', 'alpha').'&originid='.GETPOST('originid', 'int'));
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
print '';
}
- $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
+ $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
// Date invoice
print '
| '.$langs->trans('DateInvoice').' | ';
@@ -3223,14 +3223,14 @@ if ($action == 'create')
if (!empty($conf->global->INVOICE_POINTOFTAX_DATE))
{
print ' |
| '.$langs->trans('DatePointOfTax').' | ';
- $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
+ $date_pointoftax = dol_mktime(12, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int'));
print $form->selectDate($date_pointoftax ? $date_pointoftax : -1, 'date_pointoftax', '', '', '', "add", 1, 1);
print ' |
';
}
// Payment term
print '| '.$langs->trans('PaymentConditionsShort').' | ';
- $form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
+ $form->select_conditions_paiements(GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $cond_reglement_id, 'cond_reglement_id');
print ' |
';
if (!empty($conf->global->INVOICE_USE_SITUATION))