mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-18 15:31:28 +01:00
84 lines
2.4 KiB
PHP
84 lines
2.4 KiB
PHP
<?php
|
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
* Copyright (C) 2010 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, see <http://www.gnu.org/licenses/>.
|
|
* or see http://www.gnu.org/
|
|
*/
|
|
|
|
/**
|
|
* \file htdocs/includes/modules/societe/mod_codecompta_panicum.php
|
|
* \ingroup societe
|
|
* \brief File of class to manage accountancy code of thirdparties with Panicum rules
|
|
*/
|
|
require_once(DOL_DOCUMENT_ROOT."/includes/modules/societe/modules_societe.class.php");
|
|
|
|
|
|
/**
|
|
* \class mod_codecompta_panicum
|
|
* \brief Class to manage accountancy code of thirdparties with Panicum rules
|
|
*/
|
|
class mod_codecompta_panicum extends ModeleAccountancyCode
|
|
{
|
|
var $nom='Panicum';
|
|
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
|
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
function mod_codecompta_panicum()
|
|
{
|
|
}
|
|
|
|
|
|
/** Return description of module
|
|
*
|
|
* @param $langs Object langs
|
|
* @return string Description of module
|
|
*/
|
|
function info($langs)
|
|
{
|
|
return $langs->trans("ModuleCompanyCode".$this->nom);
|
|
}
|
|
|
|
/** Return an example of result returned by getNextValue
|
|
*
|
|
* @param $langs Object langs
|
|
* @param $objsoc Object thirdparty
|
|
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
|
|
*/
|
|
function getExample($langs,$objsoc=0,$type=-1)
|
|
{
|
|
return '';
|
|
}
|
|
|
|
/**
|
|
* Set accountancy account code for a third party into this->code
|
|
*
|
|
* @param db Database handler
|
|
* @param societe Third party object
|
|
* @param type 'customer' or 'supplier'
|
|
* @return int >=0 if OK, <0 if KO
|
|
*/
|
|
function get_code($db, $societe, $type='')
|
|
{
|
|
// Renvoie toujours ok
|
|
$this->code = $societe->code_compta;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
?>
|