Fix not wokring default values for date (re...)
This commit is contained in:
parent
8b4dcbaa64
commit
58e32aa2ff
@ -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"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user