Fix minori

This commit is contained in:
pek5892 2024-05-21 16:26:19 +02:00
parent ac25a097da
commit d8cd1ef780
27 changed files with 253 additions and 261 deletions

View File

@ -505,11 +505,11 @@ if ($structure->permission == 'rw') {
}
}
//Lista casi in cui creare i campi personalizzati
// Lista casi in cui creare i campi personalizzati
$list = ['add', 'add_documento', 'add_preventivo', 'add_ordine_fornitore'];
// Inserimento iniziale
if (in_array(post('op'),$list)) {
if (in_array(post('op'), $list)) {
// Informazioni di log
Filter::set('get', 'id_record', $id_record);

View File

@ -37,13 +37,13 @@ echo '{( "name": "widgets", "id_module": "'.$id_module.'", "position": "top", "p
$segmenti = $dbo->FetchArray('SELECT `id` FROM `zz_segments` WHERE `id_module` = '.prepare($id_module));
if ($segmenti) {
$segmenti = Modules::getSegments($id_module);
if (empty($segmenti)) {
echo '
$segmenti = Modules::getSegments($id_module);
if (empty($segmenti)) {
echo '
<div class="alert alert-warning">
<i class="fa fa-warning-circle"></i> '.tr("Questo gruppo di utenti non ha i permessi per visualizzare nessun segmento di questo modulo").'.
<i class="fa fa-warning-circle"></i> '.tr('Questo gruppo di utenti non ha i permessi per visualizzare nessun segmento di questo modulo').'.
</div>';
}
}
}
// Lettura eventuali plugins modulo da inserire come tab
@ -93,11 +93,11 @@ foreach ($plugins as $plugin) {
echo '
<div id="tab_'.$plugin->id.'" class="tab-pane">';
$id_plugin = $plugin->id;
$id_plugin = $plugin->id;
include base_dir().'/include/manager.php';
include base_dir().'/include/manager.php';
echo '
echo '
</div>';
}
@ -128,7 +128,7 @@ function modificaColonne(button) {
</script>';
}
echo'</div>';
echo '</div>';
// Widget in basso
echo '{( "name": "widgets", "id_module": "'.$id_module.'", "position": "right", "place": "controller" )}';

View File

@ -176,7 +176,7 @@ if (empty($record) || !$has_access) {
{( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}';
if (Module::find((new Module())->getByField('title', 'Account SMS', Models\Locale::getPredefined()->id))) {
echo '
echo '
{( "name": "button", "type": "sms", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}';
}

View File

@ -38,31 +38,31 @@ if (filter('action') == 'do_update') {
<script>
addVersion("'.$update['name'].'");
</script>';
if (is_array($result)) {
// Adding a message about the completion of the database update
if (!empty($update['sql']) && $result[1] == $result[2]) {
echo '
<script>
$("#progress .info").html($("#progress .info").html() + "<p><i class=\"fa fa-check\"></i> '.tr('Aggiornamento del database (_FILENAME_)', [
'_FILENAME_' => '<i>'.$update['filename'].'.sql</i>',
]).'</p>");
'_FILENAME_' => '<i>'.$update['filename'].'.sql</i>',
]).'</p>");
</script>';
}
$rate = $result[1] - $result[0];
} elseif (!empty($update['script'])) {
// Adding a message about the completion of the script
echo '
<script>
$("#progress .info").html($("#progress .info").html() + "<p><i class=\"fa fa-check\"></i> '.tr('Esecuzione dello script di aggiornamento (_FILENAME_)', [
'_FILENAME_' => '<i>'.$update['filename'].'.php</i>',
]).'</p>");
'_FILENAME_' => '<i>'.$update['filename'].'.php</i>',
]).'</p>");
</script>';
$rate = $scriptValue;
}
// Increasing the total completion percentage
if (!empty($rate)) {
echo '
@ -70,7 +70,7 @@ if (filter('action') == 'do_update') {
addProgress('.$rate.');
</script>';
}
echo '
<script>
$("#result").load("index.php?action=do_update&firstuse='.$_GET['firstuse'].'");
@ -80,29 +80,29 @@ if (filter('action') == 'do_update') {
echo '
<div class="alert alert-danger">
<i class="fa fa-times"></i> '.tr("Errore durante l'esecuzione dell'aggiornamento alla versione _VERSION_", [
'_VERSION_' => $update['version'],
]).'
'_VERSION_' => $update['version'],
]).'
</div>';
}
}
// Update completed
elseif (Update::isUpdateCompleted()) {
Update::updateCleanup();
echo '
<p><strong>'.tr('Aggiornamento completato').'</strong> 😃</p>
<script>
setPercent(100);
</script>';
// Instructions for the first installation
if ($_GET['firstuse'] == 'true') {
echo '
<p class="text-danger">'.tr('Si consiglia di rimuovere i permessi di scrittura dal file _FILE_', [
'_FILE_' => '<b>config.inc.php</b>',
]).'.</p>';
'_FILE_' => '<b>config.inc.php</b>',
]).'.</p>';
}
echo '
<a class="btn btn-success btn-block" href="'.base_path().'">
<i class="fa fa-check"></i> '.tr('Continua').'
@ -247,14 +247,14 @@ if (filter('action') == 'do_update') {
current += 1;
$("#progress .info").html($("#progress .info").html() + "<p><strong>'.tr('Aggiornamento _DONE_ di _TODO_ (_VERSION_)', [
'_DONE_' => '" + current + "',
'_TODO_' => '" + count + "',
'_VERSION_' => '" + version.trim() + "',
]).'</strong></p>");
'_DONE_' => '" + current + "',
'_TODO_' => '" + count + "',
'_VERSION_' => '" + version.trim() + "',
]).'</strong></p>");
}
}
</script>
</div>
</div>';
}
}

View File

@ -106,7 +106,7 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
<thead>
<tr>
<th id="th_selector"></th>';
foreach ($total['fields'] as $key => $field) {
$attr_td = '';
$name = trim($field);

View File

@ -20,7 +20,7 @@
use Models\Module;
use Util\FileSystem;
include_once __DIR__ . '/../core.php';
include_once __DIR__.'/../core.php';
$paths = App::getPaths();
$user = Auth::user();
@ -35,31 +35,31 @@ echo '<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>' . $pageTitle . ' - ' . tr('OpenSTAManager') . '</title>
<title>'.$pageTitle.' - '.tr('OpenSTAManager').'</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="robots" content="noindex,nofollow">
<meta name="description" content="' . tr('OpenSTAManager, il software gestionale open source per assistenza tecnica e fatturazione elettronica.') . '">
<meta name="description" content="'.tr('OpenSTAManager, il software gestionale open source per assistenza tecnica e fatturazione elettronica.').'">
<meta name="author" content="DevCode s.r.l.">
<link href="' . $paths['img'] . '/favicon.png" rel="icon" type="image/x-icon" />';
<link href="'.$paths['img'].'/favicon.png" rel="icon" type="image/x-icon" />';
if (file_exists(base_dir() . '/manifest.json')) {
if (file_exists(base_dir().'/manifest.json')) {
echo '
<link rel="manifest" href="' . base_path() . '/manifest.json?r=' . random_int(0, mt_getrandmax()) . '">';
<link rel="manifest" href="'.base_path().'/manifest.json?r='.random_int(0, mt_getrandmax()).'">';
}
// CSS
foreach (App::getAssets()['css'] as $style) {
echo '
<link rel="stylesheet" type="text/css" media="all" href="' . $style . '"/>';
<link rel="stylesheet" type="text/css" media="all" href="'.$style.'"/>';
}
// Print CSS
foreach (App::getAssets()['print'] as $style) {
echo '
<link rel="stylesheet" type="text/css" media="print" href="' . $style . '"/>';
<link rel="stylesheet" type="text/css" media="print" href="'.$style.'"/>';
}
if (Auth::check()) {
@ -67,15 +67,15 @@ if (Auth::check()) {
<script>
search = []';
$array = $_SESSION['module_' . $id_module];
$array = $_SESSION['module_'.$id_module];
if (!empty($array)) {
foreach ($array as $field => $value) {
if (!empty($value) && string_starts_with($field, 'search_')) {
$field_name = str_replace('search_', '', $field);
echo '
search.push("search_' . $field_name . '");
search["search_' . $field_name . '"] = "' . addslashes($value) . '";';
search.push("search_'.$field_name.'");
search["search_'.$field_name.'"] = "'.addslashes($value).'";';
}
}
}
@ -127,95 +127,95 @@ if (Auth::check()) {
];
foreach ($translations as $key => $value) {
echo '
' . $key . ': "' . addslashes($value) . '",';
'.$key.': "'.addslashes($value).'",';
}
echo '
allegati: {
messaggio: "' . tr('Clicca o trascina qui per caricare uno o più file') . '",
maxFilesize: "' . tr('Dimensione massima: _SIZE_ MB') . '",
errore: "' . tr('Errore') . '",
modifica: "' . tr('Modifica allegato') . '",
elimina: "' . tr('Vuoi eliminare questo file?') . '",
procedi: "' . tr('Procedi') . '",
messaggio: "'.tr('Clicca o trascina qui per caricare uno o più file').'",
maxFilesize: "'.tr('Dimensione massima: _SIZE_ MB').'",
errore: "'.tr('Errore').'",
modifica: "'.tr('Modifica allegato').'",
elimina: "'.tr('Vuoi eliminare questo file?').'",
procedi: "'.tr('Procedi').'",
},
ajax: {
"missing": {
"title": "' . tr('Errore') . '",
"text": "' . tr('Alcuni campi obbligatori non sono stati compilati correttamente') . '",
"title": "'.tr('Errore').'",
"text": "'.tr('Alcuni campi obbligatori non sono stati compilati correttamente').'",
},
"error": {
"title": "' . tr('Errore') . '",
"text": "' . tr('Errore durante il salvataggio del record') . '",
"title": "'.tr('Errore').'",
"text": "'.tr('Errore durante il salvataggio del record').'",
}
},
password: {
"wordMinLength": "' . tr('La password è troppo corta') . '",
"wordMaxLength": "' . tr('La password è troppo lunga') . '",
"wordInvalidChar": "' . tr('La password contiene un carattere non valido') . '",
"wordNotEmail": "' . tr('Non usare la tua e-mail come password') . '",
"wordSimilarToUsername": "' . tr('La password non può contenere il tuo nome') . '",
"wordTwoCharacterClasses": "' . tr('Usa classi di caratteri diversi') . '",
"wordRepetitions": "' . tr('La password contiene ripetizioni') . '",
"wordSequences": "' . tr('La password contiene sequenze') . '",
"errorList": "' . tr('Attenzione') . ':",
"veryWeak": "' . tr('Molto debole') . '",
"weak": "' . tr('Debole') . '",
"normal": "' . tr('Normale') . '",
"medium": "' . tr('Media') . '",
"strong": "' . tr('Forte') . '",
"veryStrong": "' . tr('Molto forte') . '",
"wordMinLength": "'.tr('La password è troppo corta').'",
"wordMaxLength": "'.tr('La password è troppo lunga').'",
"wordInvalidChar": "'.tr('La password contiene un carattere non valido').'",
"wordNotEmail": "'.tr('Non usare la tua e-mail come password').'",
"wordSimilarToUsername": "'.tr('La password non può contenere il tuo nome').'",
"wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'",
"wordRepetitions": "'.tr('La password contiene ripetizioni').'",
"wordSequences": "'.tr('La password contiene sequenze').'",
"errorList": "'.tr('Attenzione').':",
"veryWeak": "'.tr('Molto debole').'",
"weak": "'.tr('Debole').'",
"normal": "'.tr('Normale').'",
"medium": "'.tr('Media').'",
"strong": "'.tr('Forte').'",
"veryStrong": "'.tr('Molto forte').'",
},
datatables: {
"emptyTable": "' . tr('Nessun dato presente nella tabella') . '",
"info": "' . tr('Vista da _START_ a _END_ di _TOTAL_ elementi') . '",
"infoEmpty": "' . tr('Vista da 0 a 0 di 0 elementi') . '",
"infoFiltered": "(' . tr('filtrati da _MAX_ elementi totali') . ')",
"emptyTable": "'.tr('Nessun dato presente nella tabella').'",
"info": "'.tr('Vista da _START_ a _END_ di _TOTAL_ elementi').'",
"infoEmpty": "'.tr('Vista da 0 a 0 di 0 elementi').'",
"infoFiltered": "('.tr('filtrati da _MAX_ elementi totali').')",
"infoPostFix": "",
"lengthMenu": "' . tr('Visualizza _MENU_ elementi') . '",
"lengthMenu": "'.tr('Visualizza _MENU_ elementi').'",
"loadingRecords": " ",
"processing": "' . tr('Elaborazione') . '...",
"search": "' . tr('Cerca') . ':",
"zeroRecords": "' . tr('La ricerca non ha portato alcun risultato') . '.",
"processing": "'.tr('Elaborazione').'...",
"search": "'.tr('Cerca').':",
"zeroRecords": "'.tr('La ricerca non ha portato alcun risultato').'.",
"paginate": {
"first": "' . tr('Inizio') . '",
"previous": "' . tr('Precedente') . '",
"next": "' . tr('Successivo') . '",
"last": "' . tr('Fine') . '"
"first": "'.tr('Inizio').'",
"previous": "'.tr('Precedente').'",
"next": "'.tr('Successivo').'",
"last": "'.tr('Fine').'"
},
},
};
globals = {
rootdir: "' . base_path() . '",
js: "' . $paths['js'] . '",
css: "' . $paths['css'] . '",
img: "' . $paths['img'] . '",
rootdir: "'.base_path().'",
js: "'.$paths['js'].'",
css: "'.$paths['css'].'",
img: "'.$paths['img'].'",
id_module: "' . $id_module . '",
id_record: "' . $id_record . '",
id_module: "'.$id_module.'",
id_record: "'.$id_record.'",
is_mobile: ' . isMobile() . ',
is_mobile: '.isMobile().',
cifre_decimali: ' . setting('Cifre decimali per importi') . ',
cifre_decimali: '.setting('Cifre decimali per importi').',
timestamp_format: "' . formatter()->getTimestampPattern() . '",
date_format: "' . formatter()->getDatePattern() . '",
time_format: "' . formatter()->getTimePattern() . '",
decimals: "' . formatter()->getNumberSeparators()['decimals'] . '",
thousands: "' . formatter()->getNumberSeparators()['thousands'] . '",
currency: "' . currency() . '",
timestamp_format: "'.formatter()->getTimestampPattern().'",
date_format: "'.formatter()->getDatePattern().'",
time_format: "'.formatter()->getTimePattern().'",
decimals: "'.formatter()->getNumberSeparators()['decimals'].'",
thousands: "'.formatter()->getNumberSeparators()['thousands'].'",
currency: "'.currency().'",
search: search,
translations: translations,
locale: "' . explode('_', $lang)[0] . '",
full_locale: "' . $lang . '",
locale: "'.explode('_', $lang)[0].'",
full_locale: "'.$lang.'",
start_date: "' . $_SESSION['period_start'] . '",
start_date_formatted: "' . Translator::dateToLocale($_SESSION['period_start']) . '",
end_date: "' . $_SESSION['period_end'] . '",
end_date_formatted: "' . Translator::dateToLocale($_SESSION['period_end']) . '",
minute_stepping: ' . setting('Numero di minuti di avanzamento delle sessioni delle attività') . ',
start_date: "'.$_SESSION['period_start'].'",
start_date_formatted: "'.Translator::dateToLocale($_SESSION['period_start']).'",
end_date: "'.$_SESSION['period_end'].'",
end_date_formatted: "'.Translator::dateToLocale($_SESSION['period_end']).'",
minute_stepping: '.setting('Numero di minuti di avanzamento delle sessioni delle attività').',
collapse_plugin_sidebar: ' . intval(setting('Nascondere la barra dei plugin di default')) . ',
collapse_plugin_sidebar: '.intval(setting('Nascondere la barra dei plugin di default')).',
ckeditorToolbar: [
["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor", "EmojiPanel" ],
@ -238,46 +238,46 @@ if (Auth::check()) {
{ name: "tools", items : [ "Maximize", "ShowBlocks" ] },
{ name: "about", items: [ "About" ] }
],
order_manager_id: "' . ($dbo->isInstalled() ? (new Module())->getByField('title', 'Stato dei servizi', Models\Locale::getPredefined()->id) : '') . '",
dataload_page_buffer: ' . setting('Lunghezza in pagine del buffer Datatables') . ',
tempo_attesa_ricerche: ' . setting('Tempo di attesa ricerche in secondi') . ',
restrict_summables_to_selected: ' . setting('Totali delle tabelle ristretti alla selezione') . ',
snapDuration: "' . setting('Tempo predefinito di snap attività sul calendario') . '"
order_manager_id: "'.($dbo->isInstalled() ? (new Module())->getByField('title', 'Stato dei servizi', Models\Locale::getPredefined()->id) : '').'",
dataload_page_buffer: '.setting('Lunghezza in pagine del buffer Datatables').',
tempo_attesa_ricerche: '.setting('Tempo di attesa ricerche in secondi').',
restrict_summables_to_selected: '.setting('Totali delle tabelle ristretti alla selezione').',
snapDuration: "'.setting('Tempo predefinito di snap attività sul calendario').'"
};
</script>';
} else {
echo '
<script>
globals = {
rootdir: "' . base_path() . '",
rootdir: "'.base_path().'",
search: {},
translations: {
password: {
"wordMinLength": "' . tr('La tua password è troppo corta') . '",
"wordMaxLength": "' . tr('La tua password è troppo lunga') . '",
"wordInvalidChar": "' . tr('La tua password contiene un carattere non valido') . '",
"wordNotEmail": "' . tr('Non usare la tua e-mail come password') . '",
"wordSimilarToUsername": "' . tr('La tua password non può contenere il tuo nome') . '",
"wordTwoCharacterClasses": "' . tr('Usa classi di caratteri diversi') . '",
"wordRepetitions": "' . tr('Troppe ripetizioni') . '",
"wordSequences": "' . tr('La tua password contiene sequenze') . '",
"errorList": "' . tr('Errori') . ':",
"veryWeak": "' . tr('Molto debole') . '",
"weak": "' . tr('Debole') . '",
"normal": "' . tr('Normale') . '",
"medium": "' . tr('Media') . '",
"strong": "' . tr('Forte') . '",
"veryStrong": "' . tr('Molto forte') . '",
"wordMinLength": "'.tr('La tua password è troppo corta').'",
"wordMaxLength": "'.tr('La tua password è troppo lunga').'",
"wordInvalidChar": "'.tr('La tua password contiene un carattere non valido').'",
"wordNotEmail": "'.tr('Non usare la tua e-mail come password').'",
"wordSimilarToUsername": "'.tr('La tua password non può contenere il tuo nome').'",
"wordTwoCharacterClasses": "'.tr('Usa classi di caratteri diversi').'",
"wordRepetitions": "'.tr('Troppe ripetizioni').'",
"wordSequences": "'.tr('La tua password contiene sequenze').'",
"errorList": "'.tr('Errori').':",
"veryWeak": "'.tr('Molto debole').'",
"weak": "'.tr('Debole').'",
"normal": "'.tr('Normale').'",
"medium": "'.tr('Media').'",
"strong": "'.tr('Forte').'",
"veryStrong": "'.tr('Molto forte').'",
},
},
timestamp_format: "' . formatter()->getTimestampPattern() . '",
date_format: "' . formatter()->getDatePattern() . '",
time_format: "' . formatter()->getTimePattern() . '",
timestamp_format: "'.formatter()->getTimestampPattern().'",
date_format: "'.formatter()->getDatePattern().'",
time_format: "'.formatter()->getTimePattern().'",
locale: "' . explode('_', $lang)[0] . '",
full_locale: "' . $lang . '",
locale: "'.explode('_', $lang)[0].'",
full_locale: "'.$lang.'",
};
</script>';
}
@ -285,7 +285,7 @@ if (Auth::check()) {
// JS
foreach (App::getAssets()['js'] as $js) {
echo '
<script type="text/javascript" charset="utf-8" src="' . $js . '"></script>';
<script type="text/javascript" charset="utf-8" src="'.$js.'"></script>';
}
// Impostazioni di default per gli alert
@ -295,7 +295,7 @@ echo '
buttonsStyling: false,
confirmButtonClass: "btn btn-lg btn-primary",
cancelButtonClass: "btn btn-lg",
cancelButtonText: "' . tr('Annulla') . '",
cancelButtonText: "'.tr('Annulla').'",
});
</script>';
@ -308,7 +308,7 @@ if (Auth::check()) {
}
if (setting('Attiva scorciatoie da tastiera')) {
echo '<script type="text/javascript" charset="utf-8" src="' . App::getPaths()['js'] . '/hotkeys-js/hotkeys.min.js?v=' . $version . '"></script>';
echo '<script type="text/javascript" charset="utf-8" src="'.App::getPaths()['js'].'/hotkeys-js/hotkeys.min.js?v='.$version.'"></script>';
echo '
<script>
@ -356,11 +356,11 @@ $hide_sidebar = Auth::check() && (setting('Nascondere la barra sinistra di defau
echo '
</head>
<body class="sidebar-mini layout-fixed '. (!empty($hide_sidebar) ? ' sidebar-collapse' : '') . (!Auth::check() ? ' hold-transition login-page' : '') . '">
<div class="' . (!Auth::check() ? '' : 'wrapper') . '">';
<body class="sidebar-mini layout-fixed '.(!empty($hide_sidebar) ? ' sidebar-collapse' : '').(!Auth::check() ? ' hold-transition login-page' : '').'">
<div class="'.(!Auth::check() ? '' : 'wrapper').'">';
if (Auth::check()) {
$calendar_color_label = ($_SESSION['period_start'] != date('Y') . '-01-01' || $_SESSION['period_end'] != date('Y') . '-12-31') ? 'danger' : 'secondary';
$calendar_color_label = ($_SESSION['period_start'] != date('Y').'-01-01' || $_SESSION['period_end'] != date('Y').'-12-31') ? 'danger' : 'secondary';
echo '
<!-- Loader principale -->
@ -390,8 +390,8 @@ if (Auth::check()) {
</a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a class="nav-link text-' . $calendar_color_label . '">
' . Translator::dateToLocale($_SESSION['period_start']) . ' - ' . Translator::dateToLocale($_SESSION['period_end']) . '
<a class="nav-link text-'.$calendar_color_label.'">
'.Translator::dateToLocale($_SESSION['period_start']).' - '.Translator::dateToLocale($_SESSION['period_end']).'
</a>
</li>
</ul>
@ -423,31 +423,31 @@ if (Auth::check()) {
echo '
<li class="nav-item">
<a href="#" onclick="window.print()" class="nav-link" title="' . tr('Stampa') . '">
<a href="#" onclick="window.print()" class="nav-link" title="'.tr('Stampa').'">
<i class="fa fa-print nav-icon"></i>
</a>
</li>
<li class="nav-item">
<a href="' . base_path() . '/log.php" class="nav-link" title="' . tr('Log accessi') . '">
<a href="'.base_path().'/log.php" class="nav-link" title="'.tr('Log accessi').'">
<i class="fa fa-book nav-icon"></i>
</a>
</li>
<li class="nav-item">
<a href="' . base_path() . '/shortcuts.php" class="nav-link" title="' . tr('Scorciatoie') . '">
<a href="'.base_path().'/shortcuts.php" class="nav-link" title="'.tr('Scorciatoie').'">
<i class="fa fa-keyboard-o nav-icon"></i>
</a>
</li>
<li class="nav-item">
<a href="' . base_path() . '/info.php" class="nav-link" title="' . tr('Informazioni') . '">
<a href="'.base_path().'/info.php" class="nav-link" title="'.tr('Informazioni').'">
<i class="fa fa-info nav-icon"></i>
</a>
</li>
<li class="nav-item">
<a href="' . base_path() . '/index.php?op=logout" onclick="sessionStorage.clear()" class="nav-link bg-danger" title="' . tr('Esci') . '">
<a href="'.base_path().'/index.php?op=logout" onclick="sessionStorage.clear()" class="nav-link bg-danger" title="'.tr('Esci').'">
<i class="fa fa-power-off nav-icon"></i>
</a>
</li>
@ -456,9 +456,9 @@ if (Auth::check()) {
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar ' . $theme .' elevation-4">
<a href="' . tr('https://www.openstamanager.com') . '" class="brand-link" title="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" target="_blank">
<img src="' . $rootdir . '/assets/dist/img/logo_completo.png" alt="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" class="img-fluid">
<aside class="main-sidebar '.$theme.' elevation-4">
<a href="'.tr('https://www.openstamanager.com').'" class="brand-link" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'" target="_blank">
<img src="'.$rootdir.'/assets/dist/img/logo_completo.png" alt="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'" class="img-fluid">
<span class="brand-text font-weight-light">&nbsp;</span>
</a>
@ -472,17 +472,17 @@ if (Auth::check()) {
$user_photo = $user->photo;
if ($user_photo) {
echo '
<img src="' . $user_photo . '" class="img-circle elevation-2" alt="' . $user['username'] . '" />';
<img src="'.$user_photo.'" class="img-circle elevation-2" alt="'.$user['username'].'" />';
} else {
echo '
<i class="fa fa-user-circle-o fa-2x" alt="' . tr('Utente') . '"></i>';
<i class="fa fa-user-circle-o fa-2x" alt="'.tr('Utente').'"></i>';
}
echo '
</div>
<div class="info">
<a href="' . base_path() . '/modules/utenti/info.php" class="d-block">
' . $user['username'] . '
<a href="'.base_path().'/modules/utenti/info.php" class="d-block">
'.$user['username'].'
</a>
</div>
</div>
@ -491,7 +491,7 @@ if (Auth::check()) {
<!-- SidebarSearch Form -->
<div class="form-inline">
<div class="input-group" data-widget="sidebar-search">
<input class="form-control form-control-sidebar" id="supersearch" type="search" placeholder="' . tr('Cerca') . '" aria-label="' . tr('Cerca') . '">
<input class="form-control form-control-sidebar" id="supersearch" type="search" placeholder="'.tr('Cerca').'" aria-label="'.tr('Cerca').'">
<div class="input-group-append">
<button class="btn btn-sidebar">
<i class="fa fa-search fa-fw"></i>
@ -514,17 +514,17 @@ if (Auth::check()) {
// Menu laterale per la visualizzazione dei plugin
echo '
<aside class="control-sidebar control-sidebar-light">
<h4><i class="fa fa-plug"></i> ' . tr('Plugin') . '</h4>
<h4><i class="fa fa-plug"></i> '.tr('Plugin').'</h4>
<ul class="nav nav-tabs nav-pills nav-stacked">
<li data-toggle="control-sidebar" class="active btn-default nav-item">
<a class="nav-link" data-toggle="tab" href="#tab_0">
' . $structure->getTranslation('title') . '
'.$structure->getTranslation('title').'
</a>
</li>';
// Tab dei plugin
if (!empty($id_record)) {
$plugins = $dbo->fetchArray('SELECT `zz_plugins`.`id`, `title`, `options`, `options2` FROM `zz_plugins` LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = ' . prepare(Models\Locale::getDefault()->id) . ') WHERE `idmodule_to`=' . prepare($id_module) . " AND `position`='tab' AND `enabled` = 1 ORDER BY `zz_plugins`.`order` DESC");
$plugins = $dbo->fetchArray('SELECT `zz_plugins`.`id`, `title`, `options`, `options2` FROM `zz_plugins` LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `idmodule_to`='.prepare($id_module)." AND `position`='tab' AND `enabled` = 1 ORDER BY `zz_plugins`.`order` DESC");
foreach ($plugins as $plugin) {
// Badge count per record plugin
$count = 0;
@ -542,9 +542,9 @@ if (Auth::check()) {
echo '
<li data-widget="control-sidebar" class="btn-default nav-item" >
<a class="nav-link" data-widget="tab" href="#tab_' . $plugin['id'] . '" id="link-tab_' . $plugin['id'] . '">
' . $plugin['title'] . '
<span class="right badge badge-danger">' . ($count > 0 ? $count : '') . '</span>
<a class="nav-link" data-widget="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">
'.$plugin['title'].'
<span class="right badge badge-danger">'.($count > 0 ? $count : '').'</span>
</a>
</li>';
}
@ -557,8 +557,8 @@ if (Auth::check()) {
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_note" id="link-tab_note">
<' . tr('Note interne') . '
<span class="badge pull-right">' . ($notes->count() ?: '') . '</span>
<'.tr('Note interne').'
<span class="badge pull-right">'.($notes->count() ?: '').'</span>
</a>
</li>';
}
@ -571,8 +571,8 @@ if (Auth::check()) {
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_checks" id="link-tab_checks">
<' . tr('Checklist') . '
<' . ($checklists_total->count() > 0) ? '<span class="badge pull-right">' . $checklists_unchecked->count() . tr(' / ') . $checklists_total->count() . '</span>' : '' . '
<'.tr('Checklist').'
<'.($checklists_total->count() > 0) ? '<span class="badge pull-right">'.$checklists_unchecked->count().tr(' / ').$checklists_total->count().'</span>' : ''.'
</a>
</li>';
}
@ -582,7 +582,7 @@ if (Auth::check()) {
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_info" id="link-tab_info">
<' . tr('Info') . '
<'.tr('Info').'
</a>
</li>';
}
@ -620,7 +620,7 @@ if (Auth::check()) {
echo '
<div class="card card-warning card-center">
<div class="card-header with-border text-center">
<h3 class="card-title">' . tr('Informazioni') . '</h3>
<h3 class="card-title">'.tr('Informazioni').'</h3>
</div>
<div class="card-body">';
@ -633,7 +633,7 @@ if (!empty($messages['info'])) {
echo '
<script>
$(document).ready( function(){
window.parent.toastr.success("' . $value . '", toastr.options);
window.parent.toastr.success("'.$value.'", toastr.options);
});
</script>';
}
@ -644,8 +644,8 @@ if (!empty($messages['error'])) {
foreach ($messages['error'] as $value) {
echo '
<div class="alert alert-danger push">
<h4><i class="fa fa fa-ban"></i> ' . tr('Errore') . '</h4>
' . $value . '
<h4><i class="fa fa fa-ban"></i> '.tr('Errore').'</h4>
'.$value.'
</div>';
}
}
@ -655,8 +655,8 @@ if (!empty($messages['warning'])) {
foreach ($messages['warning'] as $value) {
echo '
<div class="alert alert-warning push">
<h4><i class="fa fa-warning"></i> ' . tr('Attenzione') . '</h4>
' . $value . '
<h4><i class="fa fa-warning"></i> '.tr('Attenzione').'</h4>
'.$value.'
</div>';
}
}
@ -674,12 +674,12 @@ if ($free_space < ($space_limit * (1024 ** 3))) {
echo '
<div class="callout callout-warning">
<h4>
<i class="fa fa-warning"></i> ' . tr('Spazio in esaurimento') . '
<i class="fa fa-warning"></i> '.tr('Spazio in esaurimento').'
</h4>
<p>' . tr('Lo spazio a disposizione del gestionale è in esaurimento: sono al momento disponibili _TOT_', [
<p>'.tr('Lo spazio a disposizione del gestionale è in esaurimento: sono al momento disponibili _TOT_', [
'_TOT_' => FileSystem::formatBytes($free_space),
]) . '.</p>
<p>' . tr('Questo può risultare un serio problema per la continuità di funzionamento del software, poiché le operazioni più espansive che richiedono spazio di archiviazione possono causare malfunzionamenti imprevisti') . '. ' . tr('Ad esempio, le attività di backup, caricamento di allegati o anche l\'utilizzo normale del gestionale potrebbero rendere i dati inaffidabili, provocando pertanto una perdita delle informazioni salvate') . '.</p>
<p>' . tr('Contatta gli amministratori di sistema per risolvere al più presto il problema') . '.</p>
]).'.</p>
<p>'.tr('Questo può risultare un serio problema per la continuità di funzionamento del software, poiché le operazioni più espansive che richiedono spazio di archiviazione possono causare malfunzionamenti imprevisti').'. '.tr('Ad esempio, le attività di backup, caricamento di allegati o anche l\'utilizzo normale del gestionale potrebbero rendere i dati inaffidabili, provocando pertanto una perdita delle informazioni salvate').'.</p>
<p>'.tr('Contatta gli amministratori di sistema per risolvere al più presto il problema').'.</p>
</div>';
}

View File

@ -116,14 +116,14 @@ if (Update::isBeta()) {
// Controllo se è una beta e in caso mostro un warning
if (Auth::isBrute()) {
echo'
echo '
<div class="box box-danger" id="brute">
<div class="box-header with-border text-center">
<h3 class="box-title">'.tr('Attenzione').'</h3>
</div>
<div class="box-body text-center">
<p>'.tr('Sono stati effettuati troppi tentativi di accesso consecutivi!').'</p>
<p>'. tr('Tempo rimanente (in secondi)').': <span id="brute-timeout">'.(Auth::getBruteTimeout() + 1).'</span></p>
<p>'.tr('Tempo rimanente (in secondi)').': <span id="brute-timeout">'.(Auth::getBruteTimeout() + 1).'</span></p>
</div>
</div>

View File

@ -36,4 +36,4 @@ foreach ($subcategorie as $sub) {
</a>
</td>
</tr>';
}
}

View File

@ -163,7 +163,7 @@ if (!empty($interventi)) {
</tr>';
// Raggruppamento per articolo con lo stesso prezzo
$ricavo = ($articolo->imponibile - $articolo->sconto) / ($articolo->qta>0 ? $articolo->qta : 1);
$ricavo = ($articolo->imponibile - $articolo->sconto) / ($articolo->qta > 0 ? $articolo->qta : 1);
$costo = $articolo->spesa / ($articolo->qta > 0 ? $articolo->qta : 1);
$descrizione = $articolo->articolo->codice.' - '.$articolo->articolo->getTranslation('title');
@ -344,7 +344,7 @@ foreach ($tipologie as $key => $tipologia) {
$margine = $tipologia['ricavo'] - $tipologia['costo'];
if ($tipologia['ricavo']) {
$margine_prc = (int) (1 - ($tipologia['costo'] / ($tipologia['ricavo'] > 0 ? $tipologia['ricavo'] : 1))) * 100;
$ricarico_prc = ($tipologia['ricavo'] && $tipologia['costo']) ? (int) ((($tipologia['ricavo'] / ($tipologia['costo']> 0 ? $tipologia['costo'] : 1)) - 1) * 100) : 100;
$ricarico_prc = ($tipologia['ricavo'] && $tipologia['costo']) ? (int) ((($tipologia['ricavo'] / ($tipologia['costo'] > 0 ? $tipologia['costo'] : 1)) - 1) * 100) : 100;
}
echo '
@ -376,7 +376,7 @@ ksort($tecnici);
foreach ($tecnici as $key => $tecnico) {
$margine = $tecnico['ricavo'] - $tecnico['costo'];
if ($tecnico['ricavo']) {
$margine_prc = (int) (1 - ($tecnico['costo'] / ($tecnico['ricavo']>0 ? $tecnico['ricavo'] : 1))) * 100;
$margine_prc = (int) (1 - ($tecnico['costo'] / ($tecnico['ricavo'] > 0 ? $tecnico['ricavo'] : 1))) * 100;
$ricarico_prc = ($tecnico['ricavo'] && $tecnico['costo']) ? (int) ((($tecnico['ricavo'] / ($tecnico['costo'] > 0 ? $tecnico['costo'] : 1)) - 1) * 100) : 100;
}
echo '
@ -442,7 +442,7 @@ foreach ($materiali_art as $key => $materiali_array1) {
foreach ($materiali_array1 as $materiali_array2) {
foreach ($materiali_array2 as $materiale) {
$margine = $materiale['ricavo'] - $materiale['costo'];
$margine_prc = (int) (1 - ($materiale['costo'] / ($materiale['ricavo']>0 ? $materiale['ricavo'] : 1))) * 100;
$margine_prc = (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] > 0 ? $materiale['ricavo'] : 1))) * 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo'] > 0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
@ -461,7 +461,7 @@ ksort($materiali_righe);
foreach ($materiali_righe as $key => $materiale) {
$margine = $materiale['ricavo'] - $materiale['costo'];
$margine_prc = (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] > 0 ? $materiale['ricavo'] : 1))) * 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo']>0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo'] > 0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
<td>'.$key.'</td>

View File

@ -109,7 +109,7 @@ foreach ($stati_intervento as $stato) {
<li>
<input type="checkbox" id="stato_'.$stato['id'].'" class="dashboard_stato" value="'.$stato['id'].'" '.$attr.'>
<label for="stato_'.$stato['id'].'">
'.$stato['descrizione']. '&nbsp;<span class="pull-right" style="background-color:'.$stato['colore'].';"></span>
'.$stato['descrizione'].'&nbsp;<span class="pull-right" style="background-color:'.$stato['colore'].';"></span>
</label>
</li>';
}
@ -182,7 +182,7 @@ foreach ($tecnici_disponibili as $tecnico) {
<li>
<input type="checkbox" id="tecnico_'.$tecnico['id'].'" class="dashboard_tecnico" value="'.$tecnico['id'].'" '.$attr.'>
<label for="tecnico_'.$tecnico['id'].'">
'.$tecnico['ragione_sociale']. '&nbsp;<span class="pull-right" style="background-color:'.$tecnico['colore'].';"></span>
'.$tecnico['ragione_sociale'].'&nbsp;<span class="pull-right" style="background-color:'.$tecnico['colore'].';"></span>
</label>
</li>';
}

View File

@ -27,7 +27,7 @@ $gruppi = Setting::selectRaw('sezione AS nome, COUNT(id) AS numero')
->orderBy('sezione')
->get();
echo'
echo '
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">

View File

@ -75,4 +75,4 @@ echo '
</li>
</ul>
</div>';
*/
*/

View File

@ -362,7 +362,7 @@ if (!empty($record['idcontratto'])) {
?>
<!-- Fatturazione Elettronica PA-->
<div class="card card-primary collapsable collapsed-card" >
<div class="card-header with-border <?php echo ($record['tipo_anagrafica'] == 'Ente pubblico' || $record['tipo_anagrafica'] == 'Azienda') ? '': 'hidden'; ?>">
<div class="card-header with-border <?php echo ($record['tipo_anagrafica'] == 'Ente pubblico' || $record['tipo_anagrafica'] == 'Azienda') ? '' : 'hidden'; ?>">
<h3 class="card-title"><?php echo tr('Dati appalto'); ?></h3>
<div class="card-tools pull-right">
<button type="button" class="btn btn-card-tool" data-card-widget="collapse">
@ -404,15 +404,15 @@ if (!empty($record['idcontratto'])) {
<div class="card-body">
<?php
if ($show_prezzi) {
echo "
if ($show_prezzi) {
echo "
<div class=\"pull-right\">
<a class='btn btn-default btn-details' onclick=\"$('.extra').removeClass('hide'); $(this).addClass('hide'); $('#dontshowall_dettagli').removeClass('hide');\" id='showall_dettagli'><i class='fa fa-square-o'></i> <?php echo tr('Visualizza dettaglio costi'); ?></a>
<a class='btn btn-info btn-details hide' onclick=\"$('.extra').addClass('hide'); $(this).addClass('hide'); $('#showall_dettagli').removeClass('hide');\" id='dontshowall_dettagli'><i class='fa fa-check-square-o'></i> <?php echo tr('Visualizza dettaglio costi'); ?></a>
</div>
<div class=\"clearfix\"></div>
<br>";
}
}
?>
<div class="row">

View File

@ -160,7 +160,7 @@ if (!empty($interventi)) {
</tr>';
// Raggruppamento per articolo con lo stesso prezzo
$ricavo = ($articolo->imponibile - $articolo->sconto) / ($articolo->qta>0 ? $articolo->qta : 1);
$ricavo = ($articolo->imponibile - $articolo->sconto) / ($articolo->qta > 0 ? $articolo->qta : 1);
$costo = $articolo->spesa / ($articolo->qta > 0 ? $articolo->qta : 1);
$descrizione = $articolo->articolo->codice.' - '.$articolo->articolo->getTranslation('title');
@ -288,7 +288,7 @@ ksort($tipologie);
foreach ($tipologie as $key => $tipologia) {
$margine = $tipologia['ricavo'] - $tipologia['costo'];
$margine_prc = (int) (1 - ($tipologia['costo'] / ($tipologia['ricavo'] > 0 ? $tipologia['ricavo'] : 1))) * 100;
$ricarico_prc = ($tipologia['ricavo'] && $tipologia['costo']) ? (int) ((($tipologia['ricavo'] / ($tipologia['costo']>0 ? $tipologia['costo'] : 1)) - 1) * 100) : 100;
$ricarico_prc = ($tipologia['ricavo'] && $tipologia['costo']) ? (int) ((($tipologia['ricavo'] / ($tipologia['costo'] > 0 ? $tipologia['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
<td>'.$key.'</td>
@ -349,8 +349,8 @@ echo '
ksort($stati_intervento);
foreach ($stati_intervento as $key => $stato) {
$margine = $stato['ricavo'] - $stato['costo'];
$margine_prc = (int) (1 - ($stato['costo'] / ($stato['ricavo']>0 ? $stato['ricavo'] : 1))) * 100;
$ricarico_prc = ($stato['ricavo'] && $stato['costo']) ? (int) ((($stato['ricavo'] / ($stato['costo']>0 ? $stato['costo'] : 1)) - 1) * 100) : 100;
$margine_prc = (int) (1 - ($stato['costo'] / ($stato['ricavo'] > 0 ? $stato['ricavo'] : 1))) * 100;
$ricarico_prc = ($stato['ricavo'] && $stato['costo']) ? (int) ((($stato['ricavo'] / ($stato['costo'] > 0 ? $stato['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
<td><div class="img-circle" style="width:18px; height:18px; position:relative; bottom:-2px; background:'.$stato['colore'].'; float:left;"></div> '.$key.'</td>
@ -380,7 +380,7 @@ foreach ($materiali_art as $key => $materiali_array1) {
foreach ($materiali_array1 as $materiali_array2) {
foreach ($materiali_array2 as $materiale) {
$margine = $materiale['ricavo'] - $materiale['costo'];
$margine_prc = (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] ? $materiale['ricavo']: 1))) * 100;
$margine_prc = (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] ? $materiale['ricavo'] : 1))) * 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo'] ? $materiale['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>

View File

@ -161,8 +161,8 @@ if (!empty($interventi)) {
// Raggruppamento per articolo con lo stesso prezzo
if ($riga_articolo->qta) {
$ricavo = ($riga_articolo->imponibile - $riga_articolo->sconto) / ($riga_articolo->qta > 0 ? $riga_articolo-> qta : 1);
$costo = $riga_articolo->spesa / ($riga_articolo->qta > 0 ? $riga_articolo-> qta : 1);
$ricavo = ($riga_articolo->imponibile - $riga_articolo->sconto) / ($riga_articolo->qta > 0 ? $riga_articolo->qta : 1);
$costo = $riga_articolo->spesa / ($riga_articolo->qta > 0 ? $riga_articolo->qta : 1);
}
$descrizione = $riga_articolo->articolo->codice.' - '.$riga_articolo->articolo->getTranslation('title');
@ -319,8 +319,8 @@ echo '
ksort($tecnici);
foreach ($tecnici as $key => $tecnico) {
$margine = $tecnico['ricavo'] - $tecnico['costo'];
$margine_prc = ($tecnico['ricavo'] && $tecnico['costo']) ? (int) (1 - ($tecnico['costo'] / ($tecnico['ricavo']> 0 ? $tecnico['ricavo']: 1))) * 100 : 100;
$ricarico_prc = ($tecnico['ricavo'] && $tecnico['costo']) ? (int) ((($tecnico['ricavo'] / ($tecnico['costo']>0 ? $tecnico['costo'] : 1)) - 1) * 100) : 100;
$margine_prc = ($tecnico['ricavo'] && $tecnico['costo']) ? (int) (1 - ($tecnico['costo'] / ($tecnico['ricavo'] > 0 ? $tecnico['ricavo'] : 1))) * 100 : 100;
$ricarico_prc = ($tecnico['ricavo'] && $tecnico['costo']) ? (int) ((($tecnico['ricavo'] / ($tecnico['costo'] > 0 ? $tecnico['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
<td>'.$key.'</td>
@ -382,7 +382,7 @@ foreach ($materiali_art as $key => $materiali_array1) {
foreach ($materiali_array1 as $materiali_array2) {
foreach ($materiali_array2 as $materiale) {
$margine = $materiale['ricavo'] - $materiale['costo'];
$margine_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) (1 - ($materiale['costo'] / ($materiale['ricavo']>0 ? $materiale['ricavo'] : 1))) * 100 : 100;
$margine_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] > 0 ? $materiale['ricavo'] : 1))) * 100 : 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo'] > 0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
@ -401,7 +401,7 @@ ksort($materiali_righe);
foreach ($materiali_righe as $key => $materiale) {
$margine = $materiale['ricavo'] - $materiale['costo'];
$margine_prc = ($materiale['ricavo']) ? (int) (1 - ($materiale['costo'] / ($materiale['ricavo'] > 0 ? $materiale['ricavo'] : 1))) * 100 : 0;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo']> 0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
$ricarico_prc = ($materiale['ricavo'] && $materiale['costo']) ? (int) ((($materiale['ricavo'] / ($materiale['costo'] > 0 ? $materiale['costo'] : 1)) - 1) * 100) : 100;
echo '
<tr>
<td>'.$key.'</td>

View File

@ -4,35 +4,35 @@ echo '
<div class="container">
<div class="row">
<div class=col-md-12">
<h5>'.tr('Legenda'). ':</h5>
<h5>'.tr('Legenda').':</h5>
</div>
</div>
<div class="row">
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#CCFFCC;"></span>
<span class="text">&nbsp;'.tr('Scadenza pagata'). '</span>
<span class="text">&nbsp;'.tr('Scadenza pagata').'</span>
</div>
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#ec5353;"></span>
<span class="text">&nbsp;' . tr('Data concordata superata') . '</span>
<span class="text">&nbsp;'.tr('Data concordata superata').'</span>
</div>
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#b3d2e3;"></span>
<span class="text">&nbsp;' . tr('Data concordata') . '</span>
<span class="text">&nbsp;'.tr('Data concordata').'</span>
</div>
</div>
<div class="row">
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#f08080;"></span>
<span class="text">&nbsp;' . tr('Scaduta') . '</span>
<span class="text">&nbsp;'.tr('Scaduta').'</span>
</div>
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#f9f9c6;"></span>
<span class="text">&nbsp;' . tr('Scadenza entro 10 giorni') . '</span>
<span class="text">&nbsp;'.tr('Scadenza entro 10 giorni').'</span>
</div>
<div class="col-md-4">
<span class="pull-left icon" style="background-color:#ffffff;"></span>
<span class="text">&nbsp;Scadenza futura</span>
</div>
</div>
</div>';
</div>';

View File

@ -185,7 +185,7 @@ foreach ($scadenze as $i => $scadenza) {
$id_pagamento = Pagamento::find($scadenza['id_pagamento']);
$pagamento = $dbo->fetchOne('SELECT `co_pagamenti`.`id` FROM `fe_modalita_pagamento` INNER JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.\Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` WHERE `fe_modalita_pagamento`.`codice` LIKE '.prepare($id_pagamento->codice_modalita_pagamento_fe).'')['id'];
$pagamento = $dbo->fetchOne('SELECT `co_pagamenti`.`id` FROM `fe_modalita_pagamento` INNER JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` WHERE `fe_modalita_pagamento`.`codice` LIKE '.prepare($id_pagamento->codice_modalita_pagamento_fe).'')['id'];
echo '
<tr class="'.$class.'">
<input type="hidden" name="id_scadenza['.$i.']" value="'.$scadenza['id'].'">
@ -206,7 +206,7 @@ foreach ($scadenze as $i => $scadenza) {
</td>
<td>
{[ "type": "select", "name": "id_pagamento['.$i.']", "values": "query=SELECT `co_pagamenti`.`id`, `fe_modalita_pagamento_lang`.`title` as descrizione FROM `fe_modalita_pagamento` LEFT JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.\Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` GROUP BY title", "value": "'.$pagamento.'" ]}
{[ "type": "select", "name": "id_pagamento['.$i.']", "values": "query=SELECT `co_pagamenti`.`id`, `fe_modalita_pagamento_lang`.`title` as descrizione FROM `fe_modalita_pagamento` LEFT JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` GROUP BY title", "value": "'.$pagamento.'" ]}
</td>
<td align="center">
@ -297,7 +297,7 @@ echo '
</td>
<td>
{[ "type": "select", "name": "id_pagamento[-id-]", "values": "query=SELECT `co_pagamenti`.`id`, `fe_modalita_pagamento_lang`.`title` as descrizione FROM `fe_modalita_pagamento` LEFT JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.\Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` GROUP BY title"]}
{[ "type": "select", "name": "id_pagamento[-id-]", "values": "query=SELECT `co_pagamenti`.`id`, `fe_modalita_pagamento_lang`.`title` as descrizione FROM `fe_modalita_pagamento` LEFT JOIN `fe_modalita_pagamento_lang` ON (`fe_modalita_pagamento_lang`.`id_record` = `fe_modalita_pagamento`.`codice` AND `fe_modalita_pagamento_lang`.`id_lang` = '.Models\Locale::getDefault()->id.') INNER JOIN `co_pagamenti` ON `fe_modalita_pagamento`.`codice` = `co_pagamenti`.`codice_modalita_pagamento_fe` GROUP BY title"]}
</td>
<td align="center">

View File

@ -36,7 +36,7 @@ $(document).ready(function() {
url: globals.rootdir + "/actions.php",
type: "get",
data: {
id_module: '.$id_module. ',
id_module: '.$id_module.',
op: "sizes",
},
success: function(data) {

View File

@ -96,7 +96,7 @@ foreach ($fields as $key => $field) {
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Calcolo a fine colonna').'", "name": "sum-avg['.$key.']", "values": "list=\"0\":\"'.tr('Nessuno').'\",\"sum\":\"'.tr('Somma').'\",\"avg\":\"'.tr('Media').'\"", "value": "'.( $field->summable ? 'sum' : ($field->avg ? 'avg' : '' )).'", "help": "'.tr('Scegli quale tipo di totale valori vuoi calcolare a fine tabella').'" ]}
{[ "type": "select", "label": "'.tr('Calcolo a fine colonna').'", "name": "sum-avg['.$key.']", "values": "list=\"0\":\"'.tr('Nessuno').'\",\"sum\":\"'.tr('Somma').'\",\"avg\":\"'.tr('Media').'\"", "value": "'.($field->summable ? 'sum' : ($field->avg ? 'avg' : '')).'", "help": "'.tr('Scegli quale tipo di totale valori vuoi calcolare a fine tabella').'" ]}
</div>
</div>

View File

@ -521,7 +521,7 @@ class Gestore
->setNumberOfTransactions($this->numero_transazioni_debito_diretto);
$this->debito_diretto->setGroupHeader($groupHeader);
if($groupHeader->getNumberOfTransactions() > 0) {
if ($groupHeader->getNumberOfTransactions() > 0) {
$xml = $this->debito_diretto->xml();
// Generazione filename

View File

@ -23,7 +23,6 @@ $pageTitle = tr('Scorciatoie');
include_once App::filepath('include|custom|', 'top.php');
echo '
<div class="card">
<div class="card-header">
@ -53,5 +52,5 @@ if (setting('Attiva scorciatoie da tastiera')) {
'_LINK_IMPOSTAZIONI_' => Modules::link('Impostazioni', null, tr('Strumenti » Impostazioni » Generali » <b>Abilita scorciatoie da tastiera</b>')),
]).'.</p>';
}
echo'
echo '
</div>';

View File

@ -101,7 +101,6 @@ class DefaultHandler implements HandlerInterface
*/
protected function password(&$values, &$extras)
{
$result = '
<script>
const characters ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!%-()*[]";

View File

@ -62,7 +62,7 @@ class HTMLWrapper implements WrapperInterface
// Se l'elemento da aggiungere prima è un <select>, non uso input-group-text per semplificare lo stile
$input_group_class = '';
if (!str_contains((string)$values['icon-before'], '<select')) {
if (!str_contains((string) $values['icon-before'], '<select')) {
$input_group_class = 'input-group-text';
}
@ -87,7 +87,7 @@ class HTMLWrapper implements WrapperInterface
// Se l'elemento da aggiungere prima è un <select>, non uso input-group-text per semplificare lo stile
$input_group_class = '';
if (!str_contains((string)$values['icon-after'], '<select')) {
if (!str_contains((string) $values['icon-after'], '<select')) {
$input_group_class = 'input-group-text';
}
@ -132,7 +132,7 @@ class HTMLWrapper implements WrapperInterface
$result .= '
</div>';
}
if (!empty($values['label'])) {
unset($values['label']);
}

View File

@ -654,8 +654,7 @@ class Prints
// Footer visibile solo sull'ultima pagina, sempre che non abbia deciso di nasconderlo
if (!empty($options['last-page-footer']) && empty($options['hide-footer'])) {
//Definisco qual'è l'ultima pagina
// Definisco qual'è l'ultima pagina
$is_last_page = true;
// Generazione dei contenuti del footer

View File

@ -136,13 +136,13 @@ echo "
if ($options['pricing']) {
echo "
<th class='text-center' style='width:15%'>" . tr('Prezzo unitario', [], ['upper' => true]) . '</th>';
<th class='text-center' style='width:15%'>".tr('Prezzo unitario', [], ['upper' => true]).'</th>';
if (!$options['no-iva']) {
echo "
<th class='text-center' style='width:10%'>" . tr('IVA', [], ['upper' => true]) . ' (%)</th>';
<th class='text-center' style='width:10%'>".tr('IVA', [], ['upper' => true]).' (%)</th>';
}
echo "
<th class='text-center' style='width:15%'>" . ($options['hide-total'] ? tr('Importo ivato', [], ['upper' => true]) : tr('Importo', [], ['upper' => true])) . '</th>';
<th class='text-center' style='width:15%'>".($options['hide-total'] ? tr('Importo ivato', [], ['upper' => true]) : tr('Importo', [], ['upper' => true])).'</th>';
}
echo '
@ -151,9 +151,6 @@ echo '
<tbody>';
if (!setting('Visualizza riferimento su ogni riga in stampa')) {
$riferimenti = [];
$id_rif = [];
@ -179,28 +176,27 @@ foreach ($righe as $riga) {
$autofill->count($r['descrizione']);
echo
'
echo '
<tr>
<td class="text-center" nowrap="nowrap" style="vertical-align: middle" width="25">
' . $num . '
'.$num.'
</td>';
if ($has_image) {
if ($riga->isArticolo() && !empty($riga->articolo->image)) {
echo '
if ($has_image) {
if ($riga->isArticolo() && !empty($riga->articolo->image)) {
echo '
<td align="center">
<img src="'.$riga->articolo->image.'" style="max-height: 60px; max-width:80px">
</td>';
$autofill->set(5);
} else {
echo '
$autofill->set(5);
} else {
echo '
<td></td>';
}
}
}
echo '
echo '
<td>';
$text = '';
@ -322,11 +318,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// Totale imponibile
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? (($has_image) ? 3 : 2) : 4) . '" class="text-right border-top">
<b>'.tr('Imponibile', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : 4).'" class="text-right border-top">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? ($options['no-iva'] ? 1 : 2) : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? ($options['no-iva'] ? 1 : 2) : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, $d_totali).'</b>
</th>
</tr>';
@ -335,11 +331,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
if ($show_sconto) {
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<b>'.tr('Sconto', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Sconto', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($sconto, $d_totali).'</b>
</th>
</tr>';
@ -347,11 +343,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// Totale imponibile
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<b>'.tr('Totale imponibile', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($totale_imponibile, $d_totali).'</b>
</th>
</tr>';
@ -360,11 +356,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// IVA
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<b>'.tr('Totale IVA', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($totale_iva, $d_totali).'</b>
</th>
</tr>';
@ -372,7 +368,7 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// TOTALE
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Totale documento', [], ['upper' => true]).':</b>
</td>
@ -385,10 +381,10 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// SCONTO IN FATTURA
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<b>'.tr('Sconto in fattura', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($sconto_finale, $d_totali).'</b>
</th>
</tr>';
@ -396,10 +392,10 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// NETTO A PAGARE
echo '
<tr>
<td colspan="' . ($options['show-only-total'] ? 2 : 4) . '" class="text-right border-top">
<b>'.tr('Netto a pagare', [], ['upper' => true]). ':</b>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top">
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
</td>
<th colspan="' . ($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)) . '" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($netto_a_pagare, $d_totali).'</b>
</th>
</tr>';
@ -417,7 +413,6 @@ if ($options['no-iva']) {
';
}
// CONDIZIONI GENERALI DI FORNITURA
$pagamento = Pagamento::find($documento['idpagamento']);

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
//Se non è l'ultima pagina, oppure è l'ultima pagina ma ho scelto di nascondere il footer
// Se non è l'ultima pagina, oppure è l'ultima pagina ma ho scelto di nascondere il footer
if (!$is_last_page) {
return;
}

View File

@ -23,7 +23,7 @@ $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
// Creazione righe fantasma
$autofill = new Util\Autofill($options['pricing'] ? 6 : 3);
$rows_per_page = $rows_per_page ?:16;
$rows_per_page = $rows_per_page ?: 16;
if (!empty($options['last-page-footer'])) {
$rows_per_page += 10;
}