mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Ottimizzazione file con php8.1
This commit is contained in:
parent
de4759fd5b
commit
477a56e953
@ -15,6 +15,7 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
__DIR__ . '/modules',
|
||||
__DIR__ . '/plugins',
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/templates',
|
||||
__DIR__ . '/update',
|
||||
]);
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$format = (isset($_SESSION['dashboard']['format'])) ? $_SESSION['dashboard']['format'] : 'A4';
|
||||
$orientation = (isset($_SESSION['dashboard']['orientation'])) ? $_SESSION['dashboard']['orientation'] : 'L';
|
||||
$format = $_SESSION['dashboard']['format'] ?? 'A4';
|
||||
$orientation = $_SESSION['dashboard']['orientation'] ?? 'L';
|
||||
|
||||
return [
|
||||
'format' => $format,
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$format = (isset($_SESSION['dashboard']['format'])) ? $_SESSION['dashboard']['format'] : 'A4';
|
||||
$orientation = (isset($_SESSION['dashboard']['orientation'])) ? $_SESSION['dashboard']['orientation'] : 'L';
|
||||
$format = $_SESSION['dashboard']['format'] ?? 'A4';
|
||||
$orientation = $_SESSION['dashboard']['orientation'] ?? 'L';
|
||||
|
||||
return [
|
||||
'format' => $format,
|
||||
|
@ -47,8 +47,8 @@ $azienda = $dbo->fetchOne('SELECT *, (SELECT `iban` FROM `co_banche` WHERE `id`
|
||||
* @deprecated
|
||||
*/
|
||||
$replace = [
|
||||
'c_' => isset($cliente) ? $cliente : [],
|
||||
'f_' => isset($azienda) ? $azienda : [],
|
||||
'c_' => $cliente ?? [],
|
||||
'f_' => $azienda ?? [],
|
||||
];
|
||||
|
||||
// Rinominazione di particolari campi all'interno delle informazioni su anagrafica e azienda
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
||||
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||
|
||||
return [
|
||||
'format' => $format,
|
||||
|
@ -45,9 +45,7 @@ if (!setting('Visualizza riferimento su ogni riga in stampa')) {
|
||||
|
||||
$columns = 7;
|
||||
|
||||
$has_image = $righe->search(function ($item) {
|
||||
return !empty($item->articolo->immagine);
|
||||
}) !== false && $options['images'] == true;
|
||||
$has_image = $righe->search(fn($item) => !empty($item->articolo->immagine)) !== false && $options['images'] == true;
|
||||
|
||||
if ($has_image) {
|
||||
++$columns;
|
||||
|
@ -54,9 +54,7 @@ if ($pagamento && $pagamento->isRiBa()) {
|
||||
// Righe documento
|
||||
$righe = $documento->getRighe();
|
||||
|
||||
$has_image = $righe->search(function ($item) {
|
||||
return !empty($item->articolo->immagine);
|
||||
}) !== false && $options['images'] == true;
|
||||
$has_image = $righe->search(fn($item) => !empty($item->articolo->immagine)) !== false && $options['images'] == true;
|
||||
|
||||
$columns = $options['no-iva'] ? 5 : 6;
|
||||
$columns = $options['pricing'] ? $columns : 3;
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
||||
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||
|
||||
return [
|
||||
'format' => $format,
|
||||
|
@ -17,8 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
||||
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||
|
||||
return [
|
||||
'format' => $format,
|
||||
|
@ -45,7 +45,7 @@ $somma_totale_imponibile[] = $totale_imponibile;
|
||||
$somma_iva[] = $iva;
|
||||
$somma_totale_ivato[] = $totale_ivato;
|
||||
|
||||
$pricing = isset($pricing) ? $pricing : true;
|
||||
$pricing ??= true;
|
||||
|
||||
// Informazioni intervento
|
||||
echo '
|
||||
|
Loading…
x
Reference in New Issue
Block a user