fix phpstan (#37614)
* fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix * fix * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
d66ec4bc1a
commit
3245e225b0
5 changed files with 15 additions and 12 deletions
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2013-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2017-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2017-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
|
|
@ -535,7 +535,7 @@ if ($action == 'export' && $user->hasRight('blockedlog', 'read')) { // read is
|
|||
$foundoldformat = 0;
|
||||
$firstrecorddate = 0;
|
||||
global $foundoldformat, $firstrecorddate;
|
||||
include_once DOL_DOCUMENT_ROOT.'/blockedlog/admin/lifetimeamount.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/blockedlog/admin/lifetimeamount.inc.php';
|
||||
|
||||
|
||||
// Add a final line with perpetual total for invoice validations
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
|
|
@ -200,7 +200,7 @@ $morehtmlcenter = '';
|
|||
$texttop = '';
|
||||
|
||||
$registrationnumber = getHashUniqueIdOfRegistration();
|
||||
if (!userIsTaxAuditor()) {
|
||||
if (!userIsTaxAuditor()) { // @phpstan-ignore-line as it is already checked before
|
||||
$texttop = '<small class="opacitymedium">'.$langs->trans("RegistrationNumber").':</small> <small>'.dol_trunc($registrationnumber, 10).'</small>';
|
||||
if (!isRegistrationDataSavedAndPushed()) {
|
||||
$texttop = '';
|
||||
|
|
@ -708,7 +708,8 @@ if (is_array($blocks)) {
|
|||
if (empty($search_end) || $search_end == -1) {
|
||||
$search_end = dol_now();
|
||||
}
|
||||
include_once DOL_DOCUMENT_ROOT.'/blockedlog/admin/lifetimeamount.inc.php';
|
||||
global $foundoldformat, $firstrecorddate;
|
||||
include DOL_DOCUMENT_ROOT.'/blockedlog/admin/lifetimeamount.inc.php';
|
||||
|
||||
if (empty($search_code) || in_array('BILL_VALIDATE', $search_code)) {
|
||||
// Total
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2026 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -35,6 +36,8 @@
|
|||
*/
|
||||
'@phan-var-force array<string,float> $totalamountlifetime';
|
||||
'@phan-var-force array<string,float> $totalhtamountlifetime';
|
||||
'@phan-var-force int $error';
|
||||
global $foundoldformat, $firstrecorddate, $error;
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2010 Pierre Morin <pierre.morin@auguria.net>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -409,7 +409,6 @@ if ($modulepart == 'facture') {
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET pos_print_counter = pos_print_counter + 1";
|
||||
$sql .= " WHERE rowid = ".((int) $invoice->id);
|
||||
$db->query($sql);
|
||||
//var_dump($invoice);exit;
|
||||
|
||||
$invoice->pos_print_counter += 1;
|
||||
//$invoice->update($user, 1); // disabled update, we already did a direct sql update before. We disable trigger here because we already call the trigger $action = DOC_PREVIEW or DOC_DOWNLOAD just after.
|
||||
|
|
@ -424,10 +423,10 @@ if ($modulepart == 'facture') {
|
|||
$hidedesc = 0;
|
||||
$hideref = 0;
|
||||
$moreparams = '';
|
||||
$hidedetails = isset($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0);
|
||||
$hidedesc = isset($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0);
|
||||
$hideref = isset($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0);
|
||||
$moreparams = isset($moreparams) ? $moreparams : null;
|
||||
$hidedetails = isset($hidedetails) ? $hidedetails : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0); // @phpstan-ignore-line as variable $hidedetails is forced
|
||||
$hidedesc = isset($hidedesc) ? $hidedesc : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DESC') ? 1 : 0); // @phpstan-ignore-line as variable $hidedesc is forced
|
||||
$hideref = isset($hideref) ? $hideref : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_REF') ? 1 : 0); // @phpstan-ignore-line as variable $hideref is forced
|
||||
$moreparams = isset($moreparams) ? $moreparams : null; // @phpstan-ignore-line as variable $moreparams is forced
|
||||
|
||||
$result = $invoice->generateDocument($invoice->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
|
||||
if ($result < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue