Qual: Ne charge la classe Notify et Adresse que si besoin
This commit is contained in:
parent
8be79ef68a
commit
d896fd9484
@ -20,6 +20,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/address.class.php");
|
||||||
|
|
||||||
|
|
||||||
class Commande {
|
class Commande {
|
||||||
var $db ;
|
var $db ;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,18 +18,20 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/compta/facture/facture-rec.class.php
|
\file htdocs/compta/facture/facture-rec.class.php
|
||||||
\ingroup facture
|
\ingroup facture
|
||||||
\brief Fichier de la classe des factures recurentes
|
\brief Fichier de la classe des factures recurentes
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/notify.class.php");
|
||||||
|
|
||||||
/*! \class FactureRec
|
|
||||||
|
/**
|
||||||
|
\class FactureRec
|
||||||
\brief Classe de gestion des factures recurrentes
|
\brief Classe de gestion des factures recurrentes
|
||||||
*/
|
*/
|
||||||
class FactureRec
|
class FactureRec
|
||||||
@ -61,14 +63,9 @@ class FactureRec
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Créé la facture
|
* Créé la facture
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$facsrc = new Facture($this->db);
|
$facsrc = new Facture($this->db);
|
||||||
|
|
||||||
if ($facsrc->fetch($this->facid) > 0)
|
if ($facsrc->fetch($this->facid) > 0)
|
||||||
@ -82,10 +79,6 @@ class FactureRec
|
|||||||
$facsrc->projetid = "NULL";
|
$facsrc->projetid = "NULL";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_rec (titre, fk_soc, datec, amount, remise, remise_percent, note, fk_user_author,fk_projet, fk_cond_reglement) ";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_rec (titre, fk_soc, datec, amount, remise, remise_percent, note, fk_user_author,fk_projet, fk_cond_reglement) ";
|
||||||
$sql .= " VALUES ('$this->titre', '$facsrc->socidp', now(), '$facsrc->amount', '$facsrc->remise', '$facsrc->remise_percent', '$this->note','$user->id', '$facsrc->projetid', '$facsrc->cond_reglement_id')";
|
$sql .= " VALUES ('$this->titre', '$facsrc->socidp', now(), '$facsrc->amount', '$facsrc->remise', '$facsrc->remise_percent', '$this->note','$user->id', '$facsrc->projetid', '$facsrc->cond_reglement_id')";
|
||||||
if ( $this->db->query($sql) )
|
if ( $this->db->query($sql) )
|
||||||
@ -94,7 +87,6 @@ class FactureRec
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Produits
|
* Produits
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
for ($i = 0 ; $i < sizeof($facsrc->lignes) ; $i++)
|
for ($i = 0 ; $i < sizeof($facsrc->lignes) ; $i++)
|
||||||
{
|
{
|
||||||
@ -136,8 +128,6 @@ class FactureRec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Recupére l'objet facture
|
* Recupére l'objet facture
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function fetch($rowid, $societe_id=0)
|
function fetch($rowid, $societe_id=0)
|
||||||
{
|
{
|
||||||
@ -235,9 +225,9 @@ class FactureRec
|
|||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recupére l'objet client lié à la facture
|
* Recupére l'objet client lié à la facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function fetch_client()
|
function fetch_client()
|
||||||
{
|
{
|
||||||
@ -246,10 +236,9 @@ class FactureRec
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Valide la facture
|
* Valide la facture
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function valid($userid, $dir)
|
function valid($userid, $dir)
|
||||||
{
|
{
|
||||||
@ -268,7 +257,6 @@ class FactureRec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Supprime la facture
|
* Supprime la facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function delete($rowid)
|
function delete($rowid)
|
||||||
{
|
{
|
||||||
@ -294,9 +282,9 @@ class FactureRec
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Valide la facture
|
* Valide la facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function set_valid($rowid, $user, $soc)
|
function set_valid($rowid, $user, $soc)
|
||||||
{
|
{
|
||||||
@ -311,7 +299,6 @@ class FactureRec
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Notify
|
* Notify
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
$facref = str_replace($forbidden_chars,"_",$this->ref);
|
$facref = str_replace($forbidden_chars,"_",$this->ref);
|
||||||
@ -354,9 +341,9 @@ class FactureRec
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajoute un produit dans la facture
|
* Ajoute un produit dans la facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function add_product($idproduct, $qty, $remise_percent)
|
function add_product($idproduct, $qty, $remise_percent)
|
||||||
{
|
{
|
||||||
@ -372,9 +359,9 @@ class FactureRec
|
|||||||
$this->products_remise_percent[$i] = $remise_percent;
|
$this->products_remise_percent[$i] = $remise_percent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajoute une ligne de facture
|
* Ajoute une ligne de facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0)
|
function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0)
|
||||||
{
|
{
|
||||||
@ -408,9 +395,9 @@ class FactureRec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mets à jour une ligne de facture
|
* Mets à jour une ligne de facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0)
|
||||||
{
|
{
|
||||||
@ -439,9 +426,9 @@ class FactureRec
|
|||||||
$this->updateprice($this->id);
|
$this->updateprice($this->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supprime une ligne
|
* Supprime une ligne
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function deleteline($rowid)
|
function deleteline($rowid)
|
||||||
{
|
{
|
||||||
@ -453,9 +440,9 @@ class FactureRec
|
|||||||
$this->updateprice($this->id);
|
$this->updateprice($this->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mise à jour des sommes de la facture
|
* Mise à jour des sommes de la facture
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function updateprice($facid)
|
function updateprice($facid)
|
||||||
{
|
{
|
||||||
@ -481,9 +468,7 @@ class FactureRec
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$calculs = calcul_price($products, $this->remise_percent);
|
$calculs = calcul_price($products, $this->remise_percent);
|
||||||
|
|
||||||
$this->total_remise = $calculs[3];
|
$this->total_remise = $calculs[3];
|
||||||
@ -492,9 +477,6 @@ class FactureRec
|
|||||||
$this->total_tva = $calculs[1];
|
$this->total_tva = $calculs[1];
|
||||||
$this->total_ttc = $calculs[2];
|
$this->total_ttc = $calculs[2];
|
||||||
$tvas = $calculs[5];
|
$tvas = $calculs[5];
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_rec SET amount = $this->amount_ht, remise=$this->total_remise, total=$this->total_ht, tva=$this->total_tva, total_ttc=$this->total_ttc";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_rec SET amount = $this->amount_ht, remise=$this->total_remise, total=$this->total_ht, tva=$this->total_tva, total_ttc=$this->total_ttc";
|
||||||
$sql .= " WHERE rowid = $facid ;";
|
$sql .= " WHERE rowid = $facid ;";
|
||||||
@ -522,9 +504,9 @@ class FactureRec
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applique une remise
|
* Applique une remise
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function set_remise($user, $remise)
|
function set_remise($user, $remise)
|
||||||
{
|
{
|
||||||
@ -544,10 +526,11 @@ class FactureRec
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error() . ' in ' . $sql;
|
print $this->db->error() . ' in ' . $sql;
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -19,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,64 +29,60 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/facture.class.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/paiement.class.php";
|
||||||
|
|
||||||
$user->getrights('facture');
|
$user->getrights('facture');
|
||||||
$user->getrights('banque');
|
$user->getrights('banque');
|
||||||
|
|
||||||
if (!$user->rights->facture->lire)
|
if (!$user->rights->facture->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne
|
$langs->load("main"); // BUG De chargement de traduction ne pas modifier cette ligne
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT."/facture.class.php";
|
$warning_delay=31*24*60*60; // Delai affichage warning retard (si retard paiement facture > delai)
|
||||||
require_once DOL_DOCUMENT_ROOT."/paiement.class.php";
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["socidp"]) { $socidp=$_GET["socidp"]; }
|
if ($_GET["socidp"]) { $socidp=$_GET["socidp"]; }
|
||||||
/*
|
|
||||||
* Sécurité accés client
|
// Sécurité accés client
|
||||||
*/
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socidp = $user->societe_id;
|
$socidp = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader('','Factures impayées');
|
|
||||||
|
llxHeader('',$langs->trans("UnpayedBills"));
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* *
|
* *
|
||||||
* Mode Liste *
|
* Mode Liste *
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
$sortorder=$_GET["sortorder"];
|
|
||||||
$sortfield=$_GET["sortfield"];
|
$sortfield=$_GET["sortfield"];
|
||||||
if (! $sortorder) $sortorder="DESC";
|
$sortorder=$_GET["sortorder"];
|
||||||
if (! $sortfield) $sortfield="f.datef";
|
if (! $sortfield) $sortfield="f.datef";
|
||||||
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if ($page == -1)
|
if ($page == -1) $page = 0;
|
||||||
{
|
|
||||||
$page = 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
|
$sql = "SELECT s.nom,s.idp,f.facnumber,f.increment,f.total,f.total_ttc,";
|
||||||
$sql = "SELECT s.nom,s.idp,f.facnumber,f.increment,f.total,f.total_ttc,".$db->pdate("f.datef")." as df, f.paye as paye, f.rowid as facid, f.fk_statut, sum(pf.amount) as am";
|
$sql.= $db->pdate("f.datef")." as df, ".$db->pdate("f.date_lim_reglement")." as datelimite, ";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " f.paye as paye, f.rowid as facid, f.fk_statut, sum(pf.amount) as am";
|
||||||
$sql .= ",".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
|
$sql.= ",".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_soc = s.idp";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
|
||||||
$sql .= " AND f.paye = 0 AND f.fk_statut = 1";
|
$sql.= " WHERE f.fk_soc = s.idp";
|
||||||
|
$sql.= " AND f.paye = 0 AND f.fk_statut = 1";
|
||||||
if ($socidp)
|
if ($socidp) $sql .= " AND s.idp = $socidp";
|
||||||
$sql .= " AND s.idp = $socidp";
|
|
||||||
|
|
||||||
if ($_GET["filtre"])
|
if ($_GET["filtre"])
|
||||||
{
|
{
|
||||||
@ -127,15 +122,9 @@ if ($user->rights->facture->lire)
|
|||||||
$sql .= " GROUP BY f.facnumber";
|
$sql .= " GROUP BY f.facnumber";
|
||||||
|
|
||||||
$sql .= " ORDER BY ";
|
$sql .= " ORDER BY ";
|
||||||
|
|
||||||
|
|
||||||
$listfield=split(',',$sortfield);
|
$listfield=split(',',$sortfield);
|
||||||
foreach ($listfield as $key => $value)
|
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
|
||||||
{
|
$sql .= " f.fk_soc ASC";
|
||||||
$sql.=$listfield[$key]." ".$sortorder.",";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= " f.fk_soc DESC "; // Grouper les lignes pas sociétés
|
|
||||||
|
|
||||||
//$sql .= $db->plimit($limit+1,$offset);
|
//$sql .= $db->plimit($limit+1,$offset);
|
||||||
|
|
||||||
@ -143,7 +132,7 @@ if ($user->rights->facture->lire)
|
|||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
if ($socidp)
|
if ($socidp)
|
||||||
{
|
{
|
||||||
@ -157,6 +146,7 @@ if ($user->rights->facture->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp","",$sortfield);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp",'align="center"',$sortfield);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp",'align="center"',$sortfield);
|
||||||
|
print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","","&socidp=$socidp",'align="center"',$sortfield);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp","",$sortfield);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp","",$sortfield);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp",'align="right"',$sortfield);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp",'align="right"',$sortfield);
|
||||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp",'align="right"',$sortfield);
|
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp",'align="right"',$sortfield);
|
||||||
@ -168,8 +158,9 @@ if ($user->rights->facture->lire)
|
|||||||
print '<form method="get" action="impayees.php">';
|
print '<form method="get" action="impayees.php">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" valign="right">';
|
print '<td class="liste_titre" valign="right">';
|
||||||
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$_GET["search_ref"].'">';
|
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$_GET["search_ref"].'"></td>';
|
||||||
print '</td><td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_societe" value="'.$_GET["search_societe"].'">';
|
print '<input class="flat" type="text" name="search_societe" value="'.$_GET["search_societe"].'">';
|
||||||
print '</td><td class="liste_titre" align="right">';
|
print '</td><td class="liste_titre" align="right">';
|
||||||
@ -192,25 +183,19 @@ if ($user->rights->facture->lire)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
if ($objp->am == 0)
|
|
||||||
{
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
$class = "impayee";
|
$class = "impayee";
|
||||||
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.img_object($langs->trans("ShowBill"),"bill")."</a> ";
|
print '<td nowrap><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.img_object($langs->trans("ShowBill"),"bill")."</a> ";
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a>'.$objp->increment."</td>\n";
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a>'.$objp->increment;
|
||||||
|
if ($objp->datelimite < (time() - $warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $objp->am) print img_warning($langs->trans("Late"));
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
|
print "<td nowrap align=\"center\">".dolibarr_print_date($objp->df)."</td>\n";
|
||||||
|
print "<td nowrap align=\"center\">".dolibarr_print_date($objp->datelimite)."</td>\n";
|
||||||
|
|
||||||
if ($objp->df > 0 )
|
|
||||||
{
|
|
||||||
print "<td align=\"center\">";
|
|
||||||
print strftime("%d %b %Y",$objp->df)."</td>\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td align=\"center\"><b>!!!</b></td>\n";
|
|
||||||
}
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom.'</a></td>';
|
||||||
|
|
||||||
print "<td align=\"right\">".price($objp->total)."</td>";
|
print "<td align=\"right\">".price($objp->total)."</td>";
|
||||||
@ -242,7 +227,7 @@ if ($user->rights->facture->lire)
|
|||||||
$total+=$objp->total;
|
$total+=$objp->total;
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$totalrecu+=$objp->am;
|
$totalrecu+=$objp->am;
|
||||||
}
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
|
|||||||
@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
$langs->load("bills");
|
||||||
|
|
||||||
|
|
||||||
// Sécurité accés client
|
// Sécurité accés client
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,6 +30,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/notify.class.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class Facture
|
\class Facture
|
||||||
|
|||||||
@ -27,11 +27,12 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/notify.class.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class Ficheinter
|
/** \class Ficheinter
|
||||||
\brief Classe des gestion des fiches interventions
|
\brief Classe des gestion des fiches interventions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Fichinter
|
class Fichinter
|
||||||
{
|
{
|
||||||
var $id;
|
var $id;
|
||||||
@ -237,7 +238,6 @@ class Fichinter
|
|||||||
*/
|
*/
|
||||||
$mesg = "La fiche d'intervention ".$this->ref." a été validée.\n";
|
$mesg = "La fiche d'intervention ".$this->ref." a été validée.\n";
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/notify.class.php");
|
|
||||||
$notify = New Notify($this->db);
|
$notify = New Notify($this->db);
|
||||||
$notify->send($action_notify, $this->societe_id, $mesg, "ficheinter", $this->id, $filepdf);
|
$notify->send($action_notify, $this->societe_id, $mesg, "ficheinter", $this->id, $filepdf);
|
||||||
|
|
||||||
|
|||||||
@ -102,11 +102,10 @@ define('MAIN_DB_PREFIX','llx_'); // A terme cette constan
|
|||||||
* Chargement des includes principaux
|
* Chargement des includes principaux
|
||||||
*/
|
*/
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/lib/".$conf->db->type.".lib.php");
|
require_once(DOL_DOCUMENT_ROOT ."/lib/".$conf->db->type.".lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/user.class.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
|
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/user.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/menu.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/menu.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/address.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
|
||||||
|
|
||||||
|
|
||||||
$db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name);
|
$db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user