diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 78fc67cd475..b3c02ceacc0 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -305,7 +305,9 @@ if ($resql) print ''; // Date - print ''.dol_print_date($db->jdate($objp->dp),'dayhour').''; + $dateformatforpayment = 'day'; + if (! empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment='dayhour'; + print ''.dol_print_date($db->jdate($objp->dp), $dateformatforpayment).''; // Thirdparty print ''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index fd313ba297c..4a1b004fed7 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -817,8 +817,8 @@ if (empty($action)) $i = 0; $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($day) $param.=($day?"&day=".urlencode($day):""); if ($month) $param.=($month?"&month=".urlencode($month):""); if ($year) $param.=($year?"&year=".urlencode($year):""); @@ -826,7 +826,7 @@ if (empty($action)) if ($search_company) $param.=($search_company?"&search_company=".urlencode($search_company):""); if ($search_amount != '') $param.=($search_amount?"&search_amount=".urlencode($search_amount):""); if ($search_payment_num) $param.=($search_payment_num?"&search_payment_num=".urlencode($search_payment_num):""); - if ($optioncss != '') $param.='&optioncss='.$optioncss; + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -915,7 +915,9 @@ if (empty($action)) print ''.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.''; // Date - print ''.dol_print_date($db->jdate($objp->dp),'day')."\n"; + $dateformatforpayment = 'day'; + if (! empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment='dayhour'; + print ''.dol_print_date($db->jdate($objp->dp), $dateformatforpayment)."\n"; // Thirdparty print ''; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 9cc5fb27b84..bd957503b94 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -124,7 +124,7 @@ if ($action == 'setnum_paiement' && ! empty($_POST['num_paiement'])) if ($action == 'setdatep' && ! empty($_POST['datepday'])) { $object->fetch($id); - $datepaye = dol_mktime(12, 0, 0, $_POST['datepmonth'], $_POST['datepday'], $_POST['datepyear']); + $datepaye = dol_mktime(GETPOST('datephour','int'), GETPOST('datepmin','int'), GETPOST('datepsec','int'), GETPOST('datepmonth','int'), GETPOST('datepday','int'), GETPOST('datepyear','int')); $res = $object->update_date($datepaye); if ($res === 0) { @@ -193,7 +193,7 @@ if ($result > 0) // Date payment print ''.$form->editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; - print $form->editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); + print $form->editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datehourpicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print ''; // Payment mode