cvsimport

This commit is contained in:
Laurent Destailleur 2011-08-08 16:07:47 +00:00
commit 154b37ed93
46 changed files with 712 additions and 446 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -17,10 +17,10 @@
*/
/**
* \file htdocs/adherents/info.php
* \file htdocs/adherents/info_subscription.php
* \ingroup member
* \brief Page des informations d'un adherent
* \version $Id: info_subscription.php,v 1.12 2011/07/31 22:23:28 eldy Exp $
* \brief Page with information of subscriptions of a member
* \version $Id: info_subscription.php,v 1.13 2011/08/08 16:00:18 eldy Exp $
*/
require("../main.inc.php");
@ -80,5 +80,5 @@ print '</div>';
$db->close();
llxFooter('$Date: 2011/07/31 22:23:28 $ - $Revision: 1.12 $');
llxFooter('$Date: 2011/08/08 16:00:18 $ - $Revision: 1.13 $');
?>

View File

@ -1,6 +1,5 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (c) 2004-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
@ -17,11 +16,11 @@
*/
/**
* \file htdocs/adherents/stats/index.php
* \file htdocs/adherents/stats/geo.php
* \ingroup member
* \brief Page des stats
* \version $Id: geo.php,v 1.2 2011/08/03 00:45:44 eldy Exp $
*/
* \brief Page with geographical statistics on members
* \version $Id: geo.php,v 1.3 2011/08/08 16:00:20 eldy Exp $
*/
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/dolgraph.class.php");
@ -37,8 +36,8 @@ $mode=GETPOST('mode')?GETPOST('mode'):'';
// Security check
if ($user->societe_id > 0)
{
$action = '';
$socid = $user->societe_id;
$action = '';
$socid = $user->societe_id;
}
if (! $user->rights->adherent->cotisation->lire)
accessforbidden();
@ -67,34 +66,34 @@ create_exdir($dir);
if ($mode)
{
// Define sql
if ($mode == 'memberbycountry')
{
$label=$langs->trans("Country");
// Define sql
if ($mode == 'memberbycountry')
{
$label=$langs->trans("Country");
$tab='statscountry';
$data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
$sql.=" WHERE d.statut = 1";
$sql.=" GROUP BY c.libelle, c.code";
//print $sql;
}
if ($mode == 'memberbystate')
{
$data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
$sql.=" WHERE d.statut = 1";
$sql.=" GROUP BY c.libelle, c.code";
//print $sql;
}
if ($mode == 'memberbystate')
{
$label=$langs->trans("Country");
$label2=$langs->trans("State");
$label2=$langs->trans("State");
$tab='statsstate';
$data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, c.nom as label2";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
$data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, c.nom as label2";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
$sql.=" WHERE d.statut = 1";
$sql.=" GROUP BY p.libelle, p.code, c.nom";
//print $sql;
}
$sql.=" GROUP BY p.libelle, p.code, c.nom";
//print $sql;
}
if ($mode == 'memberbytown')
{
$label=$langs->trans("Country");
@ -110,39 +109,39 @@ if ($mode)
//print $sql;
}
$langsen=new Translate('',$conf);
$langsen=new Translate('',$conf);
$langsen->setDefaultLang('en_US');
$langsen->load("dict");
//print $langsen->trans("Country"."FI");exit;
// Define $data array
dol_syslog("Count member sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$num=$db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj=$db->fetch_object($resql);
if ($mode == 'memberbycountry')
{
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
// Define $data array
dol_syslog("Count member sql=".$sql);
$resql=$db->query($sql);
if ($resql)
{
$num=$db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj=$db->fetch_object($resql);
if ($mode == 'memberbycountry')
{
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
'code'=>$obj->code,
'nb'=>$obj->nb,
'lastdate'=>$db->jdate($obj->lastdate)
);
}
if ($mode == 'memberbystate')
{
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
);
}
if ($mode == 'memberbystate')
{
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")),
'nb'=>$obj->nb,
'lastdate'=>$db->jdate($obj->lastdate)
);
}
);
}
if ($mode == 'memberbytown')
{
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
@ -153,14 +152,14 @@ if ($mode)
);
}
$i++;
}
$db->free($resql);
}
else
{
dol_print_error($db);
}
$i++;
}
$db->free($resql);
}
else
{
dol_print_error($db);
}
}
@ -172,101 +171,101 @@ dol_fiche_head($head, $tab, $langs->trans("Statistics"), 0, 'user');
// Print title
if ($mode && ! sizeof($data))
{
print $langs->trans("NoValidatedMemberYet").'<br>';
print '<br>';
print $langs->trans("NoValidatedMemberYet").'<br>';
print '<br>';
}
else
{
if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>';
else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>';
else if ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
else if ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
else
{
print $langs->trans("MembersStatisticsDesc").'<br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbycountry">'.$langs->trans("MembersStatisticsByCountries").'</a><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbystate">'.$langs->trans("MembersStatisticsByState").'</a><br>';
else
{
print $langs->trans("MembersStatisticsDesc").'<br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbycountry">'.$langs->trans("MembersStatisticsByCountries").'</a><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbystate">'.$langs->trans("MembersStatisticsByState").'</a><br>';
print '<br>';
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbytown">'.$langs->trans("MembersStatisticsByTown").'</a><br>';
}
print '<br>';
}
print '<br>';
}
// Show graphics
if ($mode == 'memberbycountry')
{
// Assume we've already included the proper headers so just call our script inline
print "\n<script type='text/javascript'>\n";
print "google.load('visualization', '1', {'packages': ['geomap']});\n";
print "google.setOnLoadCallback(drawMap);\n";
print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n";
// Assume we've already included the proper headers so just call our script inline
print "\n<script type='text/javascript'>\n";
print "google.load('visualization', '1', {'packages': ['geomap']});\n";
print "google.setOnLoadCallback(drawMap);\n";
print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n";
// Get the total number of rows
print "\tdata.addRows(".sizeof($data).");\n";
print "\tdata.addColumn('string', 'Country');\n";
print "\tdata.addColumn('number', 'Number');\n";
// Get the total number of rows
print "\tdata.addRows(".sizeof($data).");\n";
print "\tdata.addColumn('string', 'Country');\n";
print "\tdata.addColumn('number', 'Number');\n";
// loop and dump
$i=0;
foreach($data as $val)
{
//$valcountry=ucfirst($val['code']);
$valcountry=ucfirst($val['label_en']);
// loop and dump
$i=0;
foreach($data as $val)
{
//$valcountry=ucfirst($val['code']);
$valcountry=ucfirst($val['label_en']);
// fix case of uk
if ($valcountry == 'Great Britain') { $valcountry = 'United Kingdom'; }
print "\tdata.setValue(".$i.", 0, \"".$valcountry."\");\n";
print "\tdata.setValue(".$i.", 1, ".$val['nb'].");\n";
// Google's Geomap only supports up to 400 entries
if ($i >= 400){ break; }
$i++;
}
if ($valcountry == 'Great Britain') { $valcountry = 'United Kingdom'; }
print "\tdata.setValue(".$i.", 0, \"".$valcountry."\");\n";
print "\tdata.setValue(".$i.", 1, ".$val['nb'].");\n";
// Google's Geomap only supports up to 400 entries
if ($i >= 400){ break; }
$i++;
}
print "\tvar options = {};\n";
print "\tvar options = {};\n";
print "\toptions['dataMode'] = 'regions';\n";
print "\toptions['showZoomOut'] = false;\n";
//print "\toptions['zoomOutLabel'] = '".dol_escape_js($langs->transnoentitiesnoconv("Numbers"))."';\n";
print "\toptions['width'] = ".$graphwidth.";\n";
print "\toptions['height'] = ".$graphheight.";\n";
print "\tvar container = document.getElementById('".$mode."');\n";
print "\tvar geomap = new google.visualization.GeoMap(container);\n";
print "\tgeomap.draw(data, options);\n";
print "};\n";
print "</script>\n";
print "\toptions['width'] = ".$graphwidth.";\n";
print "\toptions['height'] = ".$graphheight.";\n";
print "\tvar container = document.getElementById('".$mode."');\n";
print "\tvar geomap = new google.visualization.GeoMap(container);\n";
print "\tgeomap.draw(data, options);\n";
print "};\n";
print "</script>\n";
// print the div tag that will contain the map
print '<div align="center" id="'.$mode.'"></div>'."\n";
print '<br>';
// print the div tag that will contain the map
print '<div align="center" id="'.$mode.'"></div>'."\n";
print '<br>';
}
if ($mode)
{
// Print array
print '<table class="border" width="100%">';
print '<tr class="liste_titre">';
print '<td align="center">'.$label.'</td>';
// Print array
print '<table class="border" width="100%">';
print '<tr class="liste_titre">';
print '<td align="center">'.$label.'</td>';
if ($label2) print '<td align="center">'.$label2.'</td>';
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';
print '<td align="center">'.$langs->trans("LastMemberDate").'</td>';
print '</tr>';
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';
print '<td align="center">'.$langs->trans("LastMemberDate").'</td>';
print '</tr>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td align="center">'.$val['label'].'</td>';
$oldyear=0;
$var=true;
foreach ($data as $val)
{
$year = $val['year'];
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td align="center">'.$val['label'].'</td>';
if ($label2) print '<td align="center">'.$val['label2'].'</td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right">'.dol_print_date($val['lastdate'],'dayhour').'</td>';
print '</tr>';
$oldyear=$year;
}
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right">'.dol_print_date($val['lastdate'],'dayhour').'</td>';
print '</tr>';
$oldyear=$year;
}
print '</table>';
print '</table>';
}
@ -275,5 +274,5 @@ dol_fiche_end();
$db->close();
llxFooter('$Date: 2011/08/03 00:45:44 $ - $Revision: 1.2 $');
llxFooter('$Date: 2011/08/08 16:00:20 $ - $Revision: 1.3 $');
?>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -19,10 +19,10 @@
*/
/**
* \file htdocs/admin/societe.php
* \file htdocs/admin/workflow.php
* \ingroup company
* \brief Third party module setup page
* \version $Id: workflow.php,v 1.5 2011/07/31 22:23:21 eldy Exp $
* \brief Workflows setup page
* \version $Id: workflow.php,v 1.6 2011/08/08 16:00:18 eldy Exp $
*/
require("../main.inc.php");
@ -135,5 +135,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/07/31 22:23:21 $ - $Revision: 1.5 $');
llxFooter('$Date: 2011/08/08 16:00:18 $ - $Revision: 1.6 $');
?>

View File

@ -22,7 +22,7 @@
* \brief File of class to manage widget boxes
* \author Rodolphe Qiedeville
* \author Laurent Destailleur
* \version $Id: boxes.php,v 1.55 2011/08/01 13:26:21 hregis Exp $
* \version $Id: boxes.php,v 1.56 2011/08/08 15:28:01 eldy Exp $
*/
@ -52,7 +52,7 @@ function printBoxesArea($user,$areacode)
print '<table width="100%" style="border-collapse: collapse; border: 0px; margin: 0px; padding: 0px;"><tr>';
// Affichage colonne gauche
print '<td width="50%" valign="top" style="padding-right: 4px;">'."\n";
print '<td width="50%" valign="top" class="notopnoleft" style="padding-right: 8px;">'."\n";
print "\n<!-- Box left container -->\n";
print '<div id="left" class="connectedSortable">'."\n";
@ -87,7 +87,7 @@ function printBoxesArea($user,$areacode)
print "</td>\n";
// Affichage colonne droite
print '<td width="50%" valign="top" style="padding-right: 2px;">';
print '<td width="50%" valign="top">';
print "\n<!-- Box right container -->\n";
print '<div id="right" class="connectedSortable">'."\n";

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008-2010 Laurent Destailleur <eldy@uers.sourceforge.net>
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@uers.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
@ -17,6 +17,9 @@
*/
/**
* Class ot manage authentication for pos module (cashdesk)
*/
class Auth {
var $db;

View File

@ -21,7 +21,7 @@
* \file htdocs/comm/action/class/ical.class.php
* \ingroup commercial
* \brief File of class to parse ical calendars
* \version $Id: ical.class.php,v 1.6 2011/08/03 00:46:20 eldy Exp $
* \version $Id: ical.class.php,v 1.7 2011/08/08 15:47:16 eldy Exp $
*/
class ical
{
@ -31,7 +31,15 @@ class ical
var $todo_count; // Number of TODOs
var $last_key; //Help variable save last key (multiline string)
/**
/**
* Constructor
*/
public function ical()
{
}
/**
* Read text file, icalender text file
*
* @param string $file

View File

@ -21,7 +21,7 @@
* \file htdocs/comm/index.php
* \ingroup commercial
* \brief Home page of commercial area
* \version $Id: index.php,v 1.171 2011/08/03 00:46:26 eldy Exp $
* \version $Id: index.php,v 1.173 2011/08/08 14:25:44 eldy Exp $
*/
require("../main.inc.php");
@ -275,7 +275,7 @@ $max=3;
/*
* Last modified proposals
*/
/*
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
@ -351,6 +351,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
dol_print_error($db,'');
}
}
*/
/*
* Last modified customers or prospects
@ -485,8 +486,7 @@ if ($user->rights->agenda->myactions->read)
/*
* Derniers contrats
*
* Last contracts
*/
if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
{
@ -545,8 +545,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFA
}
/*
* Propales ouvertes
*
* Opened proposals
*/
if ($conf->propal->enabled && $user->rights->propale->lire)
{
@ -631,5 +630,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/08/03 00:46:26 $ - $Revision: 1.171 $');
llxFooter('$Date: 2011/08/08 14:25:44 $ - $Revision: 1.173 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/comm/propal/index.php
* \ingroup propal
* \brief Home page of proposal area
* \version $Id: index.php,v 1.7 2011/08/03 00:46:34 eldy Exp $
* \version $Id: index.php,v 1.8 2011/08/08 14:25:44 eldy Exp $
*/
require("../../main.inc.php");
@ -47,7 +47,7 @@ if ($user->societe_id > 0)
* View
*/
$propal_static=new Propal($db);
$propalstatic=new Propal($db);
$html = new Form($db);
$formfile = new FormFile($db);
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos";
@ -122,12 +122,12 @@ if ($resql)
$listofstatus=array(0,1,2,3,4);
foreach ($listofstatus as $status)
{
$dataseries[]=array('label'=>$propal_static->LibStatut($status,1),'values'=>array(0=>(isset($vals[$status])?$vals[$status]:0)));
$dataseries[]=array('label'=>$propalstatic->LibStatut($status,1),'values'=>array(0=>(isset($vals[$status])?$vals[$status]:0)));
if (! $conf->use_javascript_ajax)
{
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>'.$propal_static->LibStatut($status,0).'</td>';
print '<td>'.$propalstatic->LibStatut($status,0).'</td>';
print '<td align="right"><a href="liste.php?statut='.$status.'">'.(isset($vals[$status])?$vals[$status]:0).'</a></td>';
print "</tr>\n";
}
@ -234,12 +234,12 @@ if ($resql)
print "<tr $bc[$var]>";
print '<td width="20%" nowrap="nowrap">';
$propal_static->id=$obj->rowid;
$propal_static->ref=$obj->ref;
$propalstatic->id=$obj->rowid;
$propalstatic->ref=$obj->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding" nowrap="nowrap">';
print $propal_static->getNomUrl(1);
print $propalstatic->getNomUrl(1);
print '</td>';
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
@ -257,7 +257,7 @@ if ($resql)
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
print '<td align="right">'.$propal_static->LibStatut($obj->fk_statut,5).'</td>';
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
print '</tr>';
$i++;
}
@ -267,6 +267,85 @@ if ($resql)
else dol_print_error($db);
/*
* Opened proposals
*/
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$langs->load("propal");
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE p.fk_soc = s.rowid";
$sql.= " AND p.entity = ".$conf->entity;
$sql.= " AND p.fk_statut = 1";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= " ORDER BY p.rowid DESC";
$result=$db->query($sql);
if ($result)
{
$total = 0;
$num = $db->num_rows($result);
$i = 0;
if ($num > 0)
{
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
while ($i < $num)
{
$obj = $db->fetch_object($result);
$var=!$var;
print '<tr '.$bc[$var].'>';
// Ref
print '<td nowrap="nowrap" width="140">';
$propalstatic->id=$obj->propalid;
$propalstatic->ref=$obj->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" nowrap="nowrap">';
print $propalstatic->getNomUrl(1);
print '</td>';
print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
if ($db->jdate($obj->dp) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
print '</td>';
print '<td width="16" align="center" class="nobordernopadding">';
$filename=dol_sanitizeFileName($obj->ref);
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($obj->ref);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
print '</td></tr></table>';
print "</td>";
print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
print '<td align="right">';
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut,3).'</td>'."\n";
print '</tr>'."\n";
$i++;
$total += $obj->total_ttc;
}
if ($total>0) {
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
}
print "</table><br>";
}
}
else
{
dol_print_error($db);
}
}
/*
* Proposals to process
*/
@ -304,12 +383,12 @@ if ($conf->propal->enabled)
print "<tr $bc[$var]>";
print '<td nowrap="nowrap">';
$propal_static->id=$obj->rowid;
$propal_static->ref=$obj->ref;
$propalstatic->id=$obj->rowid;
$propalstatic->ref=$obj->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding" nowrap="nowrap">';
print $propal_static->getNomUrl(1);
print $propalstatic->getNomUrl(1);
print '</td>';
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
@ -327,7 +406,7 @@ if ($conf->propal->enabled)
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td>';
print '<td align="right">'.$propal_static->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
print '</tr>';
$i++;
@ -376,12 +455,12 @@ if ($conf->propal->enabled)
print "<tr $bc[$var]>";
print '<td width="20%" nowrap="nowrap">';
$propal_static->id=$obj->rowid;
$propal_static->ref=$obj->ref;
$propalstatic->id=$obj->rowid;
$propalstatic->ref=$obj->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding" nowrap="nowrap">';
print $propal_static->getNomUrl(1);
print $propalstatic->getNomUrl(1);
print '</td>';
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
@ -399,7 +478,7 @@ if ($conf->propal->enabled)
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
print '<td align="right">'.$propal_static->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
print '</tr>';
$i++;
@ -415,6 +494,6 @@ print '</td></tr></table>';
$db->close();
llxFooter('$Date: 2011/08/03 00:46:34 $ - $Revision: 1.7 $');
llxFooter('$Date: 2011/08/08 14:25:44 $ - $Revision: 1.8 $');
?>

View File

@ -25,7 +25,7 @@
* \file htdocs/commande/fiche.php
* \ingroup commande
* \brief Page to show customer order
* \version $Id: fiche.php,v 1.527 2011/07/31 22:23:15 eldy Exp $
* \version $Id: fiche.php,v 1.528 2011/08/08 12:00:13 eldy Exp $
*/
require("../main.inc.php");
@ -1957,14 +1957,23 @@ else
if ($object->statut > 0 && $object->statut < 3 && $object->getNbOfProductsLines() > 0)
{
if ($user->rights->expedition->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id.'">'.$langs->trans('ShipProduct').'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('ShipProduct').'</a>';
}
if (($conf->expedition_bon->enabled && $user->rights->expedition->creer)
|| ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer))
{
if ($user->rights->expedition->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id.'">'.$langs->trans('ShipProduct').'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('ShipProduct').'</a>';
}
}
else
{
$langs->load("errors");
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("ErrorModuleSetupNotComplete")).'">'.$langs->trans('ShipProduct').'</a>';
}
}
}
@ -2122,5 +2131,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 22:23:15 $ - $Revision: 1.527 $');
llxFooter('$Date: 2011/08/08 12:00:13 $ - $Revision: 1.528 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/compta/index.php
* \ingroup compta
* \brief Main page of accountancy area
* \version $Id: index.php,v 1.184 2011/08/03 00:46:24 eldy Exp $
* \version $Id: index.php,v 1.185 2011/08/08 14:25:45 eldy Exp $
*/
require('../main.inc.php');
@ -347,7 +347,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastCustomerBills",min($max,$num)).'</td>';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastCustomerBills",$max).'</td>';
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
@ -444,7 +444,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastSupplierBills",min($max,$num)).'</td>';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastSupplierBills",$max).'</td>';
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
@ -519,7 +519,7 @@ if ($conf->don->enabled && $user->rights->societe->lire)
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedDonations",min($max,$num)).'</td>';
print '<tr class="liste_titre"><td>'.$langs->trans("BoxTitleLastModifiedDonations",$max).'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
print '<td width="16">&nbsp;</td>';
@ -588,7 +588,7 @@ if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",min($max,$num)).'</td>';
print '<td colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses",$max).'</td>';
print '<td align="right">'.$langs->trans("FeesKilometersOrAmout").'</td>';
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
print '<td width="16">&nbsp;</td>';
@ -838,7 +838,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsCustomersUnpaid",min($conf->liste_limit,$num)).' <a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">('.$num.')</a></td>';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsCustomersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">('.$num.')</a></td>';
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("Received").'</td>';
@ -943,7 +943,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsSuppliersUnpaid",min($conf->liste_limit,$num)).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php">('.$num.')</a></td>';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsSuppliersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php">('.$num.')</a></td>';
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="right">'.$langs->trans("Paid").'</td>';
@ -1031,5 +1031,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/08/03 00:46:24 $ - $Revision: 1.184 $');
llxFooter('$Date: 2011/08/08 14:25:45 $ - $Revision: 1.185 $');
?>

View File

@ -15,14 +15,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id: index.php,v 1.11 2011/07/31 22:23:31 eldy Exp $
* $Id: index.php,v 1.12 2011/08/08 15:28:01 eldy Exp $
*/
/**
\file htdocs/compta/param/comptes/index.php
\ingroup compta
\brief Page acceuil zone parametrages
\version $Revision: 1.11 $
\version $Revision: 1.12 $
*/
require("../../../main.inc.php");
@ -66,7 +66,7 @@ print "</table></form><br>";
print '</td><td valign="top" width="70%" class="notopnoleft">';
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
@ -76,5 +76,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/07/31 22:23:31 $ - $Revision: 1.11 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.12 $');
?>

View File

@ -20,7 +20,7 @@
\file htdocs/compta/param/index.php
\ingroup compta
\brief Page acceuil zone parametrage comptabilite
\version $Id: index.php,v 1.12 2011/08/03 00:46:21 eldy Exp $
\version $Id: index.php,v 1.13 2011/08/08 15:28:01 eldy Exp $
*/
require("../../main.inc.php");
@ -62,7 +62,7 @@ print "</table></form><br>";
print '</td><td valign="top" width="70%" class="notopnoleft">';
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
@ -72,5 +72,5 @@ print '</table>';
$db->close();
llxFooter('$Date: 2011/08/03 00:46:21 $ - $Revision: 1.12 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.13 $');
?>

View File

@ -24,7 +24,7 @@
* \file htdocs/contrat/class/contrat.class.php
* \ingroup contrat
* \brief Fichier de la classe des contrats
* \version $Id: contrat.class.php,v 1.23 2011/07/31 23:50:01 eldy Exp $
* \version $Id: contrat.class.php,v 1.24 2011/08/08 14:25:44 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
@ -1542,8 +1542,8 @@ class ContratLigne
/**
* \brief Constructeur d'objets ligne de contrat
* \param DB Database access handler
* Constructeur d'objets ligne de contrat
* @param DB Database access handler
*/
function ContratLigne($DB)
{
@ -1552,9 +1552,9 @@ class ContratLigne
/**
* \brief Return label of this contract line status
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* \return string Libelle
* Return label of this contract line status
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle
*/
function getLibStatut($mode)
{
@ -1562,11 +1562,11 @@ class ContratLigne
}
/**
* \brief Return label of a contract line status
* \param statut id statut
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* \param expired 0=Not expired, 1=Expired, -1=Both or unknown
* \return string Libelle
* Return label of a contract line status
* @param statut id statut
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @param expired 0=Not expired, 1=Expired, -1=Both or unknown
* @return string Libelle
*/
function LibStatut($statut,$mode,$expired=-1)
{
@ -1623,10 +1623,10 @@ class ContratLigne
}
/**
\brief Renvoie nom clicable (avec eventuellement le picto)
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
\return string Chaine avec URL
*/
* Renvoie nom clicable (avec eventuellement le picto)
* @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0,$maxlength=0)
{
global $langs;
@ -1647,10 +1647,10 @@ class ContratLigne
}
/**
* \brief Load object in memory from database
* \param id id object
* \param ref Ref of contract
* \return int <0 if KO, >0 if OK
* Load object in memory from database
* @param id id object
* @param ref Ref of contract
* @return int <0 if KO, >0 if OK
*/
function fetch($id, $ref='')
{
@ -1752,11 +1752,11 @@ class ContratLigne
}
/*
* \brief Update database for contract line
* \param user User that modify
* \param notrigger 0=no, 1=yes (no update trigger)
* \return int <0 if KO, >0 if OK
/**
* Update database for contract line
* @param user User that modify
* @param notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
function update($user, $notrigger=0)
{
@ -1854,9 +1854,9 @@ class ContratLigne
/**
* \brief Mise a jour en base des champs total_xxx de ligne
* \remarks Utilise par migration
* \return int <0 si ko, >0 si ok
* Mise a jour en base des champs total_xxx de ligne
* Used by migration process
* @return int <0 if KO, >0 if OK
*/
function update_total()
{

View File

@ -20,8 +20,8 @@
/**
* \file htdocs/contrat/index.php
* \ingroup contrat
* \brief Page liste des contrats
* \version $Revision: 1.84 $
* \brief Home page of contract area
* \version $Revision: 1.85 $
*/
require ("../main.inc.php");
@ -45,6 +45,14 @@ $result = restrictedArea($user, 'contrat',$contratid,'');
$staticcompany=new Societe($db);
$staticcontrat=new Contrat($db);
$staticcontratligne=new ContratLigne($db);
$productstatic=new Product($db);
/*
* Action
*/
// None
/*
@ -355,13 +363,94 @@ else
print '<br>';
// Not activated services
$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.description as note, cd.fk_contrat, s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd";
// Last modified services
$sql = "SELECT c.ref, c.fk_soc, ";
$sql.= " cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat, cd.date_fin_validite,";
$sql.= " s.nom,";
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
$sql.= " FROM (".MAIN_DB_PREFIX."contratdet as cd";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
$sql.= " WHERE cd.fk_contrat = c.rowid";
$sql.= " AND c.fk_soc = s.rowid";
$sql.= " AND s.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= " ORDER BY cd.tms DESC";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("LastModifiedServices",$max).'</td>';
print "</tr>\n";
$var=True;
while ($i < min($num,$max))
{
$obj = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td width="100" nowrap="nowrap">';
$staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat);
$staticcontrat->id=$obj->fk_contrat;
print $staticcontrat->getNomUrl(1,16);
//if (1 == 1) print img_warning($langs->trans("Late"));
print '</td>';
print '<td>';
if ($obj->fk_product > 0)
{
$productstatic->id=$obj->fk_product;
$productstatic->type=$obj->ptype;
$productstatic->ref=$obj->pref;
print $productstatic->getNomUrl(1,'',20);
}
else
{
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a>';
else print '</a> '.dol_trunc($obj->note,20);
}
print '</td>';
print '<td>';
$staticcompany->id=$obj->fk_soc;
$staticcompany->nom=$obj->nom;
print $staticcompany->getNomUrl(1,'',20);
print '</td>';
print '<td nowrap="nowrap" align="right"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
$dateend=$db->jdate($obj->date_fin_validite);
print $staticcontratligne->LibStatut($obj->statut, 3, ($dateend && $dateend < $now)?1:0);
print '</a></td>';
print "</tr>\n";
$i++;
}
$db->free();
print "</table>";
}
else
{
dol_print_error($db);
}
print '<br>';
// Not activated services
$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
$sql.= " s.nom,";
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
$sql.= " FROM (".MAIN_DB_PREFIX."contratdet as cd";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
$sql.= " WHERE c.statut=1";
$sql.= " AND cd.statut = 0";
$sql.= " AND cd.fk_contrat = c.rowid";
@ -379,7 +468,7 @@ if ($resql)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("NotActivatedServices").'</td>';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("NotActivatedServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=0">('.$num.')</a></td>';
print "</tr>\n";
$var=True;
@ -394,10 +483,21 @@ if ($resql)
$staticcontrat->id=$obj->fk_contrat;
print $staticcontrat->getNomUrl(1,16);
print '</td>';
print '<td nowrap="1">';
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a></td>';
else print '</a> '.dol_trunc($obj->note,20).'</td>';
print '<td nowrap="nowrap">';
if ($obj->fk_product > 0)
{
$productstatic->id=$obj->fk_product;
$productstatic->type=$obj->ptype;
$productstatic->ref=$obj->pref;
print $productstatic->getNomUrl(1,'',20);
}
else
{
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a>';
else print '</a> '.dol_trunc($obj->note,20);
}
print '</td>';
print '<td>';
$staticcompany->id=$obj->fk_soc;
$staticcompany->nom=$obj->nom;
@ -421,17 +521,19 @@ else
print '<br>';
// Last modified services
$max=5;
$sql = "SELECT c.ref, c.fk_soc, ";
$sql.= " cd.rowid as cid, cd.statut, cd.label, cd.description as note, cd.fk_contrat, cd.date_fin_validite,";
$sql.= " s.nom";
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd";
// Expired services
$sql = "SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
$sql.= " s.nom,";
$sql.= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype";
$sql.= " FROM (".MAIN_DB_PREFIX."contratdet as cd";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE cd.fk_contrat = c.rowid";
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
$sql.= " WHERE c.statut=1";
$sql.= " AND cd.statut = 4";
$sql.= " AND cd.date_fin_validite < '".$db->idate($now)."'";
$sql.= " AND cd.fk_contrat = c.rowid";
$sql.= " AND c.fk_soc = s.rowid";
$sql.= " AND s.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
@ -446,32 +548,43 @@ if ($resql)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("LastModifiedServices",min($num,$max)).'</td>';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ListOfExpiredServices").' <a href="'.DOL_URL_ROOT.'/contrat/services.php?mode=4&filter=expired">('.$num.')</a></td>';
print "</tr>\n";
$var=True;
while ($i < min($num,$max))
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td width="100" nowrap="nowrap">';
$staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat);
$staticcontrat->id=$obj->fk_contrat;
print $staticcontrat->getNomUrl(1,16);
//if (1 == 1) print img_warning($langs->trans("Late"));
print '</td>';
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a></td>';
else print '</a> '.dol_trunc($obj->note,20).'</td>';
print '<td nowrap="nowrap">';
if ($obj->fk_product > 0)
{
$productstatic->id=$obj->fk_product;
$productstatic->type=$obj->ptype;
$productstatic->ref=$obj->pref;
print $productstatic->getNomUrl(1,'',20);
}
else
{
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
if ($obj->label) print ' '.dol_trunc($obj->label,20).'</a>';
else print '</a> '.dol_trunc($obj->note,20);
}
print '</td>';
print '<td>';
$staticcompany->id=$obj->fk_soc;
$staticcompany->nom=$obj->nom;
print $staticcompany->getNomUrl(1,'',20);
print '</td>';
print '<td nowrap="nowrap" align="right"><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
$dateend=$db->jdate($obj->date_fin_validite);
print $staticcontratligne->LibStatut($obj->statut, 3, ($dateend && $dateend < $now)?1:0);
print '<td width="16" align="right"><a href="ligne.php?id='.$obj->fk_contrat.'&ligne='.$obj->cid.'">';
print $staticcontratligne->LibStatut($obj->statut,3,1);
print '</a></td>';
print "</tr>\n";
$i++;
@ -492,5 +605,5 @@ print '<br>';
$db->close();
llxFooter('$Date: 2011/07/31 23:46:55 $ - $Revision: 1.84 $');
llxFooter('$Date: 2011/08/08 14:25:44 $ - $Revision: 1.85 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/contrat/services.php
* \ingroup contrat
* \brief Page to list services in contracts
* \version $Id: services.php,v 1.57 2011/07/31 23:46:55 eldy Exp $
* \version $Id: services.php,v 1.58 2011/08/08 14:25:44 eldy Exp $
*/
require ("../main.inc.php");
@ -93,7 +93,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc
if ($mode == "0") $sql.= " AND cd.statut = 0";
if ($mode == "4") $sql.= " AND cd.statut = 4";
if ($mode == "5") $sql.= " AND cd.statut = 5";
if ($filter == "expired") $sql.= " AND date_fin_validite < ".$db->idate($now);
if ($filter == "expired") $sql.= " AND cd.date_fin_validite < '".$db->idate($now)."'";
if ($search_nom) $sql.= " AND s.nom like '%".$db->escape($search_nom)."%'";
if ($search_contract) $sql.= " AND c.rowid = '".$db->escape($search_contract)."'";
if ($search_service) $sql.= " AND (p.ref like '%".$db->escape($search_service)."%' OR p.description like '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')";
@ -266,5 +266,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:46:55 $ - $Revision: 1.57 $');
llxFooter('$Date: 2011/08/08 14:25:44 $ - $Revision: 1.58 $');
?>

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2009-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2009-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
@ -24,7 +24,7 @@
* \file htdocs/core/class/extrafields.class.php
* \ingroup core
* \brief File of class to manage extra fields
* \version $Id: extrafields.class.php,v 1.6 2011/07/31 23:45:14 eldy Exp $
* \version $Id: extrafields.class.php,v 1.8 2011/08/08 12:31:14 hregis Exp $
*/
/**
@ -405,6 +405,8 @@ class ExtraFields
*/
function showInputField($key,$value,$moreparam='')
{
global $conf;
$label=$this->attribute_label[$key];
$type=$this->attribute_type[$key];
$size=$this->attribute_size[$key];
@ -426,10 +428,19 @@ class ExtraFields
$showsize=round($size);
if ($showsize > 48) $showsize=48;
}
//print $type.'-'.$size;
$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$size.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
if ($type == 'date') $out.=' (YYYY-MM-DD)';
if ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)';
if ($type == 'varchar')
{
$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$size.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
}
else if ($type == 'text')
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('options_'.$key,$value,'',200,'dolibarr_notes','In',false,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,5,100);
$out=$doleditor->Create(1);
}
else if ($type == 'date') $out.=' (YYYY-MM-DD)';
else if ($type == 'datetime') $out.=' (YYYY-MM-DD HH:MM:SS)';
return $out;
}

View File

@ -1,3 +1,27 @@
<?php
/* 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
* 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, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file htdocs/disabled.php
* \brief Page to use to replace index.php to disable all software
* \version $Id: disabled.php,v 1.4 2011/08/08 15:51:13 eldy Exp $
*/
?>
<html>
<body>
This feature has been disabled on this test server.<br>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/fourn/commande/index.php
* \ingroup commande
* \brief Page accueil commandes fournisseurs
* \version $Revision: 1.43 $
* \ingroup commande fournisseur
* \brief Home page of supplier's orders area
* \version $Revision: 1.44 $
*/
require("../../main.inc.php");
@ -240,7 +240,7 @@ else
}
print '</td><td width="70%" valign="top" class="notopnoleft">';
print '</td><td width="70%" valign="top" class="notopnoleftnoright">';
/*
@ -387,5 +387,5 @@ print '</td></tr></table>';
$db->close();
llxFooter('$Date: 2011/07/31 23:57:02 $ - $Revision: 1.43 $');
llxFooter('$Date: 2011/08/08 15:28:00 $ - $Revision: 1.44 $');
?>

View File

@ -20,8 +20,8 @@
/**
* \file htdocs/fourn/index.php
* \ingroup fournisseur
* \brief Page accueil de la zone fournisseurs
* \version $Id: index.php,v 1.68 2011/07/31 23:57:03 eldy Exp $
* \brief Home page of suppliers area
* \version $Id: index.php,v 1.69 2011/08/08 15:28:01 eldy Exp $
*/
require("../main.inc.php");
@ -223,7 +223,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
}
print "</td>\n";
print '<td valign="top" width="70%" class="notopnoleft">';
print '<td valign="top" width="70%" class="notopnoleftnoright">';
/*
* List last modified supliers
@ -320,5 +320,5 @@ print "</table>\n";
$db->close();
llxFooter('$Date: 2011/07/31 23:57:03 $ - $Revision: 1.68 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.69 $');
?>

View File

@ -20,12 +20,11 @@
*/
/**
\file htdocs/includes/modules/dons/modules_don.php
\ingroup don
\brief Fichier contenant la classe m<EFBFBD>re de generation des dons
\version $Id: modules_don.php,v 1.20 2011/07/31 23:28:14 eldy Exp $
*/
* \file htdocs/includes/modules/dons/modules_don.php
* \ingroup don
* \brief File of class to manage donation document generation
* \version $Id: modules_don.php,v 1.21 2011/08/08 16:07:48 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php");
@ -40,22 +39,22 @@ class ModeleDon
{
var $error='';
/**
* \brief Return list of active generation modules
* \param $db Database handler
*/
function liste_modeles($db)
{
global $conf;
/**
* \brief Return list of active generation modules
* \param $db Database handler
*/
function liste_modeles($db)
{
global $conf;
$type='donation';
$liste=array();
$type='donation';
$liste=array();
include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php');
$liste=getListOfModels($db,$type,'');
include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php');
$liste=getListOfModels($db,$type,'');
return $liste;
}
return $liste;
}
}
@ -67,13 +66,13 @@ class ModeleNumRefDons
{
var $error='';
/** \brief Return if a module can be used or not
* \return boolean true if module can be used
*/
function isEnabled()
{
return true;
}
/** \brief Return if a module can be used or not
* \return boolean true if module can be used
*/
function isEnabled()
{
return true;
}
/** \brief Renvoi la description par defaut du modele de num<EFBFBD>rotation
* \return string Texte descripif
@ -95,7 +94,7 @@ class ModeleNumRefDons
return $langs->trans("NoExample");
}
/** \brief Test si les num<EFBFBD>ros d<EFBFBD>j<EFBFBD> en vigueur dans la base ne provoquent pas de
/** \brief Test si les num<EFBFBD>ros d<EFBFBD>j<EFBFBD> en vigueur dans la base ne provoquent pas d
* de conflits qui empechera cette num<EFBFBD>rotation de fonctionner.
* \return boolean false si conflit, true si ok
*/
@ -113,31 +112,31 @@ class ModeleNumRefDons
return $langs->trans("NotAvailable");
}
/** \brief Renvoi version du module numerotation
* \return string Valeur
*/
function getVersion()
{
global $langs;
$langs->load("admin");
/** \brief Renvoi version du module numerotation
* \return string Valeur
*/
function getVersion()
{
global $langs;
$langs->load("admin");
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
if ($this->version == 'dolibarr') return DOL_VERSION;
return $langs->trans("NotAvailable");
}
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
if ($this->version == 'dolibarr') return DOL_VERSION;
return $langs->trans("NotAvailable");
}
}
/**
\brief Cr<EFBFBD>e un don sur disque en fonction du mod<EFBFBD>le de DON_ADDON_PDF
\param db objet base de donn<EFBFBD>e
\param id id du don <EFBFBD> cr<EFBFBD>er
\param message message
\param modele force le modele <EFBFBD> utiliser ('' par defaut)
\param outputlangs objet lang a utiliser pour traduction
\return int 0 si KO, 1 si OK
*/
\brief Cr<EFBFBD>e un don sur disque en fonction du mod<EFBFBD>le de DON_ADDON_PDF
\param db objet base de donn<EFBFBD>e
\param id id du don <EFBFBD> cr<EFBFBD>er
\param message message
\param modele force le modele <EFBFBD> utiliser ('' par defaut)
\param outputlangs objet lang a utiliser pour traduction
\return int 0 si KO, 1 si OK
*/
function don_create($db, $id, $message, $modele, $outputlangs)
{
global $conf, $langs;
@ -145,24 +144,24 @@ function don_create($db, $id, $message, $modele, $outputlangs)
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/dons/";
// Positionne modele sur le nom du modele <20> utiliser
if (! dol_strlen($modele))
{
if ($conf->global->DON_ADDON_MODEL)
{
$modele = $conf->global->DON_ADDON_MODEL;
}
else
{
print $langs->trans("Error")." ".$langs->trans("Error_DON_ADDON_MODEL_NotDefined");
return 0;
}
}
// Positionne modele sur le nom du modele <20> utiliser
if (! dol_strlen($modele))
{
if ($conf->global->DON_ADDON_MODEL)
{
$modele = $conf->global->DON_ADDON_MODEL;
}
else
{
print $langs->trans("Error")." ".$langs->trans("Error_DON_ADDON_MODEL_NotDefined");
return 0;
}
}
// Charge le modele
$file = $modele.".modules.php";
if (file_exists($dir.$file))
{
// Charge le modele
$file = $modele.".modules.php";
if (file_exists($dir.$file))
{
$classname = $modele;
require_once($dir.$file);
@ -171,9 +170,9 @@ function don_create($db, $id, $message, $modele, $outputlangs)
$obj->message = $message;
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output=$outputlangs->charset_output;
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output=$outputlangs->charset_output;
if ($obj->write_file($id,$outputlangs) > 0)
{
// Succ<63>s de la cr<63>ation de la facture. On g<>n<EFBFBD>re le fichier meta
@ -181,30 +180,30 @@ function don_create($db, $id, $message, $modele, $outputlangs)
// et on supprime l'image correspondant au preview
don_delete_preview($db, $id);
$outputlangs->charset_output=$sav_charset_output;
$outputlangs->charset_output=$sav_charset_output;
return 1;
}
else
{
$outputlangs->charset_output=$sav_charset_output;
dol_syslog("Erreur dans don_create");
$outputlangs->charset_output=$sav_charset_output;
dol_syslog("Erreur dans don_create");
dol_print_error($db,$obj->error);
return 0;
}
}
else
{
print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file);
return 0;
}
else
{
print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file);
return 0;
}
}
/**
\brief Cr<EFBFBD><EFBFBD> un meta fichier <EFBFBD> c<EFBFBD>t<EFBFBD> de la facture sur le disque pour faciliter les recherches en texte plein. Pourquoi ? tout simplement parcequ'en fin d'exercice quand je suis avec mon comptable je n'ai pas de connexion internet "rapide" pour retrouver en 2 secondes une facture non pay<61>e ou compliqu<71>e <20> g<>rer ... avec un rgrep c'est vite fait bien fait [eric seigne]
\param db Objet base de donn<EFBFBD>e
\param donid Id du don <EFBFBD> cr<EFBFBD>er
\param message Message
*/
\brief Cr<EFBFBD><EFBFBD> un meta fichier <EFBFBD> c<EFBFBD>t<EFBFBD> de la facture sur le disque pour faciliter les recherches en texte plein. Pourquoi ? tout simplement parcequ'en fin d'exercice quand je suis avec mon comptable je n'ai pas de connexion internet "rapide" pour retrouver en 2 secondes une facture non pay<61>e ou compliqu<71>e <20> g<>rer ... avec un rgrep c'est vite fait bien fait [eric seigne
\param db Objet base de donn<EFBFBD>e
\param donid Id du don <EFBFBD> cr<EFBFBD>er
\param message Message
*/
function don_meta_create($db, $donid, $message="")
{
global $langs,$conf;
@ -216,13 +215,13 @@ function don_meta_create($db, $donid, $message="")
/**
\brief Supprime l'image de pr<EFBFBD>visualitation, pour le cas de r<EFBFBD>g<EFBFBD>n<EFBFBD>ration de facture
\param db Objet base de donn<EFBFBD>e
\param donid Id du don
*/
\brief Supprime l'image de pr<EFBFBD>visualitation, pour le cas de r<EFBFBD>g<EFBFBD>n<EFBFBD>ration de facture
\param db Objet base de donn<EFBFBD>e
\param donid Id du don
*/
function don_delete_preview($db, $donid)
{
global $langs,$conf;
global $langs,$conf;
$don = new Don($db);
$don->id=$donid;

View File

@ -22,8 +22,8 @@
/**
* \file htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php
* \ingroup livraison
* \brief Fichier de la classe permettant de generer les bons de livraison au mod<EFBFBD>le Sirocco
* \version $Id: pdf_sirocco.modules.php,v 1.77 2011/07/31 23:28:17 eldy Exp $
* \brief File of class to manage receving receipts with template Sirocco
* \version $Id: pdf_sirocco.modules.php,v 1.78 2011/08/08 16:07:48 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT."/includes/modules/livraison/modules_livraison.php");
@ -410,11 +410,11 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
if (! empty($object->linkedObjects))
{
$outputlangs->load('orders');
foreach($object->linkedObjects as $elementtype => $objects)
{
$object->fetchObjectLinked('','',$objects[0]->id,$objects[0]->element);
foreach($object->linkedObjects as $elementtype => $objects)
{
$num=sizeof($objects);

View File

@ -22,9 +22,9 @@
/**
* \file htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php
* \ingroup livraison
* \brief Fichier de la classe permettant de generer les bons de livraison au modele Typhon
* \brief File of class to manage receving receipts with template Typhon
* \author Laurent Destailleur
* \version $Id: pdf_typhon.modules.php,v 1.86 2011/07/31 23:28:17 eldy Exp $
* \version $Id: pdf_typhon.modules.php,v 1.87 2011/08/08 16:07:48 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT."/includes/modules/livraison/modules_livraison.php");
@ -539,11 +539,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if (! empty($object->linkedObjects))
{
$outputlangs->load('orders');
foreach($object->linkedObjects as $elementtype => $objects)
{
$object->fetchObjectLinked('','',$objects[0]->id,$objects[0]->element);
foreach($object->linkedObjects as $elementtype => $objects)
{
$num=sizeof($objects);

View File

@ -1,5 +1,5 @@
--
-- $Id: 3.0.0-3.1.0.sql,v 1.85 2011/08/03 10:55:39 simnandez Exp $
-- $Id: 3.0.0-3.1.0.sql,v 1.86 2011/08/08 16:07:33 hregis Exp $
--
-- Be carefull to requests order.
-- This file must be loaded by calling /install/index.php page
@ -483,3 +483,6 @@ ALTER TABLE llx_don ADD phone varchar(24) after email;
ALTER TABLE llx_user ADD civilite varchar(6) after entity;
ALTER TABLE llx_advanced_extrafields_options DROP COLUMN tms;
ALTER TABLE llx_advanced_extrafields_options CHANGE COLUMN rang pos integer;
ALTER TABLE llx_advanced_extrafields CHANGE COLUMN rang pos integer;

View File

@ -1,5 +1,5 @@
-- ===================================================================
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2010-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
@ -14,7 +14,7 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- $Id: llx_advanced_extrafields.sql,v 1.2 2011/08/03 01:25:29 eldy Exp $
-- $Id: llx_advanced_extrafields.sql,v 1.3 2011/08/08 16:07:33 hregis Exp $
-- ===================================================================
create table llx_advanced_extrafields
@ -26,9 +26,11 @@ create table llx_advanced_extrafields
elementtype varchar(64) NOT NULL, -- type of link 'invoice', 'order', 'proposal', 'invoice_supplier', 'order_supplier'
name varchar(64) NOT NULL, -- code name of field
label varchar(64) NOT NULL,
format varchar(8) NOT NULL, -- date, string, integer, float
type varchar(8) NOT NULL, -- date, string, integer, float
fieldsize integer,
maxlength integer,
options varchar(255),
rang integer
pos integer
)ENGINE=innodb;

View File

@ -1,5 +1,5 @@
-- ===================================================================
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2010-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
@ -14,17 +14,16 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- $Id: llx_advanced_extrafields_options.sql,v 1.2 2011/08/03 01:25:26 eldy Exp $
-- $Id: llx_advanced_extrafields_options.sql,v 1.3 2011/08/08 16:07:33 hregis Exp $
-- ===================================================================
create table llx_advanced_extrafields_options
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_extrafields integer NOT NULL,
value varchar(255) NOT NULL,
rang integer
pos integer
)ENGINE=innodb;

View File

@ -364,7 +364,7 @@ DisabledBecausePayments=No disponible ja que hi ha pagaments
CantRemovePaymentWithOneInvoicePaid=Eliminació impossible quan hi ha almenys una factura classificada com a pagada.
ExpectedToPay=Esperant el pagament
PayedByThisPayment=Pagada per aquest pagament
ClosePaidInvoicesAutomatically=Classificar com "Pagades" les factures completament pagades.
ClosePaidInvoicesAutomatically=Classificar com "Pagades" les factures i facures rectificatives completament pagades.
AllCompletelyPayedInvoiceWillBeClosed=Totes les factures amb una resta a pagar 0 seran automàticament tancades a l'estat "Pagada".
##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Responsable seguiment factura a client

View File

@ -1,4 +1,3 @@
# Dolibarr language file - ca_ES - errors
CHARSET=UTF-8
MenuManager=Gestor de menú
@ -82,4 +81,6 @@ ErrorModuleSetupNotComplete=La configuració del mòdul sembla incompleta. Aneu
ErrorBadMask=Error en la màscara
ErrorBadMaskFailedToLocatePosOfSequence=Error, sense número de seqüència en la màscara
ErrorBadMaskBadRazMonth=Error, valor de tornada a 0 incorrecte
ErrorSelectAtLeastOne=Error. Seleccioneu com a mínim una entrada.
ErrorSelectAtLeastOne=Error. Seleccioneu com a mínim una entrada.
ErrorProductWithRefNotExist=La referència de producte '<i>%s</i>' no existeix
ErrorDeleteNotPossibleLineIsConsolidated=Eliminació impossible ja que el registre està enllaçat a una transacció bancària conciliada

View File

@ -364,7 +364,7 @@ DisabledBecausePayments=No disponible ya que existen pagos
CantRemovePaymentWithOneInvoicePaid=Eliminación imposible cuando existe al menos una factura clasificada como pagada.
ExpectedToPay=Esperando el pago
PayedByThisPayment=Pagada por este pago
ClosePaidInvoicesAutomatically=Clasificar como "Pagadas" las facturas completamente pagadas.
ClosePaidInvoicesAutomatically=Clasificar como "Pagadas" las facturas y facturas rectificativas completamente pagadas.
AllCompletelyPayedInvoiceWillBeClosed=Todas las facturas con un resto a pagar 0 serán automáticamente cerradas al estado "Pagada".
##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Responsable seguimiento factura a cliente

View File

@ -81,4 +81,6 @@ ErrorModuleSetupNotComplete=La configuración del módulo parece incompleta. Vay
ErrorBadMask=Error en la máscara
ErrorBadMaskFailedToLocatePosOfSequence=Error, sin número de secuencia en la máscara
ErrorBadMaskBadRazMonth=Error, valor de vuelta a 0 incorrecto
ErrorSelectAtLeastOne=Error. Seleccione al menos una entrada.
ErrorSelectAtLeastOne=Error. Seleccione al menos una entrada.
ErrorProductWithRefNotExist=La referencia de producto '<i>%s</i>' no existe
ErrorDeleteNotPossibleLineIsConsolidated=Eliminación imposible ya que el registro está enlazado a una transacción bancaria conciliada

View File

@ -18,11 +18,16 @@
*/
/**
* \mainpage Dolibarr project
*
* This is source documentation for Dolibarr ERP/CRM.<br>
* This documentation can be built or updated running the script <b>dolibarr-doxygen-build.pl</b> or from Eclipse with Doxygen plugin.<br>
* <br>
* Dolibarr official web site: <a href="http://www.dolibarr.org">www.dolibarr.org</a><br>
* Dolibarr site francophone: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br>
*/
* \mainpage Dolibarr project
* \file htdocs/lib/doxygen.php
* \ingroup core
* \brief Page used as doxygen documentation header
* \version $Id: doxygen.php,v 1.7 2011/08/08 16:07:48 eldy Exp $
*
* This is source documentation for Dolibarr ERP/CRM.<br>
* This documentation can be built or updated running the script <b>dolibarr-doxygen-build.pl</b> or from Eclipse with Doxygen plugin.<br>
* <br>
* Dolibarr official web site: <a href="http://www.dolibarr.org">www.dolibarr.org</a><br>
* Dolibarr site francophone: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br>
*/
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/commande.php
* \ingroup product, service, commande
* \ingroup product service commande
* \brief Page des stats des commandes clients pour un produit
* \version $Id: commande.php,v 1.47 2011/07/31 23:24:00 eldy Exp $
* \version $Id: commande.php,v 1.48 2011/08/08 16:07:47 eldy Exp $
*/
require("../../main.inc.php");
@ -190,5 +190,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.47 $');
llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.48 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/commande_fournisseur.php
* \ingroup product, service, commande
* \ingroup product service commande
* \brief Page des stats des commandes fournisseurs pour un produit
* \version $Id: commande_fournisseur.php,v 1.33 2011/07/31 23:24:00 eldy Exp $
* \version $Id: commande_fournisseur.php,v 1.34 2011/08/08 16:07:47 eldy Exp $
*/
require("../../main.inc.php");
@ -184,5 +184,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.33 $');
llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.34 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/contrat.php
* \ingroup product, service, contrat
* \ingroup product service contrat
* \brief Page des stats des contrats pour un produit
* \version $Id: contrat.php,v 1.46 2011/07/31 23:24:00 eldy Exp $
* \version $Id: contrat.php,v 1.47 2011/08/08 16:07:48 eldy Exp $
*/
require("../../main.inc.php");
@ -202,5 +202,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.46 $');
llxFooter('$Date: 2011/08/08 16:07:48 $ - $Revision: 1.47 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/facture.php
* \ingroup product, service, facture
* \ingroup product service facture
* \brief Page des stats des factures clients pour un produit
* \version $Id: facture.php,v 1.83 2011/07/31 23:24:00 eldy Exp $
* \version $Id: facture.php,v 1.84 2011/08/08 16:07:47 eldy Exp $
*/
require("../../main.inc.php");
@ -193,5 +193,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.83 $');
llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.84 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/facture_fournisseur.php
* \ingroup product, service, facture
* \ingroup product service facture
* \brief Page des stats des factures fournisseurs pour un produit
* \version $Id: facture_fournisseur.php,v 1.32 2011/07/31 23:24:00 eldy Exp $
* \version $Id: facture_fournisseur.php,v 1.33 2011/08/08 16:07:47 eldy Exp $
*/
require("../../main.inc.php");
@ -194,5 +194,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.32 $');
llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.33 $');
?>

View File

@ -21,8 +21,8 @@
/**
* \file htdocs/product/stats/fiche.php
* \ingroup product
* \brief Page des stats produits
* \version $Id: fiche.php,v 1.110 2011/07/31 23:24:00 eldy Exp $
* \brief Page of product statistics
* \version $Id: fiche.php,v 1.111 2011/08/08 16:07:48 eldy Exp $
*/
require("../../main.inc.php");
@ -161,7 +161,7 @@ if ($_GET["id"] || $_GET["ref"])
);
$px = new DolGraph();
if (! $error)
{
$mesg = $px->isGraphKo();
@ -170,9 +170,9 @@ if ($_GET["id"] || $_GET["ref"])
foreach($graphfiles as $key => $val)
{
if (! $graphfiles[$key]['file']) continue;
$graph_data = array();
// TODO Test si deja existant et recent, on ne genere pas
if ($key == 'propal') $graph_data = $product->get_nb_propal($socid,$mode);
if ($key == 'orders') $graph_data = $product->get_nb_order($socid,$mode);
@ -189,7 +189,7 @@ if ($_GET["id"] || $_GET["ref"])
$px->SetPrecisionY(0);
$px->SetShading(3);
//print 'x '.$key.' '.$graphfiles[$key]['file'];
$px->draw($dir."/".$graphfiles[$key]['file']);
}
else
@ -198,10 +198,10 @@ if ($_GET["id"] || $_GET["ref"])
}
}
}
$mesg = $langs->trans("ChartGenerated");
}
// Show graphs
$i=0;
foreach($graphfiles as $key => $val)
@ -270,5 +270,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.110 $');
llxFooter('$Date: 2011/08/08 16:07:48 $ - $Revision: 1.111 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/product/stats/propal.php
* \ingroup product, service, propal
* \ingroup product service propal
* \brief Page des stats des propals pour un produit
* \version $Id: propal.php,v 1.57 2011/07/31 23:24:00 eldy Exp $
* \version $Id: propal.php,v 1.58 2011/08/08 16:07:47 eldy Exp $
*/
@ -184,5 +184,5 @@ else
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.57 $');
llxFooter('$Date: 2011/08/08 16:07:47 $ - $Revision: 1.58 $');
?>

View File

@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id: index.php,v 1.31 2011/07/31 23:24:01 eldy Exp $
* $Id: index.php,v 1.32 2011/08/08 15:28:01 eldy Exp $
*/
/**
* \file htdocs/product/stock/index.php
* \ingroup stock
* \brief Page accueil stocks produits
* \version $Revision: 1.31 $
* \brief Home page of stock area
* \version $Revision: 1.32 $
*/
require("../../main.inc.php");
@ -103,7 +103,7 @@ else
dol_print_error($db);
}
print '</td><td valign="top" width="70%" class="notopnoleft">';
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
// Last movements
$max=10;
@ -163,5 +163,5 @@ print '</td></tr></table>';
$db->close();
llxFooter('$Date: 2011/07/31 23:24:01 $ - $Revision: 1.31 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.32 $');
?>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
@ -21,9 +21,9 @@
/**
* \file htdocs/product/stock/product.php
* \ingroup product, stock
* \ingroup product stock
* \brief Page to list detailed stock of a product
* \version $Id: product.php,v 1.108 2011/07/31 23:24:00 eldy Exp $
* \version $Id: product.php,v 1.109 2011/08/08 16:07:48 eldy Exp $
*/
require("../../main.inc.php");
@ -518,5 +518,5 @@ print "</table>";
$db->close();
llxFooter('$Date: 2011/07/31 23:24:00 $ - $Revision: 1.108 $');
llxFooter('$Date: 2011/08/08 16:07:48 $ - $Revision: 1.109 $');
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/projet/activity/index.php
* \ingroup projet
* \brief Page activite perso du module projet
* \version $Id: index.php,v 1.36 2011/07/31 23:23:39 eldy Exp $
* \version $Id: index.php,v 1.37 2011/08/08 15:28:01 eldy Exp $
*/
require ("../../main.inc.php");
@ -126,7 +126,7 @@ print "</table>";
// TODO Do not use date_add function to be compatible with all database
if ($db->type != 'pgsql')
{
/* Affichage de la liste des projets d'hier */
print '<br><table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -181,7 +181,7 @@ print "</table>";
}
print '</td><td width="70%" valign="top" class="notopnoleft">';
print '</td><td width="70%" valign="top" class="notopnoleftright">';
// TODO Do not use week function to be compatible with all database
if ($db->type != 'pgsql')
@ -331,5 +331,5 @@ print '</td></tr></table>';
$db->close();
llxFooter('$Date: 2011/07/31 23:23:39 $ - $Revision: 1.36 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.37 $');
?>

View File

@ -16,10 +16,10 @@
*/
/**
* \file htdocs/projet/ganttview.php
* \file htdocs/projet/ganttchart.php
* \ingroup projet
* \brief Gantt diagrame of a project
* \version $Id: ganttchart.php,v 1.7 2011/07/31 23:23:36 eldy Exp $
* \brief Gantt diagram of a project
* \version $Id: ganttchart.php,v 1.8 2011/08/08 16:00:46 eldy Exp $
*/
?>

View File

@ -21,7 +21,7 @@
* \file htdocs/projet/index.php
* \ingroup projet
* \brief Main project home page
* \version $Id: index.php,v 1.75 2011/07/31 23:23:39 eldy Exp $
* \version $Id: index.php,v 1.76 2011/08/08 15:28:01 eldy Exp $
*/
require("../main.inc.php");
@ -71,7 +71,7 @@ print '<tr><td width="30%" valign="top" class="notopnoleft">';
print_projecttasks_array($db,$socid,$projectsListId);
print '</td><td width="70%" valign="top" class="notopnoleft">';
print '</td><td width="70%" valign="top" class="notopnoleftnoright">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@ -130,5 +130,5 @@ print '</td></tr></table>';
$db->close();
llxFooter('$Date: 2011/07/31 23:23:39 $ - $Revision: 1.75 $');
llxFooter('$Date: 2011/08/08 15:28:01 $ - $Revision: 1.76 $');
?>

View File

@ -17,13 +17,13 @@
*/
/**
* \file htdocs/public/paybox/paymentko.php
* \ingroup paybox
* \file htdocs/public/paypal/paymentko.php
* \ingroup paypal
* \brief File to show page after a failed payment.
* This page is called by paypal with url provided to payal competed with parameter TOKEN=xxx
* This token can be used to get more informations.
* \author Laurent Destailleur
* \version $Id: paymentko.php,v 1.7 2011/07/31 23:23:20 eldy Exp $
* \version $Id: paymentko.php,v 1.8 2011/08/08 16:00:19 eldy Exp $
*/
define("NOLOGIN",1); // This means this output page does not require to be logged.
@ -81,5 +81,5 @@ html_print_paypal_footer($mysoc,$langs);
$db->close();
llxFooterPaypal('$Date: 2011/07/31 23:23:20 $ - $Revision: 1.7 $');
llxFooterPaypal('$Date: 2011/08/08 16:00:19 $ - $Revision: 1.8 $');
?>

View File

@ -19,9 +19,9 @@
/**
* \file htdocs/societe/notify/fiche.php
* \ingroup societe, notification
* \ingroup societe notification
* \brief Tab for notifications of third party
* \version $Id: fiche.php,v 1.70 2011/07/31 23:22:58 eldy Exp $
* \version $Id: fiche.php,v 1.71 2011/08/08 16:00:16 eldy Exp $
*/
require("../../main.inc.php");
@ -349,6 +349,6 @@ if ( $soc->fetch($soc->id) )
$db->close();
llxFooter('$Date: 2011/07/31 23:22:58 $ - $Revision: 1.70 $');
llxFooter('$Date: 2011/08/08 16:00:16 $ - $Revision: 1.71 $');
?>

View File

@ -20,7 +20,7 @@
/**
* \file htdocs/theme/auguria/style.css.php
* \brief Fichier de style CSS du theme auguria
* \version $Id: style.css.php,v 1.92 2011/07/31 23:22:04 eldy Exp $
* \version $Id: style.css.php,v 1.96 2011/08/08 15:39:08 eldy Exp $
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -81,6 +81,11 @@ body {
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: bold; color: #000000; text-decoration: none; }
/*
input:focus, textarea:focus, button:focus, select:focus {
box-shadow: 0 0 4px #8091BF;
}
*/
input {
font-size: <?php print $fontsize ?>px;
font-family: <?php print $fontlist ?>;
@ -194,8 +199,8 @@ td.vmenu {
}
div.fiche {
margin-<?php print $left; ?>: 4px;
margin-<?php print $right; ?>: 4px;
margin-<?php print $left; ?>: 10px;
margin-<?php print $right; ?>: 6px;
}
/* ============================================================================== */
@ -1026,7 +1031,7 @@ border-collapse: collapse;
border: 0px;
padding-top: 0px;
padding-<?php print $left; ?>: 0px;
padding-<?php print $right; ?>: 4px;
padding-<?php print $right; ?>: 10px;
padding-bottom: 4px;
margin: 0px 0px;
}
@ -1319,9 +1324,9 @@ div.info {
color: #707070;
padding: 0.2em 0.2em 0.2em 0.2em;
margin: 0.5em 0em 0.5em 0em;
border: 1px solid #c0c0d0;
border: 1px solid #DFDFA0;
-moz-border-radius:6px;
background: #efefd4;
background: #EFEFD4;
}

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/theme/eldy/style.css.php
* \brief Fichier de style CSS du theme Eldy
* \version $Id: style.css.php,v 1.94 2011/08/07 22:58:48 eldy Exp $
* \version $Id: style.css.php,v 1.98 2011/08/08 15:39:08 eldy Exp $
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -85,6 +85,11 @@ body {
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: bold; color: #000000; text-decoration: none; }
/*
input:focus, textarea:focus, button:focus, select:focus {
box-shadow: 0 0 4px #8091BF;
}
*/
input {
font-size: <?php print $fontsize ?>px;
font-family: <?php print $fontlist ?>;
@ -197,8 +202,8 @@ td.vmenu {
}
div.fiche {
margin-<?php print $left; ?>: 6px;
margin-<?php print $right; ?>: 5px;
margin-<?php print $left; ?>: 10px;
margin-<?php print $right; ?>: 6px;
}
/* ============================================================================== */
@ -1012,7 +1017,7 @@ border-collapse: collapse;
border: 0px;
padding-top: 0px;
padding-<?php print $left; ?>: 0px;
padding-<?php print $right; ?>: 4px;
padding-<?php print $right; ?>: 8px;
padding-bottom: 4px;
margin: 0px 0px;
}
@ -1282,7 +1287,7 @@ div.error {
color: #550000; font-weight: bold;
padding: 0.2em 0.2em 0.2em 0.2em;
margin: 0.5em 0em 0.5em 0em;
border: 1px solid #8C9CAB;
border: 1px solid #DC9CAB;
-moz-border-radius:6px;
-webkit-border-radius: 6px;
border-radius: 6px;
@ -1294,11 +1299,11 @@ div.info {
color: #707070;
padding: 0.2em 0.2em 0.2em 0.2em;
margin: 0.5em 0em 0.5em 0em;
border: 1px solid #e0e0d0;
border: 1px solid #DFDFA0;
-moz-border-radius:6px;
-webkit-border-radius: 6px;
border-radius:6px;
background: #efefd4;
background: #EFEFD4;
}