From 223ef4b268a605cc16ce820133861e205f58ce9b Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Fri, 21 Jan 2011 18:26:20 +0000 Subject: [PATCH] Fix: bad sql request --- htdocs/adherents/fiche.php | 2 +- htdocs/compta/deplacement/index.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 313408e7cde..00c861c22c1 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -471,7 +471,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer) $crowid=$adh->cotisation($datecotisation, $cotisation); // insertion dans la gestion banquaire si configure pour - if ($global->conf->ADHERENT_BANK_USE) + if ($conf->global->ADHERENT_BANK_USE) { $dateop=time(); $amount=$cotisation; diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 0c3aa464835..b963109e603 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> + * Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr> * * 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 @@ -20,13 +20,13 @@ */ /** - \file htdocs/compta/deplacement/index.php - \brief Page liste des deplacements - \version $Id$ -*/ + * \file htdocs/compta/deplacement/index.php + * \brief Page liste des deplacements + * \version $Id$ + */ require("../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php"); $langs->load("companies"); $langs->load("users"); @@ -56,9 +56,9 @@ $pageprev = $page - 1; $pagenext = $page + 1; -$sql = "SELECT s.nom, s.rowid as socid,"; // Ou -$sql.= " d.rowid, d.type, ".$db->pdate("d.dated")." as dd, d.km, "; // Comment -$sql.= " u.name, u.firstname"; // Qui +$sql = "SELECT s.nom, s.rowid as socid,"; // Ou +$sql.= " d.rowid, d.type, d.dated as dd, d.km, "; // Comment +$sql.= " u.name, u.firstname"; // Qui $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."deplacement as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid"; @@ -100,7 +100,7 @@ if ($resql) print "<tr $bc[$var]>"; print '<td><a href="fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$objp->rowid.'</a></td>'; print '<td>'.$langs->trans($objp->type).'</td>'; - print '<td>'.dol_print_date($objp->dd,'day').'</td>'; + print '<td>'.dol_print_date($db->jdate($objp->dd),'day').'</td>'; if ($objp->socid) print '<td>'.$soc->getNomUrl(1).'</td>'; else print '<td> </td>'; print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.'</a></td>'; -- GitLab