dolibarr  17.0.3
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 <https://www.gnu.org/licenses/>.
17  * or see https://www.gnu.org/
18  */
19 
25 require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
26 
27 
32 {
36  public $name = 'Panicum';
37 
42  public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
43 
44  public $position = 10;
45 
46 
50  public function __construct()
51  {
52  }
53 
54 
61  public function info($langs)
62  {
63  return $langs->trans("ModuleCompanyCode".$this->name);
64  }
65 
74  public function getExample($langs, $objsoc = 0, $type = -1)
75  {
76  return '';
77  }
78 
79  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
88  public function get_code($db, $societe, $type = '')
89  {
90  // phpcs:enable
91  $this->code = '';
92 
93  if (is_object($societe)) {
94  if ($type == 'supplier') {
95  $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : '');
96  } else {
97  $this->code = (($societe->code_compta != "") ? $societe->code_compta : '');
98  }
99  }
100 
101  return 0; // return ok
102  }
103 }
mod_codecompta_panicum\get_code
get_code($db, $societe, $type='')
Set accountancy account code for a third party into this->code.
Definition: mod_codecompta_panicum.php:88
mod_codecompta_panicum\getExample
getExample($langs, $objsoc=0, $type=-1)
Return an example of result returned by getNextValue.
Definition: mod_codecompta_panicum.php:74
mod_codecompta_panicum\info
info($langs)
Return description of module.
Definition: mod_codecompta_panicum.php:61
name
$conf db name
Definition: repair.php:122
ModeleAccountancyCode
Parent class for third parties accountancy code generators.
Definition: modules_societe.class.php:277
code
print *****$script_file(".$version.") pid code
! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge,...
Definition: sync_members_ldap2dolibarr.php:60
mod_codecompta_panicum
Class to manage accountancy code of thirdparties with Panicum rules.
Definition: mod_codecompta_panicum.php:31
mod_codecompta_panicum\__construct
__construct()
Constructor.
Definition: mod_codecompta_panicum.php:50