dolibarr 24.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 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
5 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 * or see https://www.gnu.org/
20 */
21
27require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
28
29
34{
38 public $name = 'Panicum';
39
43 public $code;
44
49 public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
50
54 public $position = 10;
55
56
60 public function __construct()
61 {
62 }
63
64
71 public function info($langs)
72 {
73 return $langs->trans("ModuleCompanyCode".$this->name);
74 }
75
76
85 public function getExample($langs = null, $objsoc = '', $type = -1)
86 {
87 return '';
88 }
89
90 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
99 public function get_code($db, $societe, $type = '')
100 {
101 // phpcs:enable
102 $this->code = '';
103
104 if (is_object($societe)) {
105 if ($type == 'supplier') {
106 $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : '');
107 } else {
108 $this->code = (($societe->code_compta_client != "") ? $societe->code_compta_client : '');
109 }
110 }
111
112 return 0; // return ok
113 }
114}
Parent class for third parties accountancy code generators.
Class to manage accountancy code of thirdparties with Panicum rules.
getExample($langs=null, $objsoc='', $type=-1)
Return an example of result returned by getNextValue.
get_code($db, $societe, $type='')
Set accountancy account code for a third party into this->code.
info($langs)
Return description of module.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:133