Fix not wokring default values for date (re...)

This commit is contained in:
Tobias Sekan 2020-05-21 09:31:06 +02:00 committed by GitHub
parent cb9cbfb922
commit 2efe3d7da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1025,7 +1025,7 @@ if (empty($reshook))
// Replacement invoice // Replacement invoice
if ($_POST['type'] == Facture::TYPE_REPLACEMENT) if ($_POST['type'] == Facture::TYPE_REPLACEMENT)
{ {
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
if (empty($dateinvoice)) if (empty($dateinvoice))
{ {
$error++; $error++;
@ -1086,7 +1086,7 @@ if (empty($reshook))
$action = 'create'; $action = 'create';
} }
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
if (empty($dateinvoice)) if (empty($dateinvoice))
{ {
$error++; $error++;
@ -1269,7 +1269,7 @@ if (empty($reshook))
// Standard invoice or Deposit invoice, created from a Predefined template invoice // Standard invoice or Deposit invoice, created from a Predefined template invoice
if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec', 'int') > 0) if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec', 'int') > 0)
{ {
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
if (empty($dateinvoice)) if (empty($dateinvoice))
{ {
$error++; $error++;
@ -1320,7 +1320,7 @@ if (empty($reshook))
$action = 'create'; $action = 'create';
} }
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
if (empty($dateinvoice)) if (empty($dateinvoice))
{ {
$error++; $error++;
@ -1745,7 +1745,7 @@ if (empty($reshook))
// Situation invoices // Situation invoices
if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations']))) if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations'])))
{ {
$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'));
if (empty($datefacture)) { if (empty($datefacture)) {
$error++; $error++;
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")); $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date"));