Remove pre.inc.php
This commit is contained in:
parent
8e398cc069
commit
d2aff43936
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require_once("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
|
||||
|
||||
@ -24,9 +24,9 @@
|
||||
*/
|
||||
|
||||
|
||||
/*! \class ComptaCompte
|
||||
\brief Classe permettant la gestion des comptes generaux de compta
|
||||
*/
|
||||
/** \class ComptaCompte
|
||||
* \brief Classe permettant la gestion des comptes generaux de compta
|
||||
*/
|
||||
|
||||
class ComptaCompte
|
||||
{
|
||||
@ -41,28 +41,28 @@ class ComptaCompte
|
||||
* \param DB handler acces base de donnees
|
||||
* \param id id compte (0 par defaut)
|
||||
*/
|
||||
|
||||
|
||||
function ComptaCompte($DB, $id=0)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Insere le produit en base
|
||||
* \param user utilisateur qui effectue l'insertion
|
||||
*/
|
||||
|
||||
function create($user)
|
||||
|
||||
function create($user)
|
||||
{
|
||||
if (strlen(trim($this->numero)) && strlen(trim($this->intitule)))
|
||||
{
|
||||
$sql = "SELECT count(*)";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux ";
|
||||
$sql .= " WHERE numero = '" .trim($this->numero)."'";
|
||||
|
||||
|
||||
$resql = $this->db->query($sql) ;
|
||||
|
||||
|
||||
if ( $resql )
|
||||
{
|
||||
$row = $this->db->fetch_array($resql);
|
||||
@ -70,12 +70,12 @@ class ComptaCompte
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."compta_compte_generaux (date_creation, fk_user_author, numero,intitule)";
|
||||
$sql .= " VALUES (".$this->db->idate(mktime()).",".$user->id.",'".$this->numero."','".$this->intitule."')";
|
||||
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ( $resql )
|
||||
{
|
||||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX."compta_compte_generaux");
|
||||
|
||||
|
||||
if ($id > 0)
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require('./pre.inc.php');
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/includes/modules/facture/modules_facture.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php');
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
include_once('./pre.inc.php');
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
include_once("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
include_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
include_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require('./pre.inc.php');
|
||||
require('../../main.inc.php');
|
||||
include_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/paiement/pre.inc.php
|
||||
* \ingroup compta
|
||||
* \brief Fichier gestionnaire du menu compta paiement
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
$langs->load("propal");
|
||||
|
||||
function llxHeader($head = '', $title='', $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
$langs->load("compta");
|
||||
$langs->load("propal");
|
||||
|
||||
top_menu($head, $title, $target);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add("index.php",$langs->trans("Contributions"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,135 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/pre.inc.php
|
||||
* \ingroup compta
|
||||
* \brief Fichier gestionnaire du menu compta
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
|
||||
|
||||
function llxHeader($head = '', $title='', $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
// Les recettes
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
{
|
||||
$langs->load("propal");
|
||||
$menu->add(DOL_URL_ROOT."/compta/propal.php",$langs->trans("Prop"));
|
||||
}
|
||||
|
||||
if ($conf->contrat->enabled)
|
||||
{
|
||||
$langs->load("contracts");
|
||||
$menu->add(DOL_URL_ROOT."/contrat/",$langs->trans("Contracts"));
|
||||
}
|
||||
|
||||
if ($conf->don->enabled)
|
||||
{
|
||||
$langs->load("donations");
|
||||
$menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations"));
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
{
|
||||
$langs->load("bills");
|
||||
$menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php", $langs->trans("Repeatable"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"));
|
||||
}
|
||||
|
||||
|
||||
if ($conf->commande->enabled && $conf->facture->enabled)
|
||||
{
|
||||
$langs->load("orders");
|
||||
$menu->add(DOL_URL_ROOT."/compta/commande/liste.php?leftmenu=orders&afacturer=1", $langs->trans("MenuOrdersToBill"));
|
||||
}
|
||||
|
||||
// Les depenses
|
||||
if ($conf->fournisseur->enabled)
|
||||
{
|
||||
$langs->load("suppliers");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||
}
|
||||
|
||||
if ($conf->deplacement->enabled)
|
||||
{
|
||||
$langs->load("trips");
|
||||
$menu->add(DOL_URL_ROOT."/compta/deplacement/", $langs->trans("Trips"));
|
||||
}
|
||||
|
||||
if ($conf->tax->enabled && $conf->compta->tva && $user->societe_id == 0)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/compta/tva/index.php",$langs->trans("VAT"));
|
||||
}
|
||||
|
||||
if ($conf->tax->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/compta/charges/index.php",$langs->trans("Charges"));
|
||||
}
|
||||
|
||||
|
||||
// Vision des recettes-depenses
|
||||
if ($conf->banque->enabled && $user->rights->banque->lire)
|
||||
{
|
||||
$langs->load("banks");
|
||||
$menu->add(DOL_URL_ROOT."/compta/bank/",$langs->trans("Bank"));
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/stats/",$langs->trans("Reportings"));
|
||||
|
||||
if ($conf->prelevement->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders"));
|
||||
}
|
||||
|
||||
if ($conf->compta->enabled)
|
||||
{
|
||||
if ($user->rights->compta->ventilation->creer)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
|
||||
}
|
||||
|
||||
if ($user->rights->compta->ventilation->parametrer)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param"));
|
||||
}
|
||||
}
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -24,7 +24,7 @@
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/commonobject.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
||||
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
/**
|
||||
\file htdocs/compta/prelevement/bon.php
|
||||
\ingroup prelevement
|
||||
\brief Fiche aper<EFBFBD>u du bon de prelevement
|
||||
\brief Fiche apercu du bon de prelevement
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("widthdrawals");
|
||||
|
||||
@ -66,7 +66,7 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
$urladd= "&statut=".$_GET["statut"];
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, "bons.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
@ -79,10 +79,10 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"');
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<form action="bons.php" method="GET">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ligne" value="'. $_GET["search_ligne"].'" size="10"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ligne" value="'. $_GET["search_ligne"].'" size="10"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'"></td>';
|
||||
print '</form>';
|
||||
@ -110,7 +110,7 @@ if ($result)
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||
|
||||
// Security check
|
||||
|
||||
@ -18,12 +18,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/create.php
|
||||
\brief Prelevement
|
||||
\version $Id$
|
||||
* \file htdocs/compta/prelevement/create.php
|
||||
* \brief Prelevement
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/modPrelevement.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/societe.class.php";
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/demandes.php
|
||||
\brief Page de la liste des demandes de pr<EFBFBD>l<EFBFBD>vements
|
||||
\brief Page de la liste des demandes de prelevements
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT."/includes/modules/modPrelevement.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/societe.class.php";
|
||||
|
||||
@ -21,17 +21,17 @@
|
||||
/**
|
||||
\file htdocs/compta/prelevement/factures.php
|
||||
\ingroup prelevement
|
||||
\brief Page liste des factures prélevées
|
||||
\brief Page liste des factures prelevees
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
// Sécurité accés client
|
||||
// S<EFBFBD>curit<EFBFBD> acc<63>s client
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
@ -39,31 +39,31 @@ llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
if ($conf->use_preview_tabs)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Preview");
|
||||
$h++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Lines");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Bills");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Rejects");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Statistics");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
|
||||
if ($_GET["id"])
|
||||
@ -79,7 +79,7 @@ if ($_GET["id"])
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
else
|
||||
@ -121,7 +121,7 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
$urladd = "&id=".$_GET["id"];
|
||||
|
||||
print_barre_liste("", $page, "factures.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
@ -140,7 +140,7 @@ if ($result)
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
@ -193,7 +193,7 @@ if ($result)
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -17,17 +17,16 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/paiement.class.php";
|
||||
|
||||
|
||||
/*
|
||||
* Sécurite acces client
|
||||
* Security check
|
||||
*/
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -36,21 +35,21 @@ llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Fiche");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Factures");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/rejets.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Rejets");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Statistiques");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$prev_id = $_GET["id"];
|
||||
|
||||
@ -97,12 +96,12 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste("Prélèvements rejetés", $page, "rejets.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print_barre_liste("Pr<EFBFBD>l<EFBFBD>vements rejet<65>s", $page, "rejets.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Bon N°","rejets.php","p.ref",'',$urladd);
|
||||
print_liste_field_titre("Bon N<EFBFBD>","rejets.php","p.ref",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Invoice"),"rejets.php","p.facnumber",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("ThirdParty"),"rejets.php","s.nom",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Amount"),"rejets.php","f.total_ttc","",$urladd,'align="center"');
|
||||
@ -114,7 +113,7 @@ if ($result)
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
@ -123,7 +122,7 @@ if ($result)
|
||||
print "<td>";
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">';
|
||||
print img_file();
|
||||
print img_file();
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
|
||||
@ -133,7 +132,7 @@ if ($result)
|
||||
|
||||
print '<td align="center">'.price($obj->total_ttc)."</td>\n";
|
||||
|
||||
print '<td><b>Rejeté</b></td><td>';
|
||||
print '<td><b>Rejet<EFBFBD></b></td><td>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -147,7 +146,7 @@ if ($result)
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
// Sécurité accés client
|
||||
// Securite acces client
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
@ -34,31 +34,31 @@ llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
if ($conf->use_preview_tabs)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Preview");
|
||||
$h++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Lines");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Bills");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Rejects");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Statistics");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$prev_id = $_GET["id"];
|
||||
|
||||
@ -73,7 +73,7 @@ if ($_GET["id"])
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
else
|
||||
@ -110,7 +110,7 @@ if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -122,7 +122,7 @@ if ($resql)
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
print '<img border="0" src="./statut'.$obj->statut.'.png"></a> ';
|
||||
@ -151,7 +151,7 @@ if ($resql)
|
||||
print "</tr>\n</table>\n";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
// Sécurité accés client
|
||||
// Security check
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
|
||||
@ -36,13 +36,13 @@ llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
if ($conf->use_preview_tabs)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Preview");
|
||||
$h++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
||||
@ -51,16 +51,16 @@ $h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Bills");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Rejects");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Statistics");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$prev_id = $_GET["id"];
|
||||
|
||||
@ -77,7 +77,7 @@ if ($prev_id)
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
else
|
||||
@ -93,25 +93,25 @@ if ($prev_id)
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
$sql.= " WHERE pl.fk_prelevement_bons = ".$prev_id;
|
||||
$sql.= " GROUP BY pl.statut";
|
||||
|
||||
|
||||
if ($db->query($sql))
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>Statut</td><td align="right">Montant</td><td align="right">%</td></tr>';
|
||||
|
||||
|
||||
$var=false;
|
||||
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row();
|
||||
|
||||
$row = $db->fetch_row();
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
|
||||
if ($row[1] == 2)
|
||||
{
|
||||
print 'Credite';
|
||||
@ -124,28 +124,28 @@ if ($prev_id)
|
||||
{
|
||||
print 'En attente';
|
||||
}
|
||||
else print 'Unknown';
|
||||
else print 'Unknown';
|
||||
|
||||
print '</td><td align="right">';
|
||||
print price($row[0]);
|
||||
print '</td><td align="right">';
|
||||
print price($row[0]);
|
||||
|
||||
print '</td><td align="right">';
|
||||
print round($row[0]/$bon->amount*100,2)." %";
|
||||
print '</td><td align="right">';
|
||||
print round($row[0]/$bon->amount*100,2)." %";
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
if (!$user->rights->prelevement->bons->lire)
|
||||
accessforbidden();
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once DOL_DOCUMENT_ROOT."/includes/modules/modPrelevement.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/societe.class.php";
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -40,8 +38,8 @@ class LignePrelevement
|
||||
var $db;
|
||||
|
||||
var $statuts = array();
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB Handler acces base de donnees
|
||||
@ -65,9 +63,9 @@ class LignePrelevement
|
||||
function fetch($rowid)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$result = 0;
|
||||
|
||||
|
||||
$sql = "SELECT pl.rowid, pl.amount, p.ref, p.rowid as bon_rowid";
|
||||
$sql.= ", pl.statut, pl.fk_soc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
@ -75,13 +73,13 @@ class LignePrelevement
|
||||
$sql.= " WHERE pl.rowid=".$rowid;
|
||||
$sql.= " AND p.rowid = pl.fk_prelevement_bons";
|
||||
$sql.= " AND p.entity = ".$conf->entity;
|
||||
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
if ($this->db->num_rows())
|
||||
{
|
||||
$obj = $this->db->fetch_object();
|
||||
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->amount = $obj->amount;
|
||||
$this->socid = $obj->fk_soc;
|
||||
@ -106,7 +104,7 @@ class LignePrelevement
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/ligne-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
@ -21,11 +21,12 @@
|
||||
/*
|
||||
* \version $Id$
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
// Sécurité accés client
|
||||
// Security check
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
|
||||
@ -81,7 +82,7 @@ if ($_GET["id"])
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
else
|
||||
@ -164,7 +165,7 @@ if ($result)
|
||||
|
||||
if ($obj->statut == 3)
|
||||
{
|
||||
print '<b>Rejeté</b>';
|
||||
print '<b>Rejet<EFBFBD></b>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("companies");
|
||||
|
||||
@ -21,11 +21,11 @@
|
||||
/**
|
||||
\file htdocs/compta/prelevement/liste_factures.php
|
||||
\ingroup prelevement
|
||||
\brief Page liste des factures prélevées
|
||||
\brief Page liste des factures prelevees
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
@ -88,7 +88,7 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
$urladd = "&socid=".$_GET["socid"];
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawedBills"), $page, "liste_factures.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
@ -120,7 +120,7 @@ if ($result)
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
|
||||
@ -155,7 +155,7 @@ if ($result)
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -1,76 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/prelevement/pre.inc.php
|
||||
\ingroup prelevement
|
||||
\brief Fichier gestionnaire du menu prelevement
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/compta/prelevement/bon-prelevement.class.php";
|
||||
|
||||
$langs->load("banks");
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("bills");
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
if ($conf->prelevement->enabled)
|
||||
{
|
||||
|
||||
if ($user->rights->prelevement->bons->lire)
|
||||
{
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders"));
|
||||
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/create.php",$langs->trans("NewStandingOrder"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/bons.php",$langs->trans("Receipts"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/liste.php",$langs->trans("List"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/liste_factures.php",$langs->trans("Bills"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/rejets.php",$langs->trans("Rejects"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/stats.php",$langs->trans("Statistics"));
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/config.php",$langs->trans("Setup"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/prelevement/demandes.php",$langs->trans("Demandes"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/demandes.php",$langs->trans("StandingOrderToProcess"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/prelevement/demandes.php?statut=1",$langs->trans("StandingOrderProcessed"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$langs->load("bills");
|
||||
$menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("BillsUnpaid"));
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -17,7 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -53,7 +52,7 @@ class RejetPrelevement
|
||||
$this->motifs[0] = "Non renseigne";
|
||||
$this->motifs[1] = "Provision insuffisante";
|
||||
$this->motifs[2] = "Tirage conteste";
|
||||
$this->motifs[3] = "Pas de bon à payer";
|
||||
$this->motifs[3] = "Pas de bon <EFBFBD> payer";
|
||||
$this->motifs[4] = "Opposition sur compte";
|
||||
$this->motifs[5] = "RIB inexploitable";
|
||||
$this->motifs[6] = "Compte solde";
|
||||
@ -66,16 +65,16 @@ class RejetPrelevement
|
||||
$error = 0;
|
||||
$this->id = $id;
|
||||
$this->bon_id = $bonid;
|
||||
|
||||
|
||||
dol_syslog("RejetPrelevement::Create id $id");
|
||||
|
||||
|
||||
$facs = $this->_get_list_factures();
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
/* Insert la ligne de rejet dans la base */
|
||||
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_rejet (";
|
||||
$sql.= "fk_prelevement_lignes";
|
||||
$sql.= ", date_rejet";
|
||||
@ -91,34 +90,34 @@ class RejetPrelevement
|
||||
$sql.= ", ".$this->db->idate(mktime());
|
||||
$sql.= ", ".$facturation;
|
||||
$sql.= ")";
|
||||
|
||||
|
||||
$result=$this->db->query($sql);
|
||||
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
dol_syslog("RejetPrelevement::create Erreur 4");
|
||||
dol_syslog("RejetPrelevement::create Erreur 4 $sql");
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
/* Tag la ligne de prev comme rejetee */
|
||||
|
||||
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes ";
|
||||
$sql.= " SET statut = 3";
|
||||
$sql.= " WHERE rowid = ".$id;
|
||||
|
||||
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
dol_syslog("RejetPrelevement::create Erreur 5");
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for ($i = 0 ; $i < sizeof($facs) ; $i++)
|
||||
{
|
||||
{
|
||||
$fac = new Facture($this->db);
|
||||
$fac->fetch($facs[$i]);
|
||||
|
||||
|
||||
/* Emet un paiement negatif */
|
||||
|
||||
$pai = new Paiement($this->db);
|
||||
@ -137,8 +136,8 @@ class RejetPrelevement
|
||||
{
|
||||
$error++;
|
||||
dol_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Valide le paiement */
|
||||
|
||||
if ($pai->valide() < 0)
|
||||
@ -151,7 +150,7 @@ class RejetPrelevement
|
||||
dol_syslog("RejetPrelevement::Create set_unpaid fac ".$fac->ref);
|
||||
$fac->set_unpaid($fac->id, $user);
|
||||
|
||||
/* Envoi un email à l'emetteur de la demande de prev */
|
||||
/* Envoi un email <EFBFBD> l'emetteur de la demande de prev */
|
||||
$this->_send_email($fac);
|
||||
}
|
||||
|
||||
@ -175,12 +174,12 @@ class RejetPrelevement
|
||||
function _send_email($fac)
|
||||
{
|
||||
$userid = 0;
|
||||
|
||||
|
||||
$sql = "SELECT fk_user_demande";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql.= " WHERE pfd.fk_prelevement_bons = ".$this->bon_id;
|
||||
$sql.= " AND pfd.fk_facture = ".$fac->id;
|
||||
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -195,34 +194,34 @@ class RejetPrelevement
|
||||
{
|
||||
dol_syslog("RejetPrelevement::_send_email Erreur lecture user");
|
||||
}
|
||||
|
||||
|
||||
if ($userid > 0)
|
||||
{
|
||||
$emuser = new User($this->db, $userid);
|
||||
$emuser->fetch();
|
||||
|
||||
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($fac->socid);
|
||||
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
|
||||
|
||||
$subject = "Prelevement rejete";
|
||||
$sendto = $emuser->fullname." <".$emuser->email.">";
|
||||
$from = $this->user->fullname." <".$this->user->email.">";
|
||||
$msgishtml=0;
|
||||
|
||||
|
||||
$arr_file = array();
|
||||
$arr_mime = array();
|
||||
$arr_name = array();
|
||||
|
||||
|
||||
$message = "Bonjour,\n";
|
||||
$message .= "\nLe prelevement de la facture ".$fac->ref." pour le compte de la societe ".$soc->nom." d'un montant de ".price($fac->total_ttc)." a ete rejete par la banque.";
|
||||
$message .= "\n\n--\n".$this->user->fullname;
|
||||
|
||||
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,
|
||||
$arr_file,$arr_mime,$arr_name,
|
||||
'', '', 0, $msgishtml,$this->user->email);
|
||||
|
||||
|
||||
$result=$mailfile->sendfile();
|
||||
if ($result)
|
||||
{
|
||||
@ -246,13 +245,13 @@ class RejetPrelevement
|
||||
function _get_list_factures()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$arr = array();
|
||||
/*
|
||||
* Renvoie toutes les factures associée à un prélèvement
|
||||
* Renvoie toutes les factures associ<EFBFBD>e <EFBFBD> un pr<EFBFBD>l<EFBFBD>vement
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$sql = "SELECT f.rowid as facid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
@ -286,7 +285,7 @@ class RejetPrelevement
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Recupere l'objet prelevement
|
||||
@ -299,20 +298,20 @@ class RejetPrelevement
|
||||
$sql.= ", motif";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_rejet as pr";
|
||||
$sql.= " WHERE pr.fk_prelevement_lignes =".$rowid;
|
||||
|
||||
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
if ($this->db->num_rows())
|
||||
{
|
||||
$obj = $this->db->fetch_object();
|
||||
|
||||
|
||||
$this->id = $rowid;
|
||||
$this->date_rejet = $obj->dr;
|
||||
$this->motif = $this->motifs[$obj->motif];
|
||||
|
||||
$this->db->free();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/rejet-prelevement.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||
|
||||
@ -43,20 +43,20 @@ llxHeader('',$langs->trans("WithdrawsRefused"));
|
||||
$h = 0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Bills");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/rejets.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Rejects");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Statistics");
|
||||
$h++;
|
||||
$h++;
|
||||
|
||||
$prev_id = $_GET["id"];
|
||||
|
||||
@ -95,7 +95,7 @@ if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawsRefused"), $page, "rejets.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
@ -111,7 +111,7 @@ if ($result)
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
print '<img border="0" src="./statut'.$obj->statut.'.png"></a> ';
|
||||
@ -130,7 +130,7 @@ if ($result)
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("companies");
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
|
||||
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/resultat/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta/stats
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
function llxHeader($head = "") {
|
||||
global $user, $conf, $langs;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/resultat/","Résultat / Exercice");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/resultat/clientfourn.php",$langs->trans("ByCompanies"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/stats/index.php","Chiffre d'affaire");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/cumul.php","Cumulé");
|
||||
if ($conf->propal->enabled) {
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/prev.php","Prévisionnel");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/comp.php","Transformé");
|
||||
}
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/casoc.php",$langs->trans("ByCompanies"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/cabyuser.php",$langs->trans("ByUsers"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
|
||||
$langs->load("compta");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
|
||||
|
||||
// Security check
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2006 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/sociales/pre.inc.php
|
||||
\ingroup tax
|
||||
\brief Fichier gestionnaire du menu charges sociales
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
$langs->load("compta");
|
||||
$langs->load("propal");
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/charges/index.php",$langs->trans("Contributions"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/sociales/charges.php?action=create",$langs->trans("MenuNewSocialContribution"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("List"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/tax.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/tax.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
* \ingroup commercial
|
||||
* \version $Id$
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/accountancy.lib.php");
|
||||
|
||||
// Security check
|
||||
@ -34,10 +35,10 @@ if ($user->societe_id > 0)
|
||||
|
||||
|
||||
|
||||
function propals ($db, $year, $month)
|
||||
function propals ($db, $year, $month)
|
||||
{
|
||||
global $bc,$langs,$conf;
|
||||
|
||||
|
||||
$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";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
@ -140,7 +141,7 @@ function factures ($db, $year, $month, $paye)
|
||||
print "<td>Num</td>";
|
||||
print "<td align=\"right\">Date</td>";
|
||||
print "<td align=\"right\">Montant</td>";
|
||||
print "<td align=\"right\">Payé</td>";
|
||||
print "<td align=\"right\">Pay<EFBFBD></td>";
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
@ -158,17 +159,17 @@ function factures ($db, $year, $month, $paye)
|
||||
{
|
||||
print "<td align=\"right\"><b>!!!</b></td>\n";
|
||||
}
|
||||
|
||||
|
||||
print "<td align=\"right\">".price($objp->total)."</td>\n";
|
||||
|
||||
|
||||
$payes[1] = "oui";
|
||||
$payes[0] = "<b>non</b>";
|
||||
|
||||
print "<td align=\"right\">".$payes[$objp->paye]."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$total = $total + $objp->total;
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "<tr><td colspan=\"4\" align=\"right\">";
|
||||
@ -184,7 +185,7 @@ function factures ($db, $year, $month, $paye)
|
||||
}
|
||||
|
||||
|
||||
function pt ($db, $sql, $year)
|
||||
function pt ($db, $sql, $year)
|
||||
{
|
||||
global $bc, $langs;
|
||||
|
||||
@ -261,9 +262,9 @@ function ppt ($db, $year, $socid)
|
||||
print "<table width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre"><td align="center" valign="top" width="30%">';
|
||||
print "CA Prévisionnel basé sur les propal $year";
|
||||
print "CA Pr<EFBFBD>visionnel bas<61> sur les propal $year";
|
||||
|
||||
print "</td><td align=\"center\" valign=\"top\">CA Réalisé $year</td>";
|
||||
print "</td><td align=\"center\" valign=\"top\">CA R<EFBFBD>alis<EFBFBD> $year</td>";
|
||||
print "<td align=\"center\" valign=\"top\">Delta $year</td></tr>";
|
||||
|
||||
print '<tr><td valign="top" align="center" width="30%">';
|
||||
@ -336,7 +337,7 @@ llxHeader();
|
||||
$cyear = isset($_GET["year"])?$_GET["year"]:0;
|
||||
if (! $cyear) { $cyear = strftime ("%Y", time()); }
|
||||
|
||||
print_fiche_titre("Chiffre d'Affaire transformé (prévu-réalisé)",($cyear?"<a href='comp.php?year=".($cyear-1)."'>".img_previous()."</a> Année $cyear <a href='comp.php?year=".($cyear+1)."'>".img_next()."</a>":""));
|
||||
print_fiche_titre("Chiffre d'Affaire transform<EFBFBD> (pr<70>vu-r<>alis<69>)",($cyear?"<a href='comp.php?year=".($cyear-1)."'>".img_previous()."</a> Ann<EFBFBD>e $cyear <a href='comp.php?year=".($cyear+1)."'>".img_next()."</a>":""));
|
||||
|
||||
ppt($db, $cyear, $socid);
|
||||
|
||||
|
||||
@ -20,14 +20,14 @@
|
||||
|
||||
/**
|
||||
\file htdocs/compta/stats/cumul.php
|
||||
\brief Page reporting compta chiffre affaire cumulé
|
||||
\brief Page reporting compta chiffre affaire cumule
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
// Sécurité accés client
|
||||
if ($user->societe_id > 0)
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
@ -41,7 +41,7 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
|
||||
llxHeader();
|
||||
|
||||
|
||||
print_titre("Chiffre d'affaire cumulé (".$langs->trans("Currency".$conf->monnaie)." HT)");
|
||||
print_titre("Chiffre d'affaire cumul<EFBFBD> (".$langs->trans("Currency".$conf->monnaie)." HT)");
|
||||
|
||||
print '<table width="100%"><tr><td valign="top">';
|
||||
|
||||
@ -66,7 +66,7 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY dm";
|
||||
|
||||
|
||||
pt($db, $sql,"Suivi cumul par année");
|
||||
pt($db, $sql,"Suivi cumul par ann<EFBFBD>e");
|
||||
|
||||
print "</td></tr></table>";
|
||||
|
||||
@ -84,7 +84,7 @@ llxFooter('$Date$ - $Revision$');
|
||||
function pt ($db, $sql, $date)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
$bc[0]="class=\"pair\"";
|
||||
$bc[1]="class=\"impair\"";
|
||||
|
||||
@ -100,7 +100,7 @@ function pt ($db, $sql, $date)
|
||||
print "<td align=\"right\">".$langs->trans("Total")."</td>\n";
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
@ -109,11 +109,11 @@ function pt ($db, $sql, $date)
|
||||
print "<td>$obj->dm</td>\n";
|
||||
print "<td align=\"right\">".price($obj->amount)."</td><td align=\"right\">".price($total)."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "<tr class=\"liste_total\"><td align=\"right\">".$langs->trans("Total")."</td><td align=\"right\"> </b></td><td align=\"right\"><b>".price($total)."</b></td></tr>\n";
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
@ -23,16 +23,15 @@
|
||||
\brief Page ???
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require("./lib.inc.php");
|
||||
|
||||
require('../../main.inc.php');
|
||||
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
|
||||
$modecompta = $conf->compta->mode;
|
||||
if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
|
||||
|
||||
// Sécurité accés client
|
||||
if ($user->societe_id > 0)
|
||||
// S<EFBFBD>curit<EFBFBD> acc<63>s client
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
@ -41,7 +40,7 @@ if ($user->societe_id > 0)
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_titre("Comparatif CA année en cours avec année précédente (".$langs->trans("Currency".$conf->monnaie)." HT, ".$modecompta.")");
|
||||
print_titre("Comparatif CA ann<EFBFBD>e en cours avec ann<6E>e pr<70>c<EFBFBD>dente (".$langs->trans("Currency".$conf->monnaie)." HT, ".$modecompta.")");
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -71,7 +70,7 @@ function factures ($db, $year, $month, $paye)
|
||||
print "<TD>Num</TD>";
|
||||
print "<TD align=\"right\">Date</TD>";
|
||||
print "<TD align=\"right\">Montant</TD>";
|
||||
print "<TD align=\"right\">Payé</TD>";
|
||||
print "<TD align=\"right\">Pay<EFBFBD></TD>";
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
@ -85,18 +84,18 @@ function factures ($db, $year, $month, $paye)
|
||||
} else {
|
||||
print "<TD align=\"right\"><b>!!!</b></TD>\n";
|
||||
}
|
||||
|
||||
|
||||
print "<TD align=\"right\">".price($objp->amount)."</TD>\n";
|
||||
|
||||
|
||||
$payes[1] = "oui";
|
||||
$payes[0] = "<b>non</b>";
|
||||
|
||||
|
||||
|
||||
|
||||
print "<TD align=\"right\">".$payes[$objp->paye]."</TD>\n";
|
||||
print "</TR>\n";
|
||||
|
||||
|
||||
$total = $total + $objp->amount;
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "<tr><td align=\"right\"><b>".$langs->trans("Total")." : ".price($total)."</b></td><td></td></tr>";
|
||||
@ -129,7 +128,7 @@ function pt ($db, $sql, $year) {
|
||||
for ($b = $month ; $b < $obj->dm ; $b++) {
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
$ca[$b] = 0;
|
||||
@ -141,7 +140,7 @@ function pt ($db, $sql, $year) {
|
||||
print "<td>";
|
||||
print dol_print_date(dol_mktime(12,0,0,$obj->dm, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">".price($obj->sum)."</td>\n";
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
$month = $obj->dm + 1;
|
||||
$ca[$obj->dm] = $obj->sum;
|
||||
@ -161,13 +160,13 @@ function pt ($db, $sql, $year) {
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".dol_print_date(dol_mktime(12,0,0,$b, 1, $year),"%b")."</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "<td align=\"right\">0</td>\n";
|
||||
print "</tr>\n";
|
||||
$ca[$b] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print "<tr class=\"total\"><td align=\"right\">Total :</td><td align=\"right\"><b>".price($total)."</b></td></tr>";
|
||||
print "<tr class=\"total\"><td align=\"right\">Total :</td><td align=\"right\"><b>".price($total)."</b></td></tr>";
|
||||
print "</table>";
|
||||
|
||||
$db->free();
|
||||
@ -184,11 +183,11 @@ function ppt ($db, $year, $socid)
|
||||
|
||||
print "<tr class=\"liste_titre\"><td align=\"center\" width=\"30%\">";
|
||||
print "CA ".($year - 1);
|
||||
|
||||
|
||||
print "</td><td align=\"center\">CA $year</td>";
|
||||
print '<td align="center">Delta</td></tr>';
|
||||
print "<tr><td valign=\"top\" width=\"30%\">";
|
||||
|
||||
|
||||
$sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.fk_statut in (1,2)";
|
||||
@ -197,11 +196,11 @@ function ppt ($db, $year, $socid)
|
||||
if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
|
||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY dm";
|
||||
|
||||
|
||||
$prev = pt($db, $sql, $year - 1);
|
||||
|
||||
|
||||
print "</td><td valign=\"top\" width=\"30%\">";
|
||||
|
||||
|
||||
$sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " WHERE f.fk_statut in (1,2)";
|
||||
@ -210,11 +209,11 @@ function ppt ($db, $year, $socid)
|
||||
if ($conf->compta->mode != 'CREANCES-DETTES') $sql.= " AND f.paye = 1";
|
||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY dm";
|
||||
|
||||
|
||||
$ca = pt($db, $sql, $year);
|
||||
|
||||
|
||||
print "</td><td valign=\"top\" width=\"30%\">";
|
||||
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="3">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td>'.$langs->trans("Month").'</td>';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
|
||||
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/stats/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta/stats
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
function llxHeader($head = "") {
|
||||
global $user, $conf, $langs;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/resultat/","Résultat / Exercice");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/resultat/clientfourn.php",$langs->trans("ByCompanies"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/stats/index.php","Chiffre d'affaire");
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/cumul.php","Cumulé");
|
||||
if ($conf->propal->enabled) {
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/prev.php","Prévisionnel");
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/comp.php","Transformé");
|
||||
}
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/casoc.php",$langs->trans("ByCompanies"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/cabyuser.php",$langs->trans("ByUsers"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -18,15 +18,12 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
require('../../main.inc.php');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
@ -41,37 +38,37 @@ function pt ($db, $sql, $title) {
|
||||
print "<td>$title</td>";
|
||||
print "<td align=\"right\">Montant</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0; $total = 0 ;
|
||||
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$obj->dm.'</td>';
|
||||
print '<td align="right">'.price($obj->amount).'</td>';
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
$total = $total + $obj->amount;
|
||||
$i++;
|
||||
}
|
||||
print "<tr class=\"total\"><td colspan=\"2\" align=\"right\"><b>".$langs->trans("TotalHT").": ".price($total)."</b> ".$langs->trans("Currency".$conf->monnaie)."</td></tr>";
|
||||
|
||||
|
||||
$db->free();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
*
|
||||
@ -91,7 +88,7 @@ if ($sortorder == "")
|
||||
|
||||
$in = "(1,2,4)";
|
||||
|
||||
print_titre ("CA Prévisionnel basé sur les propositions <b>ouvertes</b> et <b>signées</b>");
|
||||
print_titre ("CA Pr<EFBFBD>visionnel bas<61> sur les propositions <b>ouvertes</b> et <b>sign<67>es</b>");
|
||||
|
||||
print '<table width="100%">';
|
||||
|
||||
@ -115,7 +112,7 @@ $sql.= " AND p.entity = ".$conf->entity;
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY dm DESC";
|
||||
|
||||
pt($db, $sql, "Année");
|
||||
pt($db, $sql, "Ann<EFBFBD>e");
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -126,7 +123,7 @@ $sql.= " AND p.entity = ".$conf->entity;
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY dm";
|
||||
|
||||
pt($db, $sql, "Mois cumulés");
|
||||
pt($db, $sql, "Mois cumul<EFBFBD>s");
|
||||
|
||||
print "</td></tr></table>";
|
||||
|
||||
|
||||
@ -17,12 +17,11 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/* \deprecated Ce fichier semble ne plus servir. A virer */
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
require('../main.inc.php');
|
||||
|
||||
|
||||
/*
|
||||
@ -31,7 +30,7 @@ require("./pre.inc.php");
|
||||
*/
|
||||
|
||||
function pt ($db, $sql, $date) {
|
||||
global $bc;
|
||||
global $bc;
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
@ -51,13 +50,13 @@ function pt ($db, $sql, $date) {
|
||||
print "<TD>$obj->dm</TD>\n";
|
||||
print "<TD align=\"right\">".price($obj->amount)."</TD><td> </td>\n";
|
||||
print "</TR>\n";
|
||||
|
||||
|
||||
$total = $total + $obj->amount;
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "<tr><td align=\"right\">".$langs->trans("TotalHT").":</td><td align=\"right\"><b>".price($total)."</b></td><td>".$langs->trans("Currency".$conf->monnaie)."</td></tr>";
|
||||
|
||||
|
||||
print "</table>";
|
||||
$db->free();
|
||||
}
|
||||
@ -74,7 +73,7 @@ $yearc = strftime("%Y",time());
|
||||
|
||||
echo '<table width="100%"><tr><td width="50%" valign="top">';
|
||||
|
||||
print "<b>TVA collectée</b>";
|
||||
print "<b>TVA collect<EFBFBD>e</b>";
|
||||
|
||||
for ($y = $yearc ; $y >= $conf->years ; $y=$y-1 ) {
|
||||
|
||||
@ -84,14 +83,14 @@ for ($y = $yearc ; $y >= $conf->years ; $y=$y-1 ) {
|
||||
$sql = "SELECT sum(f.tva) as amount , date_format(f.datef,'%Y-%m') as dm";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1 AND f.datef >= '$y-01-01' AND f.datef <= '$y-12-31' ";
|
||||
$sql .= " GROUP BY dm DESC";
|
||||
|
||||
pt($db, $sql,"Année $y");
|
||||
|
||||
|
||||
pt($db, $sql,"Ann<EFBFBD>e $y");
|
||||
|
||||
print "</td></tr></table>";
|
||||
}
|
||||
|
||||
echo '</td><td valign="top" width="50%">';
|
||||
echo 'Tva Payée<br>';
|
||||
echo 'Tva Pay<EFBFBD>e<br>';
|
||||
echo '</td></tr></table>';
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/tax.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \brief Index page of VAT reports
|
||||
* \version $Id$
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/tax.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
function llxHeader($head = "") {
|
||||
global $user, $conf, $langs;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add("index.php",$langs->trans("VAT"));
|
||||
|
||||
$menu->add_submenu("reglement.php",$langs->trans("Payments"));
|
||||
$menu->add_submenu("fiche.php?action=create",$langs->trans("NewPayment"));
|
||||
$menu->add_submenu("clients.php",$langs->trans("Clients"));
|
||||
$menu->add_submenu("quadri.php",$langs->trans("Quadri"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 <EFBFBD>ric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Yannick Warnier <ywarnier@beeznest.org>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
@ -28,7 +28,7 @@
|
||||
\todo Deal with recurrent invoices as well
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
|
||||
$year=$_GET["year"];
|
||||
@ -49,10 +49,10 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
/**
|
||||
* Gets VAT to collect for the given month of the given year
|
||||
*
|
||||
*
|
||||
* The function gets the VAT in split results, as the VAT declaration asks
|
||||
* to report the amounts for different VAT rates as different lines.
|
||||
* This function also accounts recurrent invoices
|
||||
* This function also accounts recurrent invoices
|
||||
* @param object Database handler object
|
||||
* @param integer Year
|
||||
* @param integer Year quarter (1-4)
|
||||
@ -75,7 +75,7 @@ function tva_coll($db,$y,$q)
|
||||
$sql.= " AND (date_format(f.datef,'%m') > ".(($q-1)*3);
|
||||
$sql.= " AND date_format(f.datef,'%m') <= ".($q*3).")";
|
||||
$sql.= " ORDER BY rate, facid";
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -94,7 +94,7 @@ function tva_coll($db,$y,$q)
|
||||
$list[$assoc['rate']]['totalht'] = $assoc['totalht'];
|
||||
$list[$assoc['rate']]['vat'] = $assoc['amount'];
|
||||
$list[$assoc['rate']]['facid'][] = $assoc['facid'];
|
||||
$list[$assoc['rate']]['facnum'][] = $assoc['facnum'];
|
||||
$list[$assoc['rate']]['facnum'][] = $assoc['facnum'];
|
||||
}else{
|
||||
$list[$assoc['rate']]['totalht'] += $assoc['totalht'];
|
||||
$list[$assoc['rate']]['vat'] += $assoc['amount'];
|
||||
@ -116,9 +116,9 @@ function tva_coll($db,$y,$q)
|
||||
|
||||
/**
|
||||
* Gets VAT to pay for the given month of the given year
|
||||
*
|
||||
*
|
||||
* The function gets the VAT in split results, as the VAT declaration asks
|
||||
* to report the amounts for different VAT rates as different lines.
|
||||
* to report the amounts for different VAT rates as different lines.
|
||||
* @param object Database handler object
|
||||
* @param integer Year
|
||||
* @param integer Year quarter (1-4)
|
||||
@ -159,7 +159,7 @@ function tva_paye($db, $y,$q)
|
||||
$list[$assoc['rate']]['totalht'] = $assoc['totalht'];
|
||||
$list[$assoc['rate']]['vat'] = $assoc['amount'];
|
||||
$list[$assoc['rate']]['facid'][] = $assoc['facid'];
|
||||
$list[$assoc['rate']]['facnum'][] = $assoc['facnum'];
|
||||
$list[$assoc['rate']]['facnum'][] = $assoc['facnum'];
|
||||
}else{
|
||||
$list[$assoc['rate']]['totalht'] += $assoc['totalht'];
|
||||
$list[$assoc['rate']]['vat'] += $assoc['amount'];
|
||||
@ -214,8 +214,8 @@ print "</tr>\n";
|
||||
if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
{
|
||||
$y = $year_current ;
|
||||
|
||||
|
||||
|
||||
|
||||
$total = 0; $subtotal = 0;
|
||||
$i=0;
|
||||
$subtot_coll_total = 0;
|
||||
@ -226,7 +226,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
{
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"8\">".$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dol_print_date(dol_mktime(0,0,0,($q*3),1,$y),"%b %Y").")</td></tr>";
|
||||
$var=true;
|
||||
|
||||
|
||||
$x_coll = tva_coll($db, $y, $q);
|
||||
$x_paye = tva_paye($db, $y, $q);
|
||||
$x_both = array();
|
||||
@ -245,8 +245,8 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
$x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht'];
|
||||
$x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat'];
|
||||
if(!isset($x_both[$my_paye_rate]['coll']['totalht'])){
|
||||
$x_both[$my_paye_rate]['coll']['total_ht'] = 0;
|
||||
$x_both[$my_paye_rate]['coll']['vat'] = 0;
|
||||
$x_both[$my_paye_rate]['coll']['total_ht'] = 0;
|
||||
$x_both[$my_paye_rate]['coll']['vat'] = 0;
|
||||
}
|
||||
$x_both[$my_paye_rate]['paye']['links'] = '';
|
||||
foreach($x_paye[$my_paye_rate]['facid'] as $id=>$dummy){
|
||||
@ -254,7 +254,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
}
|
||||
}
|
||||
//now we have an array (x_both) indexed by rates for coll and paye
|
||||
|
||||
|
||||
$x_coll_sum = 0;
|
||||
$x_coll_ht = 0;
|
||||
$x_paye_sum = 0;
|
||||
@ -282,7 +282,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
$total = $total + $diff;
|
||||
$subtotal = $subtotal + $diff;
|
||||
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td colspan="7"></td>';
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* \todo Deal with recurrent invoices as well
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/report.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/tax.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
|
||||
$langs->load("compta");
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +26,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
|
||||
$langs->load("bills");
|
||||
@ -69,8 +68,8 @@ $result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,7 +26,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../../main.inc.php');
|
||||
|
||||
$mesg = '';
|
||||
|
||||
@ -62,8 +60,8 @@ $result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($result);
|
||||
@ -84,17 +82,17 @@ if($_GET["id"])
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture_fourn AND f.fk_statut = 1 AND l.rowid = ".$_GET["id"];
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$num_lignes = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$i = 0;
|
||||
|
||||
if ($num_lignes)
|
||||
{
|
||||
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
@ -105,9 +103,9 @@ if($_GET["id"])
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
}
|
||||
|
||||
|
||||
|
||||
print_titre("Ventilation");
|
||||
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr><td>Facture</td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td></tr>';
|
||||
@ -126,7 +124,7 @@ if($_GET["id"])
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
if($objp->fk_code_ventilation == 0)
|
||||
{
|
||||
print '<tr><td> </td><td><input type="submit" value="'.$langs->trans("Ventiler").'"></td></tr>';
|
||||
|
||||
@ -18,8 +18,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -29,7 +27,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../../main.inc.php');
|
||||
$langs->load("suppliers");
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../../main.inc.php');
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
@ -68,8 +68,8 @@ $result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num_lignes = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste("Lignes de facture ventil<69>es",$page,"lignes.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
|
||||
print '<form method="GET" action="lignes.php">';
|
||||
@ -79,7 +79,7 @@ if ($result)
|
||||
print '<td align="right">'.$langs->trans("Montant").'</td>';
|
||||
print '<td colspan="2" align="center">'.$langs->trans("Compte").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
||||
print '<td><input type="submit"></td>';
|
||||
print '<td align="right"> </td>';
|
||||
@ -93,11 +93,11 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td>';
|
||||
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
print '<td align="right">'.price($objp->price).'</td>';
|
||||
print '<td align="right">'.price($objp->price).'</td>';
|
||||
print '<td align="right">'.$objp->numero.'</td>';
|
||||
print '<td align="left">'.stripslashes($objp->intitule).'</td>';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Éric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004 <EFBFBD>ric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -21,21 +21,21 @@
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
\file htdocs/compta/ventilation/liste.php
|
||||
\ingroup compta
|
||||
\brief Page de ventilation des lignes de facture
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../../main.inc.php');
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->facture->lire) accessforbidden();
|
||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||
/*
|
||||
* Sécurité accés client
|
||||
* S<EFBFBD>curit<EFBFBD> acc<EFBFBD>s client
|
||||
*/
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
@ -61,9 +61,9 @@ $result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num_lignes = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste("Lignes de facture à ventiler",$page,"liste.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste("Lignes de facture <EFBFBD> ventiler",$page,"liste.php","",$sortfield,$sortorder,'',$num_lignes);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>Facture</td>';
|
||||
@ -78,9 +78,9 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td>';
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print price($objp->price);
|
||||
@ -93,11 +93,11 @@ if ($result)
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/ventilation/fournisseur/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta ventilation
|
||||
*/
|
||||
|
||||
require("../../../main.inc.php");
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation")." ".$langs->trans("Customers"));
|
||||
$menu->add(DOL_URL_ROOT."/compta/ventilation/fournisseur/",$langs->trans("Ventilation")." ".$langs->trans("Suppliers"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/ventilation/fournisseur/liste.php",$langs->trans("ToDispatch"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/ventilation/fournisseur/lignes.php",$langs->trans("Dispatched"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/export/",$langs->trans("Export"));
|
||||
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
?>
|
||||
@ -17,7 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +26,7 @@
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
@ -80,7 +79,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$var=true;
|
||||
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +26,7 @@
|
||||
* \version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
|
||||
@ -29,7 +28,7 @@
|
||||
* \version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
|
||||
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/ventilation/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta ventilation
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
|
||||
function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$langs->load("commercial");
|
||||
$menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/ventilation/liste.php",$langs->trans("ToDispatch"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/ventilation/lignes.php",$langs->trans("Dispatched"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/export/",$langs->trans("Export"));
|
||||
|
||||
|
||||
left_menu($menu->liste, $help_url);
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user