2004-10-20 23:06:45 +02:00
|
|
|
|
<?php
|
2004-02-10 16:27:07 +01:00
|
|
|
|
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2005-01-09 21:20:46 +01:00
|
|
|
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
2002-12-19 15:41:37 +01:00
|
|
|
|
*
|
|
|
|
|
|
* 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$
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2005-01-09 21:20:46 +01:00
|
|
|
|
/** \file htdocs/paiement.class.php
|
|
|
|
|
|
\ingroup facture
|
|
|
|
|
|
\brief Fichier de la classe des paiement de factures clients
|
|
|
|
|
|
\version $Revision$
|
2004-09-14 22:53:49 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-01-09 21:20:46 +01:00
|
|
|
|
/** \class Paiement
|
|
|
|
|
|
\brief Classe permettant la gestion des paiements des factures clients
|
2004-09-14 22:53:49 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
2002-12-19 15:41:37 +01:00
|
|
|
|
class Paiement
|
|
|
|
|
|
{
|
|
|
|
|
|
var $id;
|
|
|
|
|
|
var $db;
|
|
|
|
|
|
var $facid;
|
|
|
|
|
|
var $datepaye;
|
|
|
|
|
|
var $amount;
|
|
|
|
|
|
var $author;
|
2004-10-05 16:33:52 +02:00
|
|
|
|
var $paiementid; // Type de paiement. Stock<63> dans fk_paiement
|
2005-01-09 21:20:46 +01:00
|
|
|
|
// de llx_paiement qui est li<6C> aux types de
|
|
|
|
|
|
//paiement de llx_c_paiement
|
|
|
|
|
|
var $num_paiement; // Num<75>ro du CHQ, VIR, etc...
|
|
|
|
|
|
var $bank_account; // Id compte bancaire du paiement
|
2002-12-19 15:41:37 +01:00
|
|
|
|
var $note;
|
2004-02-28 21:50:27 +01:00
|
|
|
|
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
|
|
|
|
|
|
// fk_paiement dans llx_paiement_facture est le rowid du paiement
|
|
|
|
|
|
|
2004-09-14 22:53:49 +02:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* \brief Constructeur de la classe
|
|
|
|
|
|
* \param DB handler acc<EFBFBD>s base de donn<EFBFBD>es
|
|
|
|
|
|
* \param soc_idp id societe ("" par defaut)
|
2002-12-19 15:41:37 +01:00
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function Paiement($DB, $soc_idp="")
|
2002-12-19 15:41:37 +01:00
|
|
|
|
{
|
|
|
|
|
|
$this->db = $DB ;
|
|
|
|
|
|
}
|
2004-09-14 22:53:49 +02:00
|
|
|
|
|
|
|
|
|
|
/**
|
2004-12-16 14:26:13 +01:00
|
|
|
|
* \brief R<EFBFBD>cup<EFBFBD>re l'objet paiement
|
2004-09-14 22:53:49 +02:00
|
|
|
|
* \param id id du paiement a r<EFBFBD>cup<EFBFBD>rer
|
2004-02-09 15:41:41 +01:00
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function fetch($id)
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
2004-12-16 14:26:13 +01:00
|
|
|
|
$sql = "SELECT p.rowid,".$this->db->pdate("p.datep")." as dp, p.amount, p.statut";
|
2005-01-09 21:20:46 +01:00
|
|
|
|
$sql .=", c.libelle as paiement_type, p.num_paiement, b.fk_account";
|
|
|
|
|
|
$sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c ";
|
|
|
|
|
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid ";
|
2004-02-09 15:41:41 +01:00
|
|
|
|
$sql .= " WHERE p.fk_paiement = c.id";
|
2005-01-09 21:20:46 +01:00
|
|
|
|
$sql .= " AND p.rowid = ".$id;
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
if ($this->db->query($sql))
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
|
|
|
|
|
if ($this->db->num_rows())
|
|
|
|
|
|
{
|
2004-10-23 23:02:56 +02:00
|
|
|
|
$obj = $this->db->fetch_object();
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
|
|
|
|
|
$this->id = $obj->rowid;
|
|
|
|
|
|
$this->date = $obj->dp;
|
|
|
|
|
|
$this->numero = $obj->num_paiement;
|
2005-01-09 21:20:46 +01:00
|
|
|
|
$this->bank_account = $obj->fk_account;
|
2004-09-14 22:53:49 +02:00
|
|
|
|
|
2004-02-09 15:41:41 +01:00
|
|
|
|
$this->montant = $obj->amount;
|
|
|
|
|
|
$this->note = $obj->note;
|
|
|
|
|
|
$this->type_libelle = $obj->paiement_type;
|
2004-12-16 14:26:13 +01:00
|
|
|
|
$this->statut = $obj->statut;
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
return 0;
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$this->db->free();
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2004-09-14 22:53:49 +02:00
|
|
|
|
dolibarr_print_error($this->db);
|
2004-02-10 16:27:07 +01:00
|
|
|
|
return 0;
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2004-09-14 22:53:49 +02:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* \brief Cr<EFBFBD>ation du paiement en base
|
|
|
|
|
|
* \param user object utilisateur qui cr<EFBFBD>e
|
2004-12-30 16:20:36 +01:00
|
|
|
|
* \param no_commit le begin et le commit sont fait par l'appelant
|
2002-12-19 15:41:37 +01:00
|
|
|
|
*
|
|
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-12-30 16:20:36 +01:00
|
|
|
|
function create($user, $no_commit = 0)
|
2002-12-19 15:41:37 +01:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$sql_err = 0;
|
2002-12-19 15:41:37 +01:00
|
|
|
|
/*
|
|
|
|
|
|
* Insertion dans la base
|
|
|
|
|
|
*/
|
2004-12-30 16:20:36 +01:00
|
|
|
|
if ($no_commit == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
$result = $this->db->begin();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
$result = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($result)
|
2004-02-10 16:27:07 +01:00
|
|
|
|
{
|
|
|
|
|
|
$total = 0;
|
2004-10-05 16:33:52 +02:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
foreach ($this->amounts as $key => $value)
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$facid = $key;
|
|
|
|
|
|
$value = trim($value);
|
2004-07-24 21:13:11 +02:00
|
|
|
|
$amount = ereg_replace(",",".",round($value, 2));
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
if (is_numeric($amount))
|
|
|
|
|
|
{
|
|
|
|
|
|
$total += $amount;
|
|
|
|
|
|
}
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
2004-10-05 16:33:52 +02:00
|
|
|
|
|
|
|
|
|
|
$total = ereg_replace(",",".",$total);
|
2004-02-10 16:27:07 +01:00
|
|
|
|
|
2005-01-18 17:23:29 +01:00
|
|
|
|
if ($total <> 0) /* On accepte les montants n<>gatifs pour les rejets de pr<70>l<EFBFBD>vement */
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)";
|
2004-07-24 21:13:11 +02:00
|
|
|
|
$sql .= " VALUES (now(), $this->datepaye, '$total', $this->paiementid, '$this->num_paiement', '$this->note', $user->id)";
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
if ( $this->db->query($sql) )
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
|
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$this->id = $this->db->last_insert_id();
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
foreach ($this->amounts as $key => $value)
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$facid = $key;
|
|
|
|
|
|
$value = trim($value);
|
2004-07-21 23:53:40 +02:00
|
|
|
|
$amount = ereg_replace(",",".",round($value, 2));
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2005-01-18 17:35:57 +01:00
|
|
|
|
if (is_numeric($amount) && $amount <> 0)
|
2004-02-10 16:27:07 +01:00
|
|
|
|
{
|
|
|
|
|
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement_facture (fk_facture, fk_paiement, amount)";
|
2004-07-21 23:53:40 +02:00
|
|
|
|
$sql .= " VALUES ('".$facid."','". $this->id."','". $amount."')";
|
2004-10-05 16:33:52 +02:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
if (! $this->db->query($sql) )
|
|
|
|
|
|
{
|
2005-01-18 17:35:57 +01:00
|
|
|
|
dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement_facture ".$facid);
|
2004-10-05 16:33:52 +02:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$sql_err++;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2005-01-18 17:35:57 +01:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
dolibarr_syslog("Paiement::Create Montant non num<75>rique");
|
|
|
|
|
|
}
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
2004-07-24 21:13:11 +02:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2005-01-18 17:35:57 +01:00
|
|
|
|
dolibarr_syslog("Paiement::Create Erreur INSERT dans paiement");
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$sql_err++;
|
|
|
|
|
|
}
|
2004-06-08 13:36:50 +02:00
|
|
|
|
}
|
2004-02-10 16:27:07 +01:00
|
|
|
|
|
2004-10-05 16:33:52 +02:00
|
|
|
|
if ( $total > 0 && $sql_err == 0 )
|
|
|
|
|
|
{
|
2004-12-30 16:20:36 +01:00
|
|
|
|
if ($no_commit == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
$this->db->commit();
|
|
|
|
|
|
}
|
2004-10-05 16:33:52 +02:00
|
|
|
|
return $this->id;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2004-12-30 16:20:36 +01:00
|
|
|
|
if ($no_commit == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
$this->db->rollback();
|
|
|
|
|
|
}
|
2004-10-05 16:33:52 +02:00
|
|
|
|
return -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
2002-12-19 15:41:37 +01:00
|
|
|
|
}
|
2004-09-14 22:53:49 +02:00
|
|
|
|
|
2004-11-16 21:11:55 +01:00
|
|
|
|
/**
|
|
|
|
|
|
* \brief Affiche la liste des modes de paiement possible
|
|
|
|
|
|
* \param name nom du champ select
|
|
|
|
|
|
* \param filtre filtre sur un sens de paiement particulier, norme ISO (CRDT=Mode propre <EFBFBD> un cr<EFBFBD>dit, DBIT=mode propre <EFBFBD> un d<EFBFBD>bit)
|
|
|
|
|
|
* \param id ???
|
2002-12-19 15:41:37 +01:00
|
|
|
|
*/
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function select($name, $filtre='', $id='')
|
2002-12-19 15:41:37 +01:00
|
|
|
|
{
|
|
|
|
|
|
$form = new Form($this->db);
|
|
|
|
|
|
|
2004-11-16 21:11:55 +01:00
|
|
|
|
if ($filtre == 'CRDT')
|
2002-12-19 19:55:38 +01:00
|
|
|
|
{
|
2004-01-30 10:58:56 +01:00
|
|
|
|
$sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (0,2) ORDER BY libelle";
|
2002-12-19 19:55:38 +01:00
|
|
|
|
}
|
2004-11-16 21:11:55 +01:00
|
|
|
|
elseif ($filtre == 'DBIT')
|
2002-12-19 19:55:38 +01:00
|
|
|
|
{
|
2004-01-30 10:58:56 +01:00
|
|
|
|
$sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (1,2) ORDER BY libelle";
|
2002-12-19 19:55:38 +01:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2004-01-30 10:58:56 +01:00
|
|
|
|
$sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement ORDER BY libelle";
|
2002-12-19 19:55:38 +01:00
|
|
|
|
}
|
|
|
|
|
|
$form->select($name, $sql, $id);
|
2002-12-19 15:41:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2004-12-16 14:26:13 +01:00
|
|
|
|
/**
|
2002-12-27 22:48:51 +01:00
|
|
|
|
*
|
|
|
|
|
|
*
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function delete()
|
2003-07-08 22:52:55 +02:00
|
|
|
|
{
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$sql = "DELETE FROM llx_paiement_facture WHERE fk_paiement = ".$this->id;
|
2003-07-08 22:52:55 +02:00
|
|
|
|
|
2004-02-10 16:27:07 +01:00
|
|
|
|
$result = $this->db->query($sql);
|
|
|
|
|
|
|
2003-07-08 22:52:55 +02:00
|
|
|
|
if ($result)
|
2004-02-10 16:27:07 +01:00
|
|
|
|
{
|
|
|
|
|
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."paiement WHERE rowid = ".$this->id;
|
|
|
|
|
|
|
|
|
|
|
|
$result = $this->db->query($sql);
|
|
|
|
|
|
|
|
|
|
|
|
return 1;
|
2003-07-08 22:52:55 +02:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2004-10-05 16:33:52 +02:00
|
|
|
|
dolibarr_print_error($this->db);
|
2003-07-08 22:52:55 +02:00
|
|
|
|
return 0;
|
2004-02-10 16:27:07 +01:00
|
|
|
|
}
|
2003-07-08 22:52:55 +02:00
|
|
|
|
}
|
2004-05-02 15:40:27 +02:00
|
|
|
|
|
|
|
|
|
|
/*
|
2004-09-14 22:53:49 +02:00
|
|
|
|
* Mise a jour du lien entre le paiement et la ligne g<EFBFBD>n<EFBFBD>r<EFBFBD>e dans llx_bank
|
2004-05-02 15:40:27 +02:00
|
|
|
|
*
|
|
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function update_fk_bank($id_bank)
|
2004-05-02 15:40:27 +02:00
|
|
|
|
{
|
|
|
|
|
|
$sql = "UPDATE llx_paiement set fk_bank = ".$id_bank." where rowid = ".$this->id;
|
|
|
|
|
|
$result = $this->db->query($sql);
|
|
|
|
|
|
if ($result)
|
2004-10-05 16:33:52 +02:00
|
|
|
|
{
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
dolibarr_print_error($this->db);
|
2004-05-02 15:40:27 +02:00
|
|
|
|
return 0;
|
2004-10-05 16:33:52 +02:00
|
|
|
|
}
|
2004-05-02 15:40:27 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2004-12-16 14:26:13 +01:00
|
|
|
|
/**
|
2005-01-11 11:30:33 +01:00
|
|
|
|
* \brief Valide le paiement
|
2004-12-16 14:26:13 +01:00
|
|
|
|
*/
|
|
|
|
|
|
function valide()
|
|
|
|
|
|
{
|
|
|
|
|
|
$sql = "UPDATE ".MAIN_DB_PREFIX."paiement SET statut = 1 WHERE rowid = ".$this->id;
|
|
|
|
|
|
$result = $this->db->query($sql);
|
2005-01-11 11:30:33 +01:00
|
|
|
|
|
2004-12-16 14:26:13 +01:00
|
|
|
|
if ($result)
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
dolibarr_syslog("Paiement::Valide Error -1");
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2004-02-09 15:41:41 +01:00
|
|
|
|
/*
|
2004-09-14 22:53:49 +02:00
|
|
|
|
* \brief Information sur l'objet
|
|
|
|
|
|
* \param id id du paiement dont il faut afficher les infos
|
2004-02-09 15:41:41 +01:00
|
|
|
|
*/
|
2004-10-20 23:06:45 +02:00
|
|
|
|
|
2004-08-07 20:51:54 +02:00
|
|
|
|
function info($id)
|
2004-02-09 15:41:41 +01:00
|
|
|
|
{
|
|
|
|
|
|
$sql = "SELECT c.rowid, ".$this->db->pdate("datec")." as datec, fk_user_creat, fk_user_modif";
|
|
|
|
|
|
$sql .= ", ".$this->db->pdate("tms")." as tms";
|
|
|
|
|
|
$sql .= " FROM ".MAIN_DB_PREFIX."paiement as c";
|
|
|
|
|
|
$sql .= " WHERE c.rowid = $id";
|
|
|
|
|
|
|
|
|
|
|
|
if ($this->db->query($sql))
|
|
|
|
|
|
{
|
|
|
|
|
|
if ($this->db->num_rows())
|
|
|
|
|
|
{
|
2004-10-23 23:02:56 +02:00
|
|
|
|
$obj = $this->db->fetch_object();
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
|
|
|
|
|
$this->id = $obj->idp;
|
|
|
|
|
|
|
2004-10-05 16:33:52 +02:00
|
|
|
|
if ($obj->fk_user_creat) {
|
2004-02-28 21:31:25 +01:00
|
|
|
|
$cuser = new User($this->db, $obj->fk_user_creat);
|
|
|
|
|
|
$cuser->fetch();
|
|
|
|
|
|
$this->user_creation = $cuser;
|
|
|
|
|
|
}
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
2004-02-28 21:31:25 +01:00
|
|
|
|
if ($obj->fk_user_modif) {
|
|
|
|
|
|
$muser = new User($this->db, $obj->fk_user_modif);
|
|
|
|
|
|
$muser->fetch();
|
|
|
|
|
|
$this->user_modification = $muser;
|
|
|
|
|
|
}
|
2004-02-09 15:41:41 +01:00
|
|
|
|
|
|
|
|
|
|
$this->date_creation = $obj->datec;
|
|
|
|
|
|
$this->date_modification = $obj->tms;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
$this->db->free();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2004-09-14 22:53:49 +02:00
|
|
|
|
dolibarr_print_error($this->db);
|
2004-02-09 15:41:41 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2002-12-19 15:41:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
?>
|