dolibarr 22.0.5
assetaccountancycodesfiscal.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
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
25require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
26
27
32{
33 // TODO This class and table should not exists and should be properties of llx_asset_asset.
34
38 public $table_element = 'asset_accountancy_codes_fiscal';
39
43 public $fk_element = 'fk_asset';
44
45 // BEGIN MODULEBUILDER PROPERTIES
50 public $fields = array(
51 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'css' => 'left', 'comment' => 'Id'),
52 //...
53 );
54
58 public $rowid;
59 // END MODULEBUILDER PROPERTIES
60
64 public $fk_asset;
65
66
72 public function __construct(DoliDB $db)
73 {
74 $this->db = $db;
75 }
76
84 public function fetch($id, $ref = null)
85 {
86 $result = $this->fetchCommon($id, $ref);
87
88 return $result;
89 }
90
98 public function delete(User $user, $notrigger = 0)
99 {
100 return $this->deleteCommon($user, $notrigger);
101 //return $this->deleteCommon($user, $notrigger, 1);
102 }
103}
$fields
Array with all fields and their property.
fetch($id, $ref=null)
Load object in memory from the database.
Parent class of all other business classes (invoices, contracts, proposals, orders,...
fetchCommon($id, $ref=null, $morewhere='', $noextrafields=0)
Load object in memory from the database.
deleteCommon(User $user, $notrigger=0, $forcechilddeletion=0)
Delete object in database.
Class to manage Dolibarr database access.
Class to manage Dolibarr users.