dolibarr 18.0.6
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
25require_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}
Parent class for third parties accountancy code generators.
Class to manage accountancy code of thirdparties with Panicum rules.
get_code($db, $societe, $type='')
Set accountancy account code for a third party into this->code.
info($langs)
Return description of module.
getExample($langs, $objsoc=0, $type=-1)
Return an example of result returned by getNextValue.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:123