forked from Wavyzz/dolibarr
Doxygen
This commit is contained in:
@@ -561,22 +561,19 @@ EXCLUDE = mssql \
|
|||||||
htdocs/conf/conf.php \
|
htdocs/conf/conf.php \
|
||||||
htdocs/includes/adodbtime \
|
htdocs/includes/adodbtime \
|
||||||
htdocs/includes/barcode \
|
htdocs/includes/barcode \
|
||||||
htdocs/includes/cryptograph \
|
|
||||||
htdocs/includes/fckeditor \
|
htdocs/includes/fckeditor \
|
||||||
htdocs/includes/fpdf \
|
htdocs/includes/fpdf \
|
||||||
htdocs/includes/jpgraph2 \
|
|
||||||
htdocs/includes/magpierss \
|
htdocs/includes/magpierss \
|
||||||
htdocs/includes/nusoap \
|
htdocs/includes/nusoap \
|
||||||
htdocs/includes/pear \
|
htdocs/includes/pear \
|
||||||
|
htdocs/includes/php_excelreader \
|
||||||
htdocs/includes/php_writeexcel \
|
htdocs/includes/php_writeexcel \
|
||||||
htdocs/includes/phpexcelreader \
|
|
||||||
htdocs/includes/phplot \
|
htdocs/includes/phplot \
|
||||||
htdocs/includes/phplot5 \
|
htdocs/includes/phplot5 \
|
||||||
|
htdocs/includes/pwc \
|
||||||
htdocs/includes/scriptaculous \
|
htdocs/includes/scriptaculous \
|
||||||
htdocs/includes/treemenu \
|
htdocs/includes/smtps \
|
||||||
htdocs/includes/xmlrpc \
|
htdocs/includes/vcard \
|
||||||
htdocs/lib/jabber \
|
|
||||||
htdocs/lib/vcard \
|
|
||||||
htdocs/avoir \
|
htdocs/avoir \
|
||||||
htdocs/document \
|
htdocs/document \
|
||||||
htdocs/documents \
|
htdocs/documents \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -18,26 +18,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/client.class.php
|
* \file htdocs/client.class.php
|
||||||
\ingroup societe
|
* \ingroup societe
|
||||||
\brief Fichier de la classe des clients
|
* \brief File for class of customers
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
\class Client
|
|
||||||
\brief Classe permettant la gestion des clients
|
|
||||||
*/
|
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
include_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class Client
|
||||||
|
* \brief Class to manage customers
|
||||||
|
*/
|
||||||
class Client extends Societe
|
class Client extends Societe
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* \brief Constructeur de la classe
|
||||||
* \param DB handler acces base de donnees
|
* \param DB handler acces base de donnees
|
||||||
@@ -46,41 +43,41 @@ class Client extends Societe
|
|||||||
function Client($DB, $id=0)
|
function Client($DB, $id=0)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->factures = array();
|
$this->factures = array();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function read_factures()
|
function read_factures()
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, facnumber";
|
$sql = "SELECT rowid, facnumber";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.fk_soc = ".$this->id;
|
$sql .= " WHERE f.fk_soc = ".$this->id;
|
||||||
$sql .= " ORDER BY datef DESC";
|
$sql .= " ORDER BY datef DESC";
|
||||||
|
|
||||||
$result = $this->db->query($sql) ;
|
$result = $this->db->query($sql) ;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ( $result )
|
if ( $result )
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows();
|
$num = $this->db->num_rows();
|
||||||
|
|
||||||
while ($i < $num )
|
while ($i < $num )
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row();
|
$row = $this->db->fetch_row();
|
||||||
|
|
||||||
$this->factures[$i][0] = $row[0];
|
$this->factures[$i][0] = $row[0];
|
||||||
$this->factures[$i][1] = $row[1];
|
$this->factures[$i][1] = $row[1];
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge indicateurs this->nb de tableau de bord
|
* \brief Charge indicateurs this->nb de tableau de bord
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
@@ -88,7 +85,7 @@ class Client extends Societe
|
|||||||
function load_state_board()
|
function load_state_board()
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
$this->nb=array("customers" => 0,"prospects" => 0);
|
$this->nb=array("customers" => 0,"prospects" => 0);
|
||||||
$clause = "WHERE";
|
$clause = "WHERE";
|
||||||
|
|
||||||
@@ -103,7 +100,7 @@ class Client extends Societe
|
|||||||
$sql.= " ".$clause." s.client in (1,2)";
|
$sql.= " ".$clause." s.client in (1,2)";
|
||||||
$sql.= " AND s.entity = ".$conf->entity;
|
$sql.= " AND s.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY s.client";
|
$sql.= " GROUP BY s.client";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -114,7 +111,7 @@ class Client extends Societe
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
@@ -122,6 +119,6 @@ class Client extends Societe
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -17,12 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \version $Id$
|
* \files htdocs/companybankaccount.class.php
|
||||||
|
* \ingroup societe
|
||||||
|
* \brief File of class to manage bank accounts description
|
||||||
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Class
|
* \brief Class to manage bank accounts description
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class CompanyBankAccount
|
class CompanyBankAccount
|
||||||
{
|
{
|
||||||
@@ -180,7 +182,7 @@ class CompanyBankAccount
|
|||||||
return $this->error;
|
return $this->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -205,7 +207,7 @@ class CompanyBankAccount
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return account country code
|
* \brief Return account country code
|
||||||
* \return String country code
|
* \return String country code
|
||||||
@@ -217,7 +219,7 @@ class CompanyBankAccount
|
|||||||
// If IBAN defined, we can know country of account from it
|
// If IBAN defined, we can know country of account from it
|
||||||
if (eregi("^([a-zA-Z][a-zA-Z])",$this->iban,$reg)) return $reg[1];
|
if (eregi("^([a-zA-Z][a-zA-Z])",$this->iban,$reg)) return $reg[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// We return country code
|
// We return country code
|
||||||
$company=new Societe($this->db);
|
$company=new Societe($this->db);
|
||||||
$result=$company->fetch($this->socid);
|
$result=$company->fetch($this->socid);
|
||||||
@@ -235,8 +237,8 @@ class CompanyBankAccount
|
|||||||
if ($this->getCountryCode() == 'FR') return true;
|
if ($this->getCountryCode() == 'FR') return true;
|
||||||
if ($this->getCountryCode() == 'ES') return true;
|
if ($this->getCountryCode() == 'ES') return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -548,9 +548,9 @@ class DoliDb
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
|
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* \return date Date TMS
|
* \return date Date TMS
|
||||||
* \example 19700101020000 -> 3600 with TZ+1
|
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -538,9 +538,9 @@ class DoliDb
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
|
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* \return date Date TMS
|
* \return date Date TMS
|
||||||
* \example 19700101020000 -> 3600 with TZ+1
|
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
@@ -794,7 +794,7 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
return $listtables;
|
return $listtables;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Liste les informations des champs d'une table.
|
* \brief Liste les informations des champs d'une table.
|
||||||
* \param table Nom de la table
|
* \param table Nom de la table
|
||||||
@@ -805,7 +805,7 @@ class DoliDb
|
|||||||
$infotables=array();
|
$infotables=array();
|
||||||
|
|
||||||
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
||||||
|
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
$result = $this->query($sql);
|
$result = $this->query($sql);
|
||||||
while($row = $this->fetch_row($result))
|
while($row = $this->fetch_row($result))
|
||||||
|
|||||||
@@ -553,9 +553,9 @@ class DoliDb
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
|
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* \return date Date TMS
|
* \return date Date TMS
|
||||||
* \example 19700101020000 -> 3600 with TZ+1
|
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -671,9 +671,9 @@ class DoliDb
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
* \brief Convert (by PHP) a PHP server TZ string date into a GM Timestamps date
|
||||||
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* 19700101020000 -> 3600 with TZ+1
|
||||||
|
* \param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* \return date Date TMS
|
* \return date Date TMS
|
||||||
* \example 19700101020000 -> 3600 with TZ+1
|
|
||||||
*/
|
*/
|
||||||
function jdate($string)
|
function jdate($string)
|
||||||
{
|
{
|
||||||
@@ -881,7 +881,7 @@ class DoliDb
|
|||||||
$this->results = pg_query($this->db, "SHOW TABLES;");
|
$this->results = pg_query($this->db, "SHOW TABLES;");
|
||||||
return $this->results;
|
return $this->results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Liste les informations des champs d'une table.
|
* \brief Liste les informations des champs d'une table.
|
||||||
* \param table Nom de la table
|
* \param table Nom de la table
|
||||||
@@ -894,7 +894,7 @@ class DoliDb
|
|||||||
$infotables=array();
|
$infotables=array();
|
||||||
|
|
||||||
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
||||||
|
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
$result = $this->pg_query($this->db,$sql);
|
$result = $this->pg_query($this->db,$sql);
|
||||||
while($row = $this->fetch_row($result))
|
while($row = $this->fetch_row($result))
|
||||||
|
|||||||
Reference in New Issue
Block a user