From fff3a492d5847b3eb6c27a6278f26b5902e31359 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Dec 2022 00:27:00 +0100 Subject: [PATCH] Fix date --- htdocs/salaries/card.php | 11 +++++++---- htdocs/salaries/paiement_salary.php | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 974407ff42d..0c4f3e57ff5 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -957,9 +957,12 @@ if ($id > 0) { while ($i < $num) { $objp = $db->fetch_object($resql); - print ''; + print ''; + // Date + print ''; print ''.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.''; - print ''.dol_print_date($db->jdate($objp->dp), 'day')."\n"; + // Date + print ''.dol_print_date($db->jdate($objp->dp), 'dayhour', 'tzuserrel')."\n"; $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type; print "".$labeltype.' '.$objp->num_payment."\n"; if (isModEnabled("banque")) { @@ -993,8 +996,8 @@ if ($id > 0) { print ''; } - print ''.$langs->trans("AlreadyPaid")." :".price($totalpaid)."\n"; - print ''.$langs->trans("AmountExpected")." :".price($object->amount)."\n"; + print ''.$langs->trans("AlreadyPaid").' :'.price($totalpaid)."\n"; + print ''.$langs->trans("AmountExpected").' :'.price($object->amount)."\n"; $resteapayer = $object->amount - $totalpaid; $cssforamountpaymentcomplete = 'amountpaymentcomplete'; diff --git a/htdocs/salaries/paiement_salary.php b/htdocs/salaries/paiement_salary.php index 9f90e4c9ac9..0c2c757e2dc 100644 --- a/htdocs/salaries/paiement_salary.php +++ b/htdocs/salaries/paiement_salary.php @@ -66,7 +66,7 @@ if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == ' exit; } - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepaye = dol_mktime(GETPOST("rehour", 'int'), GETPOST("remin", 'int'), GETPOST("resec", 'int'), GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'), 'tzuserrel'); if (!(GETPOST("paiementtype", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); @@ -210,9 +210,9 @@ if ($action == 'create') { print ''.$langs->trans("RemainderToPay").''.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'';*/ print ''.$langs->trans("Date").''; - $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepaye = dol_mktime(GETPOST("rehour", 'int'), GETPOST("remin", 'int'), GETPOST("resec", 'int'), 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 $form->selectDate($datepayment, '', 1, 1, 0, "add_payment", 1, 1); print ""; print '';