Library functions must be in lib directory

This commit is contained in:
Laurent Destailleur
2008-11-15 21:10:10 +00:00
parent be88f4c7c9
commit 1091f72a8f
9 changed files with 290 additions and 277 deletions

View File

@@ -158,7 +158,7 @@ print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"name","",'&amp;year='.($year).'&modecompta='.$modecompta,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Percentage"),$_SERVER["PHP_SELF"],"amount_ttc","",'&amp;year='.($year).'&modecompta='.$modecompta,'align="right"',$sortfield,$sortorder);
if ($conf->global->MAIN_FEATURES_LEVEL == 2) print_liste_field_titre($langs->trans("OrderStats"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"');
if ($conf->commande->enabled && $conf->global->MAIN_FEATURES_LEVEL == 2) print_liste_field_titre($langs->trans("OrderStats"),$_SERVER["PHP_SELF"],"","","",'align="center" width="20%"');
print "</tr>\n";
$var=true;
@@ -199,7 +199,7 @@ if (sizeof($amount))
print "<td>".$linkname."</td>\n";
print '<td align="right">'.price($amount[$key]).'</td>';
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal,2).'%' : '&nbsp;').'</td>';
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
if ($conf->commande->enabled && $conf->global->MAIN_FEATURES_LEVEL == 2)
{
if($key>0){
print '<td align="center"><a href="comm.php?id='.$key.'">'.img_picto($langs->trans("Show"),"vcard").'</a></td>';
@@ -213,7 +213,7 @@ if (sizeof($amount))
// Total
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.price($catotal).'</td><td>&nbsp;</td>';
if ($conf->global->MAIN_FEATURES_LEVEL == 2) print '<td>&nbsp;</td>';
if ($conf->commande->enabled && $conf->global->MAIN_FEATURES_LEVEL == 2) print '<td>&nbsp;</td>';
print '</tr>';
$db->free($result);

View File

@@ -19,11 +19,10 @@
*/
/**
\file htdocs/comm/index.php
\ingroup commercial
\brief Page acceuil de la zone commercial cliente
\version $Id$
*/
* \file htdocs/compta/stats/comm.php
* \ingroup commercial
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");

View File

@@ -15,16 +15,26 @@
* 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.
*
* $Id$
* $Source$
*
*/
/**
* \file htdocs/compta/stats/comp.php
* \ingroup commercial
* \version $Id$
*/
require("./pre.inc.php");
require("./lib.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/accountancy.lib.php");
// Security check
if ($user->societe_id > 0)
{
$socid = $user->societe_id;
}
function propals ($db, $year, $month) {
function propals ($db, $year, $month)
{
global $bc,$langs;
$sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c";
@@ -167,7 +177,8 @@ function factures ($db, $year, $month, $paye) {
}
function pt ($db, $sql, $year) {
function pt ($db, $sql, $year)
{
global $bc, $langs;
$result = $db->query($sql);
@@ -315,18 +326,11 @@ function ppt ($db, $year, $socid)
/*
*
* View
*/
llxHeader();
/*
* S<>curit<69> acc<63>s client
*/
if ($user->societe_id > 0)
{
$socid = $user->societe_id;
}
$cyear = isset($_GET["year"])?$_GET["year"]:0;
if (! $cyear) { $cyear = strftime ("%Y", time()); }
@@ -346,5 +350,5 @@ if ($details == 1)
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
llxFooter('$Date$ - $Revision$');
?>

View File

@@ -503,9 +503,9 @@ class MenuLeft {
// Compta simple
if ($conf->compta->enabled)
{
$newmenu->add(DOL_URL_ROOT."/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Ventilation"),0,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/liste.php",$langs->trans("A ventiler"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/lignes.php",$langs->trans("Ventil<EFBFBD>es"),1,$user->rights->compta->ventilation->lire);
$newmenu->add(DOL_URL_ROOT."/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/lignes.php",$langs->trans("Dispatched"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Setup"),1,$user->rights->compta->ventilation->parametrer);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/comptes/fiche.php?action=create",$langs->trans("New"),2,$user->rights->compta->ventilation->parametrer);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->parametrer);

View File

@@ -484,9 +484,9 @@ class MenuLeft {
/*
if ($conf->compta->enabled)
{
$newmenu->add(DOL_URL_ROOT."/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Ventilation"),0,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/liste.php",$langs->trans("A ventiler"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/lignes.php",$langs->trans("Ventil<EFBFBD>es"),1,$user->rights->compta->ventilation->lire);
$newmenu->add(DOL_URL_ROOT."/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/ventilation/lignes.php",$langs->trans("Dispatched"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Setup"),1,$user->rights->compta->ventilation->parametrer);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/comptes/fiche.php?action=create",$langs->trans("New"),2,$user->rights->compta->ventilation->parametrer);
if ($leftmenu=="ventil") $newmenu->add(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->parametrer);

View File

@@ -99,3 +99,6 @@ RulesVATIn=- Pour les services, le rapport inclut les TVA des r
RulesVATDue=- Pour les services, le rapport inclut les TVA des factures dues, pay<61>es ou non en se basant sur la date de validation de ces factures.<br>- Pour les biens mat<61>riels, il inclut les TVA des factures en se basant sur la date de validation de la facture.
OptionVatInfoModuleComptabilite=Remarque : Pour les biens mat<61>riels, il faudrait utiliser la date de livraison pour <20>tre plus juste.
PercentOfInvoice=%%/invoice
Dispatch=Dispatching
Dispatched=Dispatched
ToDispatch=To dispatch

View File

@@ -100,3 +100,6 @@ RulesVATDue=- Pour les services, le rapport inclut les TVA des factures dues, pa
OptionVatInfoModuleComptabilite=Remarque : Pour les biens mat<61>riels, il faudrait utiliser la date de livraison pour <20>tre plus juste.
PercentOfInvoice=%%/facture
OrderStats=Statistiques sur les commandes
Dispatch=Ventilation
Dispatched=Ventil<69>s
ToDispatch=A ventiler

View File

@@ -15,11 +15,15 @@
* 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.
*
* $Id$
* $Source$
*/
/**
* \file htdocs/lib/accountancy.lib.php
* \brief Library of accountancy functions
* \version $Id$
*/
function get_ca_propal ($db, $year, $socid)
{

View File

@@ -19,10 +19,10 @@
*/
/**
\file htdocs/lib/admin.lib.php
\brief Library of admin functions
\version $Id$
*/
* \file htdocs/lib/admin.lib.php
* \brief Library of admin functions
* \version $Id$
*/
/**