From 9583fbc6ce7bb973e0023ae9092e0f0a32f2d3df Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 16 May 2003 10:48:34 +0000 Subject: [PATCH] Ajout info lors de l'insert et remise en forme du formulaire --- htdocs/compta/bank/virement.php3 | 34 +++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/bank/virement.php3 b/htdocs/compta/bank/virement.php3 index 1e3e0a8a453..a0781496b4c 100644 --- a/htdocs/compta/bank/virement.php3 +++ b/htdocs/compta/bank/virement.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,9 +18,6 @@ * $Id$ * $Source$ * - * - * $viewall - * */ require("./pre.inc.php3"); @@ -31,11 +28,10 @@ $db = new Db(); if ($action == 'add') { - $author = $GLOBALS["REMOTE_USER"]; - - $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; - $sql .= " VALUES (now(), $dateo, '$label', (0 - $amount),'$author',$account_from)"; + $dateo = $reyear."-".$remonth."-".$reday; + $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, fk_user_author,fk_account, fk_type)"; + $sql .= " VALUES (now(), '$dateo', '$label', (0 - $amount),$user->id,$account_from, 'VIR')"; $result = $db->query($sql); if (!$result) @@ -44,8 +40,8 @@ if ($action == 'add') print "

$sql"; } - $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; - $sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$account_to)"; + $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, fk_user_author,fk_account, fk_type)"; + $sql .= " VALUES (now(), '$dateo', '$label', $amount,$user->id, $account_to, 'VIR')"; $result = $db->query($sql); @@ -58,11 +54,11 @@ if ($action == 'add') print_titre("Virement"); -print "

"; +print ""; -print ""; +print ''; -print ""; +print '
'; print ""; print ""; +print "\n"; -print ""; +print "\n"; print ""; print ""; -print ""; -print ''; + +print ''; print "
DeVersDateLibelleMontant
"; print ""; +print "\n"; print ""; +print_date_select(); +print "
Format : YYYYMMDD - 200108260000.00
";