mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix phpstan
This commit is contained in:
parent
4187e87dc4
commit
2977a1af0e
|
|
@ -5298,12 +5298,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/cashcontrol/report.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$addpercent of function vatrate expects bool, int given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/cashcontrol/report.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
|
|
@ -12342,12 +12336,6 @@ parameters:
|
|||
count: 2
|
||||
path: ../../../htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$addpercent of function vatrate expects bool, int given\.$#'
|
||||
identifier: argument.type
|
||||
count: 6
|
||||
path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#3 \$posy of method pdf_einstein\:\:_tableau_info\(\) expects int, float given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -13020,12 +13008,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$addpercent of function vatrate expects bool, int given\.$#'
|
||||
identifier: argument.type
|
||||
count: 7
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$current_line of method pdf_octopus\:\:getInfosLineLastSituation\(\) expects FactureLigne, CommonInvoiceLine given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
@ -13218,12 +13200,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$addpercent of function vatrate expects bool, int given\.$#'
|
||||
identifier: argument.type
|
||||
count: 6
|
||||
path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#3 \$posy of method pdf_sponge\:\:drawInfoTable\(\) expects int, float given\.$#'
|
||||
identifier: argument.type
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 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
|
||||
|
|
@ -450,7 +450,7 @@ if ($resql) {
|
|||
if (!empty($totalvatperrate) && is_array($totalvatperrate)) {
|
||||
print '<br><br><div class="small inline-block">'.$langs->trans("VATRate").'</div>';
|
||||
foreach ($totalvatperrate as $keyrate => $valuerate) {
|
||||
print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, 1).' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($valuerate).'</div></div>';
|
||||
print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($valuerate).'</div></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
|
|
@ -1008,7 +1008,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1044,7 +1044,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1073,13 +1073,13 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
}
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
|
@ -1114,7 +1114,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1154,7 +1154,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos Garcia <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2022-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2022-2024 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
|
|
@ -1735,7 +1735,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1772,7 +1772,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1818,13 +1818,13 @@ class pdf_octopus extends ModelePDFFactures
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
}
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
|
@ -1858,7 +1858,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1896,7 +1896,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -3643,7 +3643,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate($tvakey, 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvakey, true).$tvacompl;
|
||||
$pdf->MultiCell($width, $height, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($posx + $width, $posy + $height * $index);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2024 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2022-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
|
@ -1828,7 +1828,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1865,7 +1865,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1919,13 +1919,13 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
}
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
|
@ -1959,7 +1959,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1997,7 +1997,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user