dolibarr/htdocs/includes/modules/facture/modules_facture.php

94 lines
2.3 KiB
PHP
Raw Normal View History

<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 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.
* or see http://www.gnu.org/
*
* $Id$
* $Source$
*
*/
function venus_get_num_explain()
{
return '
Renvoie le num<EFBFBD>ro de facture sous la forme, F-PR-030202, o<EFBFBD> PR est le pr<EFBFBD>fixe commercial de la soci<EFBFBD>t<EFBFBD>, et est suivi de la date sur un format de 6 digits avec Ann<EFBFBD>e, Mois et Jour';
}
function pluton_get_num_explain()
{
return '
Renvoie le num<EFBFBD>ro de facture sous une forme num<EFBFBD>rique simple, la premi<EFBFBD>re facture porte le num<EFBFBD>ro 1, la quinzi<EFBFBD>me facture ayant le num<EFBFBD>ro 15.';
}
2003-09-29 12:04:27 +02:00
function neptune_get_num_explain()
{
2003-09-29 12:09:36 +02:00
$texte = '
2003-09-29 12:04:27 +02:00
Identique <EFBFBD> pluton, avec un correcteur au moyen de la constante FACTURE_NEPTUNE_DELTA.';
2003-09-29 12:09:36 +02:00
if (defined("FACTURE_NEPTUNE_DELTA"))
{
$texte .= "D<EFBFBD>fini et vaut : ".FACTURE_NEPTUNE_DELTA;
2003-09-29 12:09:36 +02:00
}
else
{
$texte .= "N'est pas d<>fini";
2003-09-29 12:09:36 +02:00
}
return $texte;
2003-09-29 12:04:27 +02:00
}
function jupiter_get_num_explain()
{
return '
Syst<EFBFBD>me de num<EFBFBD>rotation mensuel sous la forme F20030715, qui correspond <EFBFBD> la 15<EFBFBD>me facture du mois de Juillet 2003';
}
function facture_pdf_create($db, $facid)
{
2003-06-22 12:11:39 +02:00
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/facture/";
if (defined("FACTURE_ADDON_PDF"))
{
$file = "pdf_".FACTURE_ADDON_PDF.".modules.php";
$classname = "pdf_".FACTURE_ADDON_PDF;
require_once($dir.$file);
$obj = new $classname($db);
2003-09-09 19:05:47 +02:00
if ( $obj->write_pdf_file($facid) > 0)
{
return 1;
}
else
{
print "Erreur";
return 0;
}
}
else
{
2003-06-22 12:11:39 +02:00
print "Erreur FACTURE_ADDON_PDF non d<>finit !";
2003-09-09 19:05:47 +02:00
return 0;
}
}
?>