mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
Serious enhancement of expenses module
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/compta/deplacement/class/deplacement.class.php
|
||||
* \ingroup deplacement
|
||||
* \brief File of class to manage trips
|
||||
* \version $Id$
|
||||
* \version $Id: deplacement.class.php,v 1.9 2011/06/29 17:55:34 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@@ -328,6 +328,38 @@ class Deplacement extends CommonObject
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* List of types
|
||||
*/
|
||||
function listOfTypes($active=1)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$ret=array();
|
||||
|
||||
$sql = "SELECT id, code, libelle as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees";
|
||||
$sql.= " WHERE active = ".$active;
|
||||
|
||||
dol_syslog("Deplacement::listOfTypes sql=".$sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql) ;
|
||||
if ( $result )
|
||||
{
|
||||
$num = $this->db->num_rows($result);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$ret[$obj->id]=array('code'=>$obj->code, 'label'=>(($langs->trans($obj->code)!=$obj->code)?$langs->trans($obj->code):$obj->label));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($this->db);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/compta/deplacement/fiche.php
|
||||
* \brief Page to show a trip card
|
||||
* \version $Id$
|
||||
* \version $Id: fiche.php,v 1.55 2011/06/29 17:55:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -212,15 +212,18 @@ if ($_GET["action"] == 'create')
|
||||
print $html->select_date($datec?$datec:-1,'','','','','add',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Km
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" size="10" value="'.($_POST["km"]?$_POST["km"]:'').'"></td></tr>';
|
||||
|
||||
// Company
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||
print $html->select_societes($_POST["socid"]?$_POST["socid"]:$_GET["socid"],'socid','',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" size="10" value="'.($_POST["km"]?$_POST["km"]:'').'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> ';
|
||||
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center';
|
||||
|
||||
print '</form>';
|
||||
@@ -282,17 +285,19 @@ else
|
||||
print $html->select_users($_POST["fk_user"]?$_POST["fk_user"]:$deplacement->fk_user,'fk_user',0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Where
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||
print $html->select_societes($soc->id,'socid','',1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
print $html->select_date($deplacement->date,'','','','','update');
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" class="flat" size="10" value="'.$deplacement->km.'"></td></tr>';
|
||||
|
||||
// Km
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" class="flat" size="10" value="'.$deplacement->km.'"></td></tr>';
|
||||
|
||||
// Where
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||
print $html->select_societes($soc->id,'socid','',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -336,12 +341,6 @@ else
|
||||
print $userfee->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Where
|
||||
print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
|
||||
print '<td>';
|
||||
if ($soc->id) print $soc->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date
|
||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
||||
print dol_print_date($deplacement->date,'day');
|
||||
@@ -350,6 +349,12 @@ else
|
||||
// Km/Price
|
||||
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td><td>'.$deplacement->km.'</td></tr>';
|
||||
|
||||
// Where
|
||||
print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
|
||||
print '<td>';
|
||||
if ($soc->id) print $soc->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
{
|
||||
@@ -428,5 +433,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/06/29 17:55:33 $ - $Revision: 1.55 $');
|
||||
?>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/deplacement/index.php
|
||||
\brief Page liste des deplacements
|
||||
\version $Id$
|
||||
* \file htdocs/compta/deplacement/index.php
|
||||
* \brief Page list of expenses
|
||||
* \version $Id: index.php,v 1.44 2011/06/29 17:55:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -56,74 +56,143 @@ $limit = $conf->liste_limit;
|
||||
|
||||
$tripandexpense_static=new Deplacement($db);
|
||||
|
||||
llxHeader();
|
||||
//$help_url='EN:Module_Donations|FR:Module_Dons|ES:Módulo_Subvenciones';
|
||||
$help_url='';
|
||||
llxHeader('',$langs->trans("ListOfFees"),$help_url);
|
||||
|
||||
$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";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||
$sql.= " WHERE d.fk_user = u.rowid";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1 ,$offset);
|
||||
|
||||
//print $sql;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
|
||||
$totalnb=0;
|
||||
$sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d";
|
||||
$sql.= " GROUP BY d.type";
|
||||
$sql.= " ORDER BY d.type";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print_barre_liste($langs->trans("ListOfFees"), $page, "index.php","&socid=$socid",$sortfield,$sortorder,'',$num);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"d.type","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.dated","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"u.name","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("FeesKilometersOrAmout"),$_SERVER["PHP_SELF"],"d.km","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"], '');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$soc = new Societe($db);
|
||||
if ($objp->socid) $soc->fetch($objp->socid);
|
||||
|
||||
$var=!$var;
|
||||
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($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>';
|
||||
print '<td align="right">'.$objp->km.'</td>';
|
||||
|
||||
print '<td align="right">'.$tripandexpense_static->getLibStatut(5).'</td>';
|
||||
print "</tr>\n";
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$somme[$objp->type] = $objp->km;
|
||||
$nb[$objp->type] = $objp->nb;
|
||||
$totalnb += $objp->nb;
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("ExpensesArea"));
|
||||
|
||||
print '<table width="100%" class="notopnoleftnoright">';
|
||||
|
||||
// Left area
|
||||
print '<tr><td class="notopnoleft" width="30%" valign="top">';
|
||||
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("Statistics").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$listoftype=$tripandexpense_static->listOfTypes();
|
||||
foreach ($listoftype as $typefee)
|
||||
{
|
||||
$dataseries[]=array('label'=>$typefee['label'],'values'=>array(0=>(isset($nb[$typefee['code']])?$nb[$typefee['code']]:0)));
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr><td align="center" colspan="4">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$totalnb.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
// Right area
|
||||
print '</td><td valign="top">';
|
||||
|
||||
$max=10;
|
||||
|
||||
$langs->load("boxes");
|
||||
|
||||
$sql = "SELECT u.rowid as uid, u.name, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = d.fk_user";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND d.fk_soc = ".$socid;
|
||||
$sql.= $db->order("d.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$var=false;
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("FeesKilometersOrAmout").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
|
||||
$deplacementstatic=new Deplacement($db);
|
||||
$userstatic=new User($db);
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$deplacementstatic->ref=$objp->rowid;
|
||||
$deplacementstatic->id=$objp->rowid;
|
||||
$userstatic->id=$objp->uid;
|
||||
$userstatic->nom=$objp->name;
|
||||
$userstatic->prenom=$objp->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$objp->km.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($objp->dm),'day').'</td>';
|
||||
print '<td>'.$deplacementstatic->LibStatut($objp->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td colspan="2">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/06/29 17:55:33 $ - $Revision: 1.44 $');
|
||||
?>
|
||||
|
||||
129
htdocs/compta/deplacement/list.php
Executable file
129
htdocs/compta/deplacement/list.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/deplacement/list.php
|
||||
* \brief Page list of expenses
|
||||
* \version $Id: list.php,v 1.1 2011/06/29 17:55:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("users");
|
||||
$langs->load("trips");
|
||||
|
||||
// Security check
|
||||
$socid = $_GET["socid"]?$_GET["socid"]:'';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'deplacement','','');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
$offset = $conf->liste_limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="d.dated";
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$tripandexpense_static=new Deplacement($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$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";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||
$sql.= " WHERE d.fk_user = u.rowid";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1 ,$offset);
|
||||
|
||||
//print $sql;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print_barre_liste($langs->trans("ListOfFees"), $page, $_SERVER["PHP_SELF"],"&socid=$socid",$sortfield,$sortorder,'',$num);
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"d.type","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.dated","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"u.name","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socid=$socid",'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("FeesKilometersOrAmout"),$_SERVER["PHP_SELF"],"d.km","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"], '');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$soc = new Societe($db);
|
||||
if ($objp->socid) $soc->fetch($objp->socid);
|
||||
|
||||
$var=!$var;
|
||||
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($db->jdate($objp->dd),'day').'</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>';
|
||||
if ($objp->socid) print '<td>'.$soc->getNomUrl(1).'</td>';
|
||||
else print '<td> </td>';
|
||||
print '<td align="right">'.$objp->km.'</td>';
|
||||
|
||||
print '<td align="right">'.$tripandexpense_static->getLibStatut(5).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/06/29 17:55:33 $ - $Revision: 1.1 $');
|
||||
?>
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/compta/dons/class/don.class.php
|
||||
* \ingroup don
|
||||
* \brief Fichier de la classe des dons
|
||||
* \version $Id$
|
||||
* \version $Id: don.class.php,v 1.10 2011/06/29 17:55:34 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@@ -310,6 +310,8 @@ class Don extends CommonObject
|
||||
$sql.= ", fk_user_valid";
|
||||
$sql.= ", datedon";
|
||||
$sql.= ", email";
|
||||
$sql.= ", phone";
|
||||
$sql.= ", phone_mobile";
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= " '".$this->db->idate($now)."'";
|
||||
$sql.= ", ".$conf->entity;
|
||||
@@ -328,7 +330,9 @@ class Don extends CommonObject
|
||||
$sql.= ", ".$user->id;
|
||||
$sql.= ", null";
|
||||
$sql.= ", '".$this->db->idate($this->date)."'";
|
||||
$sql.= ", '".$this->email."'";
|
||||
$sql.= ", '".$this->db->escape($this->email)."'";
|
||||
$sql.= ", '".$this->db->escape($this->phone)."'";
|
||||
$sql.= ", '".$this->db->escape($this->phone_mobile)."'";
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("Don::create sql=".$sql, LOG_DEBUG);
|
||||
@@ -367,6 +371,8 @@ class Don extends CommonObject
|
||||
$sql .= ",note='".$this->db->escape($this->note)."'";
|
||||
$sql .= ",datedon='".$this->db->idate($this->date)."'";
|
||||
$sql .= ",email='".$this->email."'";
|
||||
$sql .= ",phone='".$this->phone."'";
|
||||
$sql .= ",phone_mobile='".$this->phone_mobile."'";
|
||||
$sql .= ",fk_statut=".$this->statut;
|
||||
$sql .= " WHERE rowid = $this->id";
|
||||
|
||||
@@ -383,9 +389,9 @@ class Don extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Suppression du don de la base
|
||||
* @param rowid id du don a supprimer
|
||||
/**
|
||||
* Delete a donation
|
||||
* @param rowid Id of donation to delete
|
||||
*/
|
||||
function delete($rowid)
|
||||
{
|
||||
@@ -413,7 +419,8 @@ class Don extends CommonObject
|
||||
|
||||
/**
|
||||
* Load donation from database
|
||||
* @param rowid Id of donation toload
|
||||
* @param rowid Id of donation to load
|
||||
* @param ref Ref of donation to load
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetch($rowid,$ref='')
|
||||
@@ -421,7 +428,7 @@ class Don extends CommonObject
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,";
|
||||
$sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet,";
|
||||
$sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,";
|
||||
$sql.= " p.title as project_label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet";
|
||||
@@ -451,6 +458,8 @@ class Don extends CommonObject
|
||||
$this->zip = $obj->cp;
|
||||
$this->town = $obj->ville;
|
||||
$this->email = $obj->email;
|
||||
$this->phone = $obj->phone;
|
||||
$this->phone_mobile = $obj->phone_mobile;
|
||||
$this->pays = $obj->pays;
|
||||
$this->projet = $obj->project_label;
|
||||
$this->fk_project = $obj->fk_don_projet;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/compta/dons/index.php
|
||||
* \ingroup don
|
||||
* \brief Home page of donation module
|
||||
* \version $Id$
|
||||
* \version $Id: index.php,v 1.28 2011/06/29 17:55:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -43,10 +43,11 @@ $donation_static=new Don($db);
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Subvenciones');
|
||||
|
||||
$donstatic=new Don($db);
|
||||
|
||||
$help_url='EN:Module_Donations|FR:Module_Dons|ES:Módulo_Subvenciones';
|
||||
llxHeader('',$langs->trans("Donations"),$help_url);
|
||||
|
||||
$sql = "SELECT count(d.rowid) as nb, sum(d.amount) as somme , d.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
|
||||
$sql.= " GROUP BY d.fk_statut";
|
||||
@@ -133,8 +134,7 @@ print "</table>";
|
||||
print '</td><td valign="top">';
|
||||
|
||||
|
||||
|
||||
$max=5;
|
||||
$max=10;
|
||||
|
||||
/*
|
||||
* Last modified proposals
|
||||
@@ -202,5 +202,5 @@ print '</td></tr></table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/06/29 17:55:33 $ - $Revision: 1.28 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/compta/index.php
|
||||
* \ingroup compta
|
||||
* \brief Main page of accountancy area
|
||||
* \version $Id$
|
||||
* \version $Id: index.php,v 1.181 2011/06/29 17:55:34 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@@ -474,20 +474,17 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
|
||||
|
||||
|
||||
// Last customers
|
||||
if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
// Last donations
|
||||
if ($conf->don->enabled && $user->rights->societe->lire)
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/societe/class/client.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/compta/dons/class/don.class.php');
|
||||
|
||||
$langs->load("boxes");
|
||||
$donationstatic=new Don($db);
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid, s.datec as dc, s.tms as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.client IN (1, 3)";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
$sql = "SELECT s.rowid, s.nom, s.prenom, s.societe, s.datedon as date, s.tms as dm, s.amount, s.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as s";
|
||||
$sql.= " WHERE s.entity = ".$conf->entity;
|
||||
$sql.= $db->order("s.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
@@ -500,25 +497,32 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedCustomers",min($max,$num)).'</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedDonations",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$var = True;
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
|
||||
$customerstatic=new Client($db);
|
||||
$var=true;
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$customerstatic->id=$objp->rowid;
|
||||
$customerstatic->nom=$objp->nom;
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$customerstatic->getNomUrl(1).'</td>';
|
||||
$donationstatic->id=$objp->rowid;
|
||||
$donationstatic->nom=$objp->nom;
|
||||
$donationstatic->prenom=$objp->prenom;
|
||||
$label=$donationstatic->getFullName($langs);
|
||||
if ($objp->societe) $label.=($label?' - ':'').$objp->societe;
|
||||
$donationstatic->ref=$label;
|
||||
print '<td>'.$donationstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($objp->dm),'day').'</td>';
|
||||
print '<td>'.$donationstatic->LibStatut($objp->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
@@ -531,22 +535,25 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
// Last suppliers
|
||||
if ($conf->fournisseur->enabled && $user->rights->societe->lire)
|
||||
// Last trips and expenses
|
||||
if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
include_once(DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php');
|
||||
|
||||
$sql = "SELECT s.nom, s.rowid, s.datec as dc, s.tms as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.fournisseur = 1";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
$sql.= $db->order("s.tms","DESC");
|
||||
$langs->load("boxes");
|
||||
|
||||
$sql = "SELECT u.rowid as uid, u.name, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE u.rowid = d.fk_user";
|
||||
$sql.= " AND d.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND d.fk_soc = ".$socid;
|
||||
$sql.= $db->order("d.tms","DESC");
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -558,22 +565,32 @@ if ($conf->fournisseur->enabled && $user->rights->societe->lire)
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedSuppliers",min($max,$num)).'</td>';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
|
||||
print '<td align="right">'.$langs->trans("FeesKilometersOrAmout").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
{
|
||||
$total_ttc = $totalam = $total = 0;
|
||||
|
||||
$customerstatic=new Client($db);
|
||||
$deplacementstatic=new Deplacement($db);
|
||||
$userstatic=new User($db);
|
||||
while ($i < $num && $i < $max)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$customerstatic->id=$objp->rowid;
|
||||
$customerstatic->nom=$objp->nom;
|
||||
$deplacementstatic->ref=$objp->rowid;
|
||||
$deplacementstatic->id=$objp->rowid;
|
||||
$userstatic->id=$objp->uid;
|
||||
$userstatic->nom=$objp->name;
|
||||
$userstatic->prenom=$objp->firstname;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$customerstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$userstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$objp->km.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($objp->dm),'day').'</td>';
|
||||
print '<td>'.$deplacementstatic->LibStatut($objp->fk_statut,3).'</td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
@@ -586,6 +603,7 @@ if ($conf->fournisseur->enabled && $user->rights->societe->lire)
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@@ -991,5 +1009,5 @@ print '</table>';
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/06/29 17:55:34 $ - $Revision: 1.181 $');
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--
|
||||
-- $Id$
|
||||
-- $Revision$
|
||||
-- $Id: init_menu_auguria.sql,v 1.118 2011/06/29 17:55:34 eldy Exp $
|
||||
-- $Revision: 1.118 $
|
||||
--
|
||||
-- Menu base entries
|
||||
-- This file is loaded when a menu handler base is activated (auguria, etc..)
|
||||
@@ -169,9 +169,10 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2002__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy', 'List', 1, 'donations', '$user->rights->don->lire', '', 2, 1, __ENTITY__);
|
||||
--insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2003__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/stats.php?leftmenu=donations&mainmenu=accountancy', 'Statistics', 1, 'donations', '$user->rights->don->lire', '', 2, 2, __ENTITY__);
|
||||
-- Trips and expenses
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->deplacement->enabled && $leftmenu=="tripsandexpenses"', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->deplacement->enabled && $leftmenu=="tripsandexpenses"', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->deplacement->enabled && $leftmenu=="tripsandexpenses"', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->deplacement->enabled && $leftmenu=="tripsandexpenses"', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->tax->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy', 'MenuTaxAndDividends', 0, 'compta', '$user->rights->tax->charges->lire', '', 0, 6, __ENTITY__);
|
||||
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->tax->enabled', __HANDLER__, 'left', 2201__+MAX_llx_menu__, 'accountancy', '', 2200__+MAX_llx_menu__, '/compta/sociales/index.php?leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/menus/standard/eldy.lib.php
|
||||
* \brief Library for file eldy menus
|
||||
* \version $Id$
|
||||
* \version $Id: eldy.lib.php,v 1.52 2011/06/29 17:55:33 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -914,13 +914,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
//if ($leftmenu=="donations") $newmenu->add("/compta/dons/stats.php",$langs->trans("Statistics"), 1, $user->rights->don->lire);
|
||||
}
|
||||
|
||||
// Deplacements
|
||||
// Trips and expenses
|
||||
if ($conf->deplacement->enabled)
|
||||
{
|
||||
$langs->load("trips");
|
||||
$newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire);
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add("/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("New"), 1, $user->rights->deplacement->creer);
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("List"), 1, $user->rights->deplacement->lire);
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("List"), 1, $user->rights->deplacement->lire);
|
||||
if ($leftmenu=="tripsandexpenses") $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=accountancy", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--
|
||||
-- $Id: 3.0.0-3.1.0.sql,v 1.77 2011/06/29 11:22:35 eldy Exp $
|
||||
-- $Id: 3.0.0-3.1.0.sql,v 1.78 2011/06/29 17:55:32 eldy Exp $
|
||||
--
|
||||
-- Be carefull to requests order.
|
||||
-- This file must be loaded by calling /install/index.php page
|
||||
@@ -438,3 +438,5 @@ ALTER TABLE llx_c_typent ADD COLUMN module varchar(32) NULL;
|
||||
|
||||
ALTER TABLE llx_user ADD signature text DEFAULT NULL AFTER email;
|
||||
|
||||
ALTER TABLE llx_don ADD phone_mobile varchar(24) after email;
|
||||
ALTER TABLE llx_don ADD phone varchar(24) after email;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- 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
|
||||
@@ -16,7 +17,7 @@
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Id: llx_don.sql,v 1.5 2011/06/29 17:55:34 eldy Exp $
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
@@ -39,6 +40,8 @@ create table llx_don
|
||||
ville varchar(50),
|
||||
pays varchar(50),
|
||||
email varchar(255),
|
||||
phone varchar(24),
|
||||
phone_mobile varchar(24),
|
||||
public smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1)
|
||||
fk_don_projet integer NULL, -- projet auquel est fait le don
|
||||
fk_user_author integer NOT NULL,
|
||||
|
||||
@@ -54,6 +54,8 @@ NoRecordedCustomers=No recorded customers
|
||||
NoRecordedContacts=No recorded contacts
|
||||
BoxTitleLastActionsToDo=Last %s actions to do
|
||||
BoxTitleLastContracts=Last %s contracts
|
||||
BoxTitleLastModifiedDonations=Last %s modified donations
|
||||
BoxTitleLastModifiedExpenses=Last %s modified expenses
|
||||
NoActionsToDo=No actions to do
|
||||
NoRecordedOrders=No recorded customer's orders
|
||||
NoRecordedProposals=No recorded proposals
|
||||
|
||||
@@ -17,4 +17,5 @@ ConfirmDeleteTrip=Are you sure you want to delete this trip ?
|
||||
TF_OTHER=Other
|
||||
TF_LUNCH=Lunch
|
||||
TF_TRIP=Trip
|
||||
ListTripsAndExpenses=List of trips and expenses
|
||||
ListTripsAndExpenses=List of trips and expenses
|
||||
ExpensesArea=Trips and exepenses area
|
||||
@@ -54,6 +54,8 @@ NoRecordedCustomers=Pas de client enregistré
|
||||
NoRecordedContacts=Pas de contact enregistré
|
||||
BoxTitleLastActionsToDo=Les %s derniers événements à réaliser
|
||||
BoxTitleLastContracts=Les %s derniers contrats
|
||||
BoxTitleLastModifiedDonations=Les %s derniers dons modifiés
|
||||
BoxTitleLastModifiedExpenses=Les %s dernières note de frais modifiées
|
||||
NoActionsToDo=Pas d'événements à réaliser
|
||||
NoRecordedOrders=Pas de commande client enregistrée
|
||||
NoRecordedProposals=Pas de proposition commerciale enregistrée
|
||||
|
||||
@@ -19,3 +19,4 @@ TF_OTHER=Autre
|
||||
TF_LUNCH=Repas
|
||||
TF_TRIP=Déplacement
|
||||
ListTripsAndExpenses=Liste des notes de frais
|
||||
ExpensesArea=Espace Notes de frais
|
||||
Reference in New Issue
Block a user