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__ . '/modules',
|
||||||
__DIR__ . '/plugins',
|
__DIR__ . '/plugins',
|
||||||
__DIR__ . '/src',
|
__DIR__ . '/src',
|
||||||
|
__DIR__ . '/templates',
|
||||||
__DIR__ . '/update',
|
__DIR__ . '/update',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$format = (isset($_SESSION['dashboard']['format'])) ? $_SESSION['dashboard']['format'] : 'A4';
|
$format = $_SESSION['dashboard']['format'] ?? 'A4';
|
||||||
$orientation = (isset($_SESSION['dashboard']['orientation'])) ? $_SESSION['dashboard']['orientation'] : 'L';
|
$orientation = $_SESSION['dashboard']['orientation'] ?? 'L';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$format = (isset($_SESSION['dashboard']['format'])) ? $_SESSION['dashboard']['format'] : 'A4';
|
$format = $_SESSION['dashboard']['format'] ?? 'A4';
|
||||||
$orientation = (isset($_SESSION['dashboard']['orientation'])) ? $_SESSION['dashboard']['orientation'] : 'L';
|
$orientation = $_SESSION['dashboard']['orientation'] ?? 'L';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
|
@ -47,8 +47,8 @@ $azienda = $dbo->fetchOne('SELECT *, (SELECT `iban` FROM `co_banche` WHERE `id`
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
$replace = [
|
$replace = [
|
||||||
'c_' => isset($cliente) ? $cliente : [],
|
'c_' => $cliente ?? [],
|
||||||
'f_' => isset($azienda) ? $azienda : [],
|
'f_' => $azienda ?? [],
|
||||||
];
|
];
|
||||||
|
|
||||||
// Rinominazione di particolari campi all'interno delle informazioni su anagrafica e 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/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
|
@ -45,9 +45,7 @@ if (!setting('Visualizza riferimento su ogni riga in stampa')) {
|
|||||||
|
|
||||||
$columns = 7;
|
$columns = 7;
|
||||||
|
|
||||||
$has_image = $righe->search(function ($item) {
|
$has_image = $righe->search(fn($item) => !empty($item->articolo->immagine)) !== false && $options['images'] == true;
|
||||||
return !empty($item->articolo->immagine);
|
|
||||||
}) !== false && $options['images'] == true;
|
|
||||||
|
|
||||||
if ($has_image) {
|
if ($has_image) {
|
||||||
++$columns;
|
++$columns;
|
||||||
|
@ -54,9 +54,7 @@ if ($pagamento && $pagamento->isRiBa()) {
|
|||||||
// Righe documento
|
// Righe documento
|
||||||
$righe = $documento->getRighe();
|
$righe = $documento->getRighe();
|
||||||
|
|
||||||
$has_image = $righe->search(function ($item) {
|
$has_image = $righe->search(fn($item) => !empty($item->articolo->immagine)) !== false && $options['images'] == true;
|
||||||
return !empty($item->articolo->immagine);
|
|
||||||
}) !== false && $options['images'] == true;
|
|
||||||
|
|
||||||
$columns = $options['no-iva'] ? 5 : 6;
|
$columns = $options['no-iva'] ? 5 : 6;
|
||||||
$columns = $options['pricing'] ? $columns : 3;
|
$columns = $options['pricing'] ? $columns : 3;
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$format = (isset($_SESSION['stampe_contabili']['format'])) ? $_SESSION['stampe_contabili']['format'] : 'A4';
|
$format = $_SESSION['stampe_contabili']['format'] ?? 'A4';
|
||||||
$orientation = (isset($_SESSION['stampe_contabili']['orientation'])) ? $_SESSION['stampe_contabili']['orientation'] : 'L';
|
$orientation = $_SESSION['stampe_contabili']['orientation'] ?? 'L';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'format' => $format,
|
'format' => $format,
|
||||||
|
@ -45,7 +45,7 @@ $somma_totale_imponibile[] = $totale_imponibile;
|
|||||||
$somma_iva[] = $iva;
|
$somma_iva[] = $iva;
|
||||||
$somma_totale_ivato[] = $totale_ivato;
|
$somma_totale_ivato[] = $totale_ivato;
|
||||||
|
|
||||||
$pricing = isset($pricing) ? $pricing : true;
|
$pricing ??= true;
|
||||||
|
|
||||||
// Informazioni intervento
|
// Informazioni intervento
|
||||||
echo '
|
echo '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user