From 2c829deb5c05729c83b7276c0be8e68212782123 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Mar 2006 23:34:55 +0000 Subject: [PATCH] Fix: Gestion calendrier popup sur date operation --- htdocs/compta/bank/ligne.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index c34c01c82f5..559d3f3e876 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier DUTOIT - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * * This program is free software; you can redistribute it and/or modify @@ -98,17 +98,15 @@ if ($_POST["action"] == "update") $db->begin(); - $amount = str_replace(' ','',$_POST['amount']); - $amount = str_replace(',','.',$amount); - - $dateop = $_POST["doyear"].'-'.$_POST["domonth"].'-'.$_POST["doday"]; - $dateval= $_POST["dvyear"].'-'.$_POST["dvmonth"].'-'.$_POST["dvday"]; + $amount = price2num($_POST['amount']); + $dateop = $_POST["dateoyear"].'-'.$_POST["dateomonth"].'-'.$_POST["dateoday"]; + $dateval= $_POST["datevyear"].'-'.$_POST["datevmonth"].'-'.$_POST["datevday"]; $sql = "UPDATE ".MAIN_DB_PREFIX."bank"; $sql.= " SET label='".$_POST["label"]."',"; if (isset($_POST['amount'])) $sql.=" amount='$amount',"; $sql.= " dateo = '".$dateop."', datev = '".$dateval."',"; $sql.= " fk_account = ".$_POST['accountid']; - $sql.= " WHERE rowid = $rowid;"; + $sql.= " WHERE rowid = ".$rowid; $result = $db->query($sql); if ($result) @@ -276,11 +274,11 @@ if ($result) print ''; // Date ope - print ''.$langs->trans("Date").''; + print ''.$langs->trans("DateOperation").''; if (! $objp->rappro) { print ''; - $html->select_date($objp->do,'do','','','','update'); + $html->select_date($objp->do,'dateo','','','','update'); print ''; } else @@ -295,7 +293,7 @@ if ($result) if (! $objp->rappro) { print ''; - $html->select_date($objp->dv,'dv','','','','update'); + $html->select_date($objp->dv,'datev','','','','update'); print '   '; print ''; print img_edit_remove() . " ";