dolibarr  7.0.0-beta
mod_codecompta_panicum.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * or see http://www.gnu.org/
18  */
19 
25 require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
26 
27 
32 {
33  var $nom='Panicum';
34  var $name='Panicum';
35  var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
36 
37 
41  function __construct()
42  {
43  }
44 
45 
52  function info($langs)
53  {
54  return $langs->trans("ModuleCompanyCode".$this->name);
55  }
56 
65  function getExample($langs,$objsoc=0,$type=-1)
66  {
67  return '';
68  }
69 
78  function get_code($db, $societe, $type='')
79  {
80  $this->code='';
81 
82  if (is_object($societe)) {
83  if ($type == 'supplier') $this->code = (! empty($societe->code_compta_fournisseur)?$societe->code_compta_fournisseur:'');
84  else $this->code = (! empty($societe->code_compta)?$societe->code_compta:'');
85  }
86 
87  return 0; // return ok
88  }
89 }
90 
get_code($db, $societe, $type='')
Set accountancy account code for a third party into this->code.
Class to manage accountancy code of thirdparties with Panicum rules.
Parent class for third parties accountancy code generators.
getExample($langs, $objsoc=0, $type=-1)
Return an example of result returned by getNextValue.
info($langs)
Return description of module.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104