dolibarr 21.0.0-alpha
modules_expensereport.php
1<?php
2/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
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 */
18
19require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
20require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
21
22
27{
28 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
36 public static function liste_modeles($db, $maxfilenamelength = 0)
37 {
38 // phpcs:enable
39 $type = 'expensereport';
40 $list = array();
41
42 include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
43 $list = getListOfModels($db, $type, $maxfilenamelength);
44
45 return $list;
46 }
47
48
49 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
61 abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0);
62}
63
77function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
78{
79 return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
80}
81
86{
93 abstract public function getNextValue($object);
94
100 abstract public function getExample();
101}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
Parent class for documents (PDF, ODT, ...) generators.
Parent class for number ref generators.
Class to manage Dolibarr database access.
Class to manage Trips and Expenses.
Parent class for trips and expenses templates.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Parent class for numbering masks of expense reports.
getExample()
Return an example of numbering.
getNextValue($object)
Return next free value.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.