dolibarr 21.0.0-alpha
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 * or see https://www.gnu.org/
19 */
20
26require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
27
28
33{
37 public $name = 'Panicum';
38
42 public $code;
43
48 public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
49
50 public $position = 10;
51
52
56 public function __construct()
57 {
58 }
59
60
67 public function info($langs)
68 {
69 return $langs->trans("ModuleCompanyCode".$this->name);
70 }
71
80 public function getExample($langs, $objsoc = '', $type = -1)
81 {
82 return '';
83 }
84
85 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
94 public function get_code($db, $societe, $type = '')
95 {
96 // phpcs:enable
97 $this->code = '';
98
99 if (is_object($societe)) {
100 if ($type == 'supplier') {
101 $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : '');
102 } else {
103 $this->code = (($societe->code_compta != "") ? $societe->code_compta : '');
104 }
105 }
106
107 return 0; // return ok
108 }
109}
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='', $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:142