Merge pull request #19347 from frederic34/patch-1

error display
This commit is contained in:
Laurent Destailleur 2021-11-11 14:39:06 +01:00 committed by GitHub
commit 8997368e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -128,7 +128,7 @@ if (GETPOST('cancel', 'alpha')) {
if ($action == "reopen") {
$result = $object->setStatut($object::STATUS_DRAFT, null, '', 'CASHFENCE_REOPEN');
if ($result < 0) {
dol_print_error($db, $object->error, $object->error);
setEventMessages($object->error, $object->error, 'errors');
}
$action = 'view';
@ -312,7 +312,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
} elseif ($syear && $smonth && $sday) {
$sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'";
} else {
dol_print_error('', 'Year not defined');
setEventMessages($langs->trans('YearNotDefined'), null, 'errors');
}
$resql = $db->query($sql);
@ -356,7 +356,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
} elseif ($syear && $smonth && $sday) {
$sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
} else {
dol_print_error('', 'Year not defined');
setEventMessages($langs->trans('YearNotDefined'), null, 'errors');
}
$resql = $db->query($sql);

View File

@ -133,3 +133,4 @@ SplitSale=Split sale
PrintWithoutDetailsButton=Add "Print without details" button
PrintWithoutDetailsLabelDefault=Line label by default on printing without details
PrintWithoutDetails=Print without details
YearNotDefined=Year is not defined