diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 1898a270222..ea54e66747f 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -107,7 +107,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> $db->begin(); $object->fetch($id); - if ($object->valide() > 0) + if ($object->valide($user) > 0) { $db->commit(); @@ -157,7 +157,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) { @@ -191,17 +191,13 @@ $head = payment_prepare_head($object); dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), -1, 'payment'); -/* - * Confirmation de la suppression du paiement - */ +// Confirmation de la suppression du paiement if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } -/* - * Confirmation de la validation du paiement - */ +// Confirmation de la validation du paiement if ($action == 'valide') { $facid = $_GET['facid']; @@ -220,7 +216,7 @@ print '
| '.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).' | '; -print $form->editfieldval("Date",'datep',$object->date,$object,$user->rights->facture->paiement,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); +print $form->editfieldval("Date", 'datep', $object->date, $object,$user->rights->facture->paiement, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); print ' |