dolibarr 19.0.4
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
41 public $code;
42
47 public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
48
49 public $position = 10;
50
51
55 public function __construct()
56 {
57 }
58
59
66 public function info($langs)
67 {
68 return $langs->trans("ModuleCompanyCode".$this->name);
69 }
70
79 public function getExample($langs, $objsoc = 0, $type = -1)
80 {
81 return '';
82 }
83
84 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
93 public function get_code($db, $societe, $type = '')
94 {
95 // phpcs:enable
96 $this->code = '';
97
98 if (is_object($societe)) {
99 if ($type == 'supplier') {
100 $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : '');
101 } else {
102 $this->code = (($societe->code_compta != "") ? $societe->code_compta : '');
103 }
104 }
105
106 return 0; // return ok
107 }
108}
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:124