dolibarr  9.0.0
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 {
38  public $nom='Panicum';
39 
43  public $name='Panicum';
44 
49  public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
50 
51 
55  function __construct()
56  {
57  }
58 
59 
66  function info($langs)
67  {
68  return $langs->trans("ModuleCompanyCode".$this->name);
69  }
70 
79  function getExample($langs,$objsoc=0,$type=-1)
80  {
81  return '';
82  }
83 
84  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
93  function get_code($db, $societe, $type='')
94  {
95  // phpcs:enable
96  $this->code='';
97 
98  if (is_object($societe)) {
99  if ($type == 'supplier') $this->code = (! empty($societe->code_compta_fournisseur)?$societe->code_compta_fournisseur:'');
100  else $this->code = (! empty($societe->code_compta)?$societe->code_compta:'');
101  }
102 
103  return 0; // return ok
104  }
105 }
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.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:103
Parent class for third parties accountancy code generators.
getExample($langs, $objsoc=0, $type=-1)
Return an example of result returned by getNextValue.
$version
Dolibarr version of the loaded document string.
info($langs)
Return description of module.