dolibarr/htdocs/expensereport/class/paymentexpensereport.class.php

789 lines
22 KiB
PHP
Raw Permalink Normal View History

2015-06-16 05:45:47 +02:00
<?php
2019-01-28 21:39:22 +01:00
/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
2018-03-10 15:06:02 +01:00
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
2015-06-16 05:45:47 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2015-06-16 05:45:47 +02:00
*/
/**
* \file htdocs/expensereport/class/paymentexpensereport.class.php
* \ingroup Expense Report
* \brief File of class to manage payment of expense report
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
/**
* Class to manage payments of expense report
2015-06-16 05:45:47 +02:00
*/
class PaymentExpenseReport extends CommonObject
{
2018-08-23 18:35:45 +02:00
/**
* @var string ID to identify managed object
*/
public $element = 'payment_expensereport';
2018-08-28 08:33:02 +02:00
2018-08-22 18:48:53 +02:00
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'payment_expensereport';
2018-08-28 08:33:02 +02:00
/**
2018-09-05 12:21:13 +02:00
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';
2015-06-16 05:45:47 +02:00
2018-10-09 08:53:08 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $rowid;
2015-06-16 05:45:47 +02:00
2018-10-10 11:30:33 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $fk_expensereport;
2018-10-10 11:30:33 +02:00
2024-03-12 21:55:40 +01:00
/**
* @var int|string
*/
public $datec = '';
2024-03-12 21:55:40 +01:00
/**
* @var int|string
*/
public $datep = '';
/**
* @var float|int
*/
public $amount; // Total amount of payment
/**
* @var array<float|int>
*/
public $amounts = array(); // Array of amounts
2018-10-10 11:30:33 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $fk_typepayment;
2018-10-10 11:30:33 +02:00
/**
* @var string Payment reference
* (Cheque or bank transfer reference. Can be "ABC123")
*/
2018-09-05 12:21:13 +02:00
public $num_payment;
2018-10-10 11:30:33 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $fk_bank;
2018-10-10 11:30:33 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $fk_user_creat;
2018-10-10 11:30:33 +02:00
/**
* @var int ID
*/
2018-09-05 12:21:13 +02:00
public $fk_user_modif;
2018-10-10 11:30:33 +02:00
/**
* @var string
*/
public $type_code;
/**
* @var string
*/
public $type_label;
/**
* @var int
*/
public $bank_account;
/**
* @var int
*/
public $bank_line;
/**
* @var string
*/
public $label;
2015-06-16 05:45:47 +02:00
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
2019-02-25 20:35:59 +01:00
public function __construct($db)
2015-06-16 05:45:47 +02:00
{
$this->db = $db;
}
/**
* Create payment of expense report into database.
* Use this->amounts to have list of lines for the payment
*
2015-06-16 05:45:47 +02:00
* @param User $user User making payment
2023-12-06 15:46:39 +01:00
* @return int Return integer <0 if KO, id of payment if OK
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function create($user)
2015-06-16 05:45:47 +02:00
{
$error = 0;
2015-06-16 05:45:47 +02:00
$now = dol_now();
// Validate parameters
if (!$this->datep) {
$this->error = 'ErrorBadValueForParameterCreatePaymentExpenseReport';
2015-06-16 05:45:47 +02:00
return -1;
}
// Clean parameters
2021-02-25 22:45:02 +01:00
if (isset($this->fk_expensereport)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_expensereport = (int) $this->fk_expensereport;
2021-02-25 22:45:02 +01:00
}
if (isset($this->amount)) {
2024-03-17 13:21:34 +01:00
$this->amount = (float) $this->amount;
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_typepayment)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_typepayment = (int) $this->fk_typepayment;
2021-02-25 22:45:02 +01:00
}
if (isset($this->num_payment)) {
$this->num_payment = trim($this->num_payment);
}
if (isset($this->note)) {
$this->note = trim($this->note);
}
if (isset($this->note_public)) {
$this->note_public = trim($this->note_public);
}
2022-08-12 15:45:27 +02:00
if (isset($this->note_private)) {
$this->note_private = trim($this->note_private);
}
2021-02-25 22:45:02 +01:00
if (isset($this->fk_bank)) {
2022-08-12 15:45:27 +02:00
$this->fk_bank = ((int) $this->fk_bank);
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_user_creat)) {
2022-08-12 15:45:27 +02:00
$this->fk_user_creat = ((int) $this->fk_user_creat);
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_user_modif)) {
2022-08-12 15:45:27 +02:00
$this->fk_user_modif = ((int) $this->fk_user_modif);
2021-02-25 22:45:02 +01:00
}
2015-06-16 05:45:47 +02:00
$totalamount = 0;
2021-02-25 22:45:02 +01:00
foreach ($this->amounts as $key => $value) { // How payment is dispatch
2024-03-17 13:15:37 +01:00
$newvalue = (float) price2num($value, 'MT');
$this->amounts[$key] = $newvalue;
$totalamount += $newvalue;
}
2024-03-17 13:17:51 +01:00
// $totalamount = (float) price2num($totalamount);
2015-06-16 05:45:47 +02:00
// Check parameters
2021-02-25 22:45:02 +01:00
if ($totalamount == 0) {
return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null
}
2015-06-16 05:45:47 +02:00
$this->db->begin();
2021-02-25 22:45:02 +01:00
if ($totalamount != 0) {
2015-06-16 05:45:47 +02:00
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_expensereport (fk_expensereport, datec, datep, amount,";
$sql .= " fk_typepayment, num_payment, note, fk_user_creat, fk_bank)";
$sql .= " VALUES ($this->fk_expensereport, '".$this->db->idate($now)."',";
$sql .= " '".$this->db->idate($this->datep)."',";
2021-06-14 13:51:09 +02:00
$sql .= " ".price2num($totalamount).",";
2021-07-25 08:35:03 +02:00
$sql .= " ".((int) $this->fk_typepayment).", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_public)."', ".((int) $user->id).",";
2022-08-12 15:45:27 +02:00
$sql .= " 0)"; // fk_bank is ID of transaction into ll_bank
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if ($resql) {
2015-06-16 05:45:47 +02:00
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_expensereport");
2020-05-21 15:05:19 +02:00
} else {
2015-06-16 05:45:47 +02:00
$error++;
}
}
2021-02-25 22:45:02 +01:00
if ($totalamount != 0 && !$error) {
$this->amount = $totalamount;
$this->db->commit();
2015-06-16 05:45:47 +02:00
return $this->id;
2020-05-21 15:05:19 +02:00
} else {
$this->error = $this->db->error();
2015-06-16 05:45:47 +02:00
$this->db->rollback();
return -1;
}
}
/**
* Load object in memory from database
*
2019-02-25 20:35:59 +01:00
* @param int $id Id object
2023-12-01 19:51:32 +01:00
* @return int Return integer <0 if KO, >0 if OK
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function fetch($id)
2015-06-16 05:45:47 +02:00
{
$sql = "SELECT";
$sql .= " t.rowid,";
$sql .= " t.fk_expensereport,";
$sql .= " t.datec,";
$sql .= " t.tms,";
$sql .= " t.datep,";
$sql .= " t.amount,";
$sql .= " t.fk_typepayment,";
$sql .= " t.num_payment,";
$sql .= " t.note as note_public,";
$sql .= " t.fk_bank,";
$sql .= " t.fk_user_creat,";
$sql .= " t.fk_user_modif,";
$sql .= " pt.code as type_code, pt.libelle as type_label,";
$sql .= ' b.fk_account';
$sql .= " FROM ".MAIN_DB_PREFIX."payment_expensereport as t";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid';
2021-03-14 11:48:39 +01:00
$sql .= " WHERE t.rowid = ".((int) $id);
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if ($resql) {
if ($this->db->num_rows($resql)) {
2015-06-16 05:45:47 +02:00
$obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;
$this->ref = $obj->rowid;
$this->fk_expensereport = $obj->fk_expensereport;
2015-06-16 05:45:47 +02:00
$this->datec = $this->db->jdate($obj->datec);
$this->tms = $this->db->jdate($obj->tms);
2015-06-16 05:45:47 +02:00
$this->datep = $this->db->jdate($obj->datep);
$this->amount = $obj->amount;
$this->fk_typepayment = $obj->fk_typepayment;
2015-06-16 05:45:47 +02:00
$this->num_payment = $obj->num_payment;
$this->note_public = $obj->note_public;
$this->fk_bank = $obj->fk_bank;
2015-06-16 05:45:47 +02:00
$this->fk_user_creat = $obj->fk_user_creat;
$this->fk_user_modif = $obj->fk_user_modif;
$this->type_code = $obj->type_code;
$this->type_label = $obj->type_label;
2015-06-16 05:45:47 +02:00
$this->bank_account = $obj->fk_account;
$this->bank_line = $obj->fk_bank;
2015-06-16 05:45:47 +02:00
}
$this->db->free($resql);
return 1;
2020-05-21 15:05:19 +02:00
} else {
$this->error = "Error ".$this->db->lasterror();
2015-06-16 05:45:47 +02:00
return -1;
}
}
// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
2015-06-16 05:45:47 +02:00
/**
* Update database
*
* @param User $user User that modify
* @param int $notrigger 0=launch triggers after, 1=disable triggers
2023-12-01 19:51:32 +01:00
* @return int Return integer <0 if KO, >0 if OK
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function update($user = null, $notrigger = 0)
2015-06-16 05:45:47 +02:00
{
// phpcs:enable
$error = 0;
2015-06-16 05:45:47 +02:00
// Clean parameters
2021-02-25 22:45:02 +01:00
if (isset($this->fk_expensereport)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_expensereport = (int) $this->fk_expensereport;
2021-02-25 22:45:02 +01:00
}
if (isset($this->amount)) {
2024-03-17 13:21:34 +01:00
$this->amount = (float) $this->amount;
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_typepayment)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_typepayment = (int) $this->fk_typepayment;
2021-02-25 22:45:02 +01:00
}
if (isset($this->num_payment)) {
$this->num_payment = trim($this->num_payment);
}
if (isset($this->note)) {
$this->note = trim($this->note);
}
if (isset($this->fk_bank)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_bank = (int) $this->fk_bank;
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_user_creat)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_user_creat = (int) $this->fk_user_creat;
2021-02-25 22:45:02 +01:00
}
if (isset($this->fk_user_modif)) {
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_user_modif = (int) $this->fk_user_modif;
2021-02-25 22:45:02 +01:00
}
2015-06-16 05:45:47 +02:00
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET";
$sql .= " fk_expensereport=".(isset($this->fk_expensereport) ? $this->fk_expensereport : "null").",";
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
$sql .= " amount=".(isset($this->amount) ? $this->amount : "null").",";
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";
$sql .= " num_payment=".(isset($this->num_payment) ? "'".$this->db->escape($this->num_payment)."'" : "null").",";
$sql .= " note=".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : "null").",";
$sql .= " fk_bank=".(isset($this->fk_bank) ? $this->fk_bank : "null").",";
$sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? $this->fk_user_creat : "null").",";
2022-12-28 13:04:11 +01:00
$sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null");
2021-03-14 12:20:23 +01:00
$sql .= " WHERE rowid=".((int) $this->id);
2015-06-16 05:45:47 +02:00
$this->db->begin();
dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if (!$resql) {
2023-12-04 12:12:12 +01:00
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
2021-02-25 22:45:02 +01:00
}
2015-06-16 05:45:47 +02:00
// Commit or rollback
2021-02-25 22:45:02 +01:00
if ($error) {
foreach ($this->errors as $errmsg) {
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
2015-06-16 05:45:47 +02:00
}
$this->db->rollback();
return -1 * $error;
2020-05-21 15:05:19 +02:00
} else {
2015-06-16 05:45:47 +02:00
$this->db->commit();
return 1;
}
}
// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
2015-06-16 05:45:47 +02:00
/**
* Delete object in database
*
2019-02-25 20:35:59 +01:00
* @param User $user User that delete
2015-06-16 05:45:47 +02:00
* @param int $notrigger 0=launch triggers after, 1=disable triggers
2023-12-01 19:51:32 +01:00
* @return int Return integer <0 if KO, >0 if OK
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function delete($user, $notrigger = 0)
2015-06-16 05:45:47 +02:00
{
// phpcs:enable
$error = 0;
2015-06-16 05:45:47 +02:00
$this->db->begin();
2021-02-25 22:45:02 +01:00
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
2021-08-23 18:56:46 +02:00
$sql .= " WHERE type='payment_expensereport' AND url_id=".((int) $this->id);
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if (!$resql) {
2023-12-04 12:12:12 +01:00
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
2021-02-25 22:45:02 +01:00
}
}
2015-06-16 05:45:47 +02:00
2021-02-25 22:45:02 +01:00
if (!$error) {
2015-06-16 05:45:47 +02:00
$sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_expensereport";
2021-03-14 12:20:23 +01:00
$sql .= " WHERE rowid=".((int) $this->id);
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
2015-06-16 05:45:47 +02:00
}
// Commit or rollback
2021-02-25 22:45:02 +01:00
if ($error) {
foreach ($this->errors as $errmsg) {
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
2015-06-16 05:45:47 +02:00
}
$this->db->rollback();
return -1 * $error;
2020-05-21 15:05:19 +02:00
} else {
2015-06-16 05:45:47 +02:00
$this->db->commit();
return 1;
}
}
/**
* Load an object from its id and create a new one in database
*
* @param User $user User making the clone
2015-06-16 05:45:47 +02:00
* @param int $fromid Id of object to clone
* @return int New id of clone
*/
public function createFromClone(User $user, $fromid)
2015-06-16 05:45:47 +02:00
{
$error = 0;
2015-06-16 05:45:47 +02:00
$object = new PaymentExpenseReport($this->db);
2015-06-16 05:45:47 +02:00
$this->db->begin();
// Load source object
$object->fetch($fromid);
$object->id = 0;
$object->statut = 0;
2015-06-16 05:45:47 +02:00
// Clear fields
// ...
// Create clone
$object->context['createfromclone'] = 'createfromclone';
$result = $object->create($user);
2015-06-16 05:45:47 +02:00
// Other options
2021-02-25 22:45:02 +01:00
if ($result < 0) {
$this->error = $object->error;
2015-06-16 05:45:47 +02:00
$error++;
}
unset($object->context['createfromclone']);
2015-06-16 05:45:47 +02:00
// End
2021-02-25 22:45:02 +01:00
if (!$error) {
2015-06-16 05:45:47 +02:00
$this->db->commit();
return $object->id;
2020-05-21 15:05:19 +02:00
} else {
2015-06-16 05:45:47 +02:00
$this->db->rollback();
return -1;
}
}
/**
2023-04-08 15:08:55 +02:00
* Return the label of the status
*
2023-04-08 15:08:55 +02:00
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label of status
*/
2019-02-25 20:35:59 +01:00
public function getLibStatut($mode = 0)
{
return '';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
2023-04-08 15:08:55 +02:00
* Return the label of a given status
*
2023-04-08 15:08:55 +02:00
* @param int $status Id status
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label of status
*/
public function LibStatut($status, $mode = 0)
{
// phpcs:enable
2023-04-08 15:08:55 +02:00
//global $langs;
2017-06-09 09:25:15 +02:00
return '';
}
2015-06-16 05:45:47 +02:00
/**
* Initialise an instance with random values.
* Used to build previews or test instances.
* id must be 0 if object instance is a specimen.
*
* @return int
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function initAsSpecimen()
2015-06-16 05:45:47 +02:00
{
$this->id = 0;
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_expensereport = 0;
2024-03-15 15:16:22 +01:00
$this->datec = dol_now();
$this->tms = dol_now();
2024-03-15 15:16:22 +01:00
$this->datep = dol_now();
$this->amount = 100;
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_typepayment = 0;
2024-03-15 15:16:22 +01:00
$this->num_payment = '123456';
$this->note_public = 'Public note';
$this->note_private = 'Private note';
qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string.
2024-01-30 22:36:41 +01:00
$this->fk_bank = 0;
$this->fk_user_creat = 0;
$this->fk_user_modif = 0;
return 1;
2015-06-16 05:45:47 +02:00
}
/**
* Add record into bank for payment with links between this bank record and invoices of payment.
* All payment properties must have been set first like after a call to create().
*
* @param User $user Object of user making payment
* @param string $mode 'payment_expensereport'
* @param string $label Label to use in bank record
* @param int $accountid Id of bank account to do link with
* @param string $emetteur_nom Name of transmitter
* @param string $emetteur_banque Name of bank
2023-12-01 19:51:32 +01:00
* @return int Return integer <0 if KO, >0 if OK
*/
public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
{
2024-03-15 15:16:22 +01:00
global $langs;
$error = 0;
Fix: Replace deprecated modulename with new in isModEnabled (#28452) * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan. * Fix: Replace deprecated modulename with new in isModEnabled # Fix: Replace deprecated modulename with new in isModEnabled Replacement of old module names performed with dedicated detection and fixer in phan.
2024-02-27 15:30:37 +01:00
if (isModEnabled("bank")) {
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$acc = new Account($this->db);
$acc->fetch($accountid);
//Fix me field
$total = $this->amount;
$amount = 0;
2021-02-25 22:45:02 +01:00
if ($mode == 'payment_expensereport') {
$amount = $total;
}
// Insert payment into llx_bank
$bank_line_id = $acc->addline(
$this->datep,
$this->fk_typepayment, // Payment mode id or code ("CHQ or VIR for example")
$label,
-$amount,
$this->num_payment,
0,
$user,
$emetteur_nom,
$emetteur_banque
);
// Update fk_bank in llx_paiement.
// So we will know the payment that has generated the bank transaction
2021-02-25 22:45:02 +01:00
if ($bank_line_id > 0) {
$result = $this->update_fk_bank($bank_line_id);
2021-02-25 22:45:02 +01:00
if ($result <= 0) {
$error++;
dol_print_error($this->db);
}
// Add link 'payment', 'payment_supplier', 'payment_expensereport' in bank_url between payment and bank transaction
$url = '';
2021-02-25 22:45:02 +01:00
if ($mode == 'payment_expensereport') {
$url = DOL_URL_ROOT.'/expensereport/payment/card.php?rowid=';
}
if ($url) {
$result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode);
2021-02-25 22:45:02 +01:00
if ($result <= 0) {
$error++;
dol_print_error($this->db);
}
}
// Add link 'user' in bank_url between user and bank transaction
2021-02-25 22:45:02 +01:00
if (!$error) {
foreach ($this->amounts as $key => $value) { // We should have always same user but we loop in case of.
if ($mode == 'payment_expensereport') {
$fuser = new User($this->db);
$fuser->fetch($key);
$result = $acc->add_url_line(
$bank_line_id,
$fuser->id,
DOL_URL_ROOT.'/user/card.php?id=',
$fuser->getFullName($langs),
'user'
);
2021-02-25 22:45:02 +01:00
if ($result <= 0) {
$this->error = $this->db->lasterror();
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
$error++;
}
}
}
}
} else {
$this->error = $acc->error;
2022-08-12 15:45:27 +02:00
$this->errors = $acc->errors;
$error++;
}
}
2021-02-25 22:45:02 +01:00
if (!$error) {
return 1;
} else {
return -1;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2015-06-16 05:45:47 +02:00
/**
* Update link between the expense report payment and the generated line in llx_bank
*
* @param int $id_bank Id if bank
* @return int >0 if OK, <=0 if KO
*/
2019-02-25 20:35:59 +01:00
public function update_fk_bank($id_bank)
2015-06-16 05:45:47 +02:00
{
// phpcs:enable
2021-03-30 03:37:54 +02:00
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id);
2015-06-16 05:45:47 +02:00
dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG);
$result = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if ($result) {
2015-06-16 05:45:47 +02:00
return 1;
2020-05-21 15:05:19 +02:00
} else {
$this->error = $this->db->error();
2015-06-16 05:45:47 +02:00
return 0;
}
}
/**
* Return clickable name (with picto eventually)
2015-06-16 05:45:47 +02:00
*
2019-02-25 20:35:59 +01:00
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen Longueur max libelle
* @return string Chaine avec URL
2015-06-16 05:45:47 +02:00
*/
2019-02-25 20:35:59 +01:00
public function getNomUrl($withpicto = 0, $maxlen = 0)
2015-06-16 05:45:47 +02:00
{
2021-11-22 19:57:26 +01:00
global $langs, $hookmanager;
2015-06-16 05:45:47 +02:00
$result = '';
2015-06-16 05:45:47 +02:00
2021-02-25 22:45:02 +01:00
if (empty($this->ref)) {
$this->ref = $this->label;
}
2022-01-24 23:58:31 +01:00
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Payment").'</u>';
if (isset($this->status)) {
$label .= ' '.$this->getLibStatut(5);
}
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}
if (!empty($this->datep)) {
$label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->datep, 'dayhour');
}
2015-06-16 05:45:47 +02:00
2021-02-25 22:45:02 +01:00
if (!empty($this->id)) {
2015-06-16 05:45:47 +02:00
$link = '<a href="'.DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend = '</a>';
2015-06-16 05:45:47 +02:00
2021-02-25 22:45:02 +01:00
if ($withpicto) {
$result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' ');
}
if ($withpicto && $withpicto != 2) {
$result .= ' ';
}
if ($withpicto != 2) {
2023-12-04 12:12:12 +01:00
$result .= $link.($maxlen ? dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
2021-02-25 22:45:02 +01:00
}
2015-06-16 05:45:47 +02:00
}
2021-11-22 19:57:26 +01:00
global $action;
2022-02-15 19:04:18 +01:00
$hookmanager->initHooks(array($this->element . 'dao'));
$parameters = array('id' => $this->id, 'getnomurl' => &$result);
2021-11-22 19:57:26 +01:00
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
} else {
$result .= $hookmanager->resPrint;
}
2015-06-16 05:45:47 +02:00
return $result;
}
/**
* Tab information on object
*
* @param int $id Payment id
* @return void
*/
public function info($id)
{
$sql = 'SELECT e.rowid, e.datec, e.fk_user_creat, e.fk_user_modif, e.tms';
$sql .= ' FROM '.MAIN_DB_PREFIX.'payment_expensereport as e';
2021-03-14 11:48:39 +01:00
$sql .= ' WHERE e.rowid = '.((int) $id);
dol_syslog(get_class($this).'::info', LOG_DEBUG);
$result = $this->db->query($sql);
2021-02-25 22:45:02 +01:00
if ($result) {
if ($this->db->num_rows($result)) {
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
$this->user_creation_id = $obj->fk_user_creat;
$this->user_modification_id = $obj->fk_user_modif;
2019-02-25 20:35:59 +01:00
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_modification = $this->db->jdate($obj->tms);
}
$this->db->free($result);
2020-05-21 15:05:19 +02:00
} else {
dol_print_error($this->db);
}
}
2023-12-04 12:12:12 +01:00
/**
* Return clickable link of object (with eventually picto)
*
qual: Method getKanbanView() has parameter $arraydata with no value type specified in iterable type array. (#30712) * Update adherent.class.php * Update adherent_type.class.php * Update availabilities.class.php * Update propal.class.php * Update account.class.php * Update paymentvarious.class.php * Update cashcontrol.class.php * Update localtax.class.php * Update remisecheque.class.php * Update bonprelevement.class.php * Update chargesociales.class.php * Update contact.class.php * Update contrat.class.php * Update commonorder.class.php * Update timespent.class.php * Update don.class.php * Update conferenceorbooth.class.php * Update expedition.class.php * Update expensereport.class.php * Update paymentexpensereport.class.php * Update fichinter.class.php * Update fournisseur.commande.class.php * Update holiday.class.php * Update evaluation.class.php * Update job.class.php * Update position.class.php * Update skill.class.php * Update intracommreport.class.php * Update knowledgerecord.class.php * Update loan.class.php * Update mo.class.php * Update partnership.class.php * Update inventory.class.php * Update entrepot.class.php * Update project.class.php * Update holiday.class.php - fix phan error * Update task.class.php * Update reception.class.php * Update recruitmentcandidature.class.php * Update recruitmentjobposition.class.php * Update paymentsalary.class.php * Update salary.class.php * Update supplier_proposal.class.php * Update ticket.class.php * Update user.class.php * Update usergroup.class.php * Update webportalinvoice.class.php * Update webportalorder.class.php * Update webportalpropal.class.php * Update workstation.class.php * Update facture.class.php
2024-08-22 03:31:04 +02:00
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param ?array<string,mixed> $arraydata Array of data
qual: Method getKanbanView() has parameter $arraydata with no value type specified in iterable type array. (#30712) * Update adherent.class.php * Update adherent_type.class.php * Update availabilities.class.php * Update propal.class.php * Update account.class.php * Update paymentvarious.class.php * Update cashcontrol.class.php * Update localtax.class.php * Update remisecheque.class.php * Update bonprelevement.class.php * Update chargesociales.class.php * Update contact.class.php * Update contrat.class.php * Update commonorder.class.php * Update timespent.class.php * Update don.class.php * Update conferenceorbooth.class.php * Update expedition.class.php * Update expensereport.class.php * Update paymentexpensereport.class.php * Update fichinter.class.php * Update fournisseur.commande.class.php * Update holiday.class.php * Update evaluation.class.php * Update job.class.php * Update position.class.php * Update skill.class.php * Update intracommreport.class.php * Update knowledgerecord.class.php * Update loan.class.php * Update mo.class.php * Update partnership.class.php * Update inventory.class.php * Update entrepot.class.php * Update project.class.php * Update holiday.class.php - fix phan error * Update task.class.php * Update reception.class.php * Update recruitmentcandidature.class.php * Update recruitmentjobposition.class.php * Update paymentsalary.class.php * Update salary.class.php * Update supplier_proposal.class.php * Update ticket.class.php * Update user.class.php * Update usergroup.class.php * Update webportalinvoice.class.php * Update webportalorder.class.php * Update webportalpropal.class.php * Update workstation.class.php * Update facture.class.php
2024-08-22 03:31:04 +02:00
* @return string HTML Code for Kanban thumb.
*/
2023-01-18 22:27:52 +01:00
public function getKanbanView($option = '', $arraydata = null)
{
global $langs;
2023-03-07 22:04:40 +01:00
$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
$return = '<div class="box-flex-item box-flex-grow-zero">';
$return .= '<div class="info-box info-box-sm">';
$return .= '<span class="info-box-icon bg-infobox-action">';
$return .= img_picto('', $this->picto);
$return .= '</span>';
$return .= '<div class="info-box-content">';
2023-05-11 11:03:26 +02:00
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'</span>';
2023-10-17 15:43:56 +02:00
if ($selected >= 0) {
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
if (property_exists($this, 'datep')) {
$return .= '<br><span class="opacitymedium">'.$langs->trans("Date").'</span> : <span class="info-box-label">'.dol_print_date($this->db->jdate($this->datep), 'dayhour').'</span>';
}
if (property_exists($this, 'fk_typepayment')) {
$return .= '<br><span class="opacitymedium">'.$langs->trans("Type").'</span> : <span class="info-box-label">'.$this->fk_typepayment.'</span>';
}
if (property_exists($this, 'fk_bank') && !is_null($this->fk_bank)) {
Fix #28071 - New branch to fix bad merge (#28083) * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Qual: Introduce getDataToShowPhoto to prepare generic code * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Fix missing trans * Fix langs * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Remove useless files in web templates * Clean code * Fix duplicate translation key * Fix duplicate translation key * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Fix duplicate key * Fix $object * Debug v19 * WIP SMSing * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * WIP EMAILINGS_SUPPORT_ALSO_SMS * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * WIP SMSing * Debug the "validate" feature * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Clean code * Move rights->x->y into hasRight('x', 'y') * Move rights->x->y into hasRight('x', 'y') * Move rights->x->y into hasRight('x', 'y') * Move rights->x->y into hasRight('x', 'y') * Move rights->x->y into hasRight('x', 'y') * Move rights->x->y into hasRight('x', 'y') * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Enhance rector to fix empty($user->rights->modulex->perm1) * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Fix template to use v19 dev rules * Fix use v19 dev rules * Fix phpunit * Debug v19 * Clean code * Use rector to convert user->rights into user->hasRight * Clean code * Use rector to convert user->rights into user->hasRight * Use rector to convert user->rights into user->hasRight * Clean code * Fix phpcs * add editorconfig for sql files (#27999) Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * add model_pdf field in llx_ticket-ticket.sql (#27996) * add model_pdf field in llx_ticket-ticket.sql * Update 19.0.0-20.0.0.sql * Update 19.0.0-20.0.0.sql * Improve wording in README (#27994) * fix phpstan (#27989) * fix phpstan * Update UserRightsToFunction.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> * Qual: Fix spelling/working in datapolicy translations (#28006) # Qual: Fix spelling/wording in datapolicy translations Fixed some spelling and wording in datapolicy translations. * qual: phpstan for htdocs/ticket/class/ticketstats.class.php (#27986) htdocs/ticket/class/ticketstats.class.php 98 Parameter #1 $year (string) of method TicketStats::getNbByMonth() should be compatible with parameter $year (int) of method Stats::getNbByMonth() * Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop * Fix user with readonly perm on email template must be able to read. * Fix doc * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Better message * Add missing fields in merge of thirdparty * Debug v19 selection of ticket printer per terminal * Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop * Use constant * NEW: Adding a recipient on emails sent, change status to sent partialy. * fix travis (#28052) * fix travis * Update partnership.class.php * fix php doc (#28047) * fix undefined array key (#28048) * Add region and departament for Cuba (#28046) * Update llx_10_c_regions.sql Add Cuba Regions (id_country=77) * Update llx_20_c_departements.sql Add Provinces Cuba (id country=77) * Find the typo (#28050) * Find the typo * clean code * add last_main_doc field to product (#28045) * add las_main_doc field to product * add field fetch * NEW Add Categorie filter for ActionComm (#28041) * New Add Categorie filter for ActionComm New Add Categorie filter for ActionComm * Fix space errors Fix space errors * Fix space errors 2 Fix space errors 2 * Update cunits.class.php (#28056) FIX: error SQL when creating a Cunit * Update codespell-lines-ignore.txt to avoid PR merge conflict --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr> Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com> Co-authored-by: thibdrev <thibault.drevet@gmail.com> Co-authored-by: sonikf <93765174+sonikf@users.noreply.github.com> Co-authored-by: Ikarus <44511582+LeKarSol@users.noreply.github.com> Co-authored-by: Anthony Damhet <73399671+EchoLoGeek@users.noreply.github.com> Co-authored-by: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com>
2024-02-09 15:58:49 +01:00
$return .= '<br><span class="opacitymedium">'.$langs->trans("BankAccount").'</span> : <span class="info-box-label">'.$this->fk_bank.'</span>';
}
2023-12-04 12:12:12 +01:00
if (property_exists($this, 'amount')) {
$return .= '<br><span class="opacitymedium">'.$langs->trans("Amount").'</span> : <span class="info-box-label amount">'.price($this->amount).'</span>';
}
if (method_exists($this, 'getLibStatut')) {
2023-12-19 11:51:48 +01:00
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
}
$return .= '</div>';
$return .= '</div>';
$return .= '</div>';
return $return;
}
2015-06-16 05:45:47 +02:00
}