Compare commits

...

5 Commits

Author SHA1 Message Date
valentina c8f42e38f0 fix: template stampa preventivo con immagini 2024-10-22 12:46:59 +02:00
FabioL 9623e54d87 fix: animazione pagine 2024-10-22 12:06:23 +02:00
valentina 85dda6e1ee fix: template stampa preventivi 2024-10-22 11:48:58 +02:00
valentina 31bc259d0c fix: correzione errore js 2024-10-22 10:40:49 +02:00
valentina 4472a99e87 fix: lettura valori select 2024-10-22 10:40:29 +02:00
6 changed files with 55 additions and 48 deletions

View File

@ -38,8 +38,26 @@
color: #000; color: #000;
} }
.preloader{ #main_loading {
background-color: #f4f6f9de ; display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 9999;
}
#main_loading > img {
position: fixed;
top: 50%;
left: 50%;
width: 60px;
height: 60px;
margin-top: -30px;
margin-left: -30px;
z-index: 9999;
} }
html { html {
@ -214,25 +232,15 @@ a:focus {
} }
#mini-loader { #mini-loader > div{
position: fixed;
top: 0;
left: 0;
z-index: 9000;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.15);
}
#mini-loader>div {
position: fixed; position: fixed;
bottom: 20px; bottom: 20px;
left: auto;
right: 20px; right: 20px;
width: 100px;
height: 100px;
margin-top: -50px; margin-top: -50px;
margin-left: -50px; margin-left: -50px;
z-index: 9000;
width: 100px;
height: 100px;
background: transparent url(../img/ajax-loader.gif) top left no-repeat; background: transparent url(../img/ajax-loader.gif) top left no-repeat;
} }
@ -473,7 +481,7 @@ span.form-control {
.select2-search, .select2-search,
.select2-search__field { .select2-search__field {
width: 100%; width: 100% !important;
} }
.select2-results__option[aria-selected=true] { .select2-results__option[aria-selected=true] {

View File

@ -18,7 +18,7 @@
// Aggiunta dell'ingranaggio all'unload della pagina // Aggiunta dell'ingranaggio all'unload della pagina
$(window).on("beforeunload", function () { $(window).on("beforeunload", function () {
$("#main_loading").css('height', '100vh').find('img').show().removeClass('animation__shake').addClass('animation__shake'); $("#main_loading").show().find('img').show().removeClass('animation__shake').addClass('animation__shake');
}); });
// Fix multi-modal // Fix multi-modal
@ -100,6 +100,7 @@ $(document).ready(function () {
alignMaxHeight(".module-header .card"); alignMaxHeight(".module-header .card");
$("#main_loading").fadeOut()
}); });
/* /*

View File

@ -365,7 +365,7 @@ if (Auth::check()) {
echo ' echo '
<!-- Loader principale --> <!-- Loader principale -->
<!-- Preloader --> <!-- Preloader -->
<div id="main_loading" class="preloader flex-column justify-content-center align-items-center"> <div id="main_loading" class="flex-column justify-content-center align-items-center">
<img class="animation__shake" src="'.$rootdir.'/assets/dist/img/logo.png" alt="OSM" height="60" width="60"> <img class="animation__shake" src="'.$rootdir.'/assets/dist/img/logo.png" alt="OSM" height="60" width="60">
</div> </div>

View File

@ -495,8 +495,9 @@ echo '
} }
let data = anagrafica.getData(); let data = anagrafica.getData();
input("idcontratto").getElement() if (data) {
.selectSetNew(data.id_contratto, data.descrizione_contratto); input("idcontratto").getElement().selectSetNew(data.id_contratto, data.descrizione_contratto);
}
// Quando modifico orario inizio, allineo anche l\'orario fine // Quando modifico orario inizio, allineo anche l\'orario fine
let orario_inizio = input("orario_inizio").getElement(); let orario_inizio = input("orario_inizio").getElement();

View File

@ -173,8 +173,7 @@ class SelectHandler implements HandlerInterface
// Leggo ulteriori campi oltre a id e descrizione per inserirli nell'option nella forma "data-nomecampo1", "data-nomecampo2", ecc // Leggo ulteriori campi oltre a id e descrizione per inserirli nell'option nella forma "data-nomecampo1", "data-nomecampo2", ecc
unset($element['optgroup']); unset($element['optgroup']);
$attributes[] = "data-select-attributes='".replace(json_encode($element), ["'" => "\'"])."'"; $attributes[] = "data-select-attributes='".htmlspecialchars(json_encode($element), ENT_QUOTES)."'";
$html .= ' $html .= '
<option value="'.prepareToField($element['id']).'" '.implode(' ', $attributes).(!empty($element['disabled']) ? 'disabled' : '').'>'.$element['text'].'</option>'; <option value="'.prepareToField($element['id']).'" '.implode(' ', $attributes).(!empty($element['disabled']) ? 'disabled' : '').'>'.$element['text'].'</option>';
} }
@ -226,8 +225,7 @@ class SelectHandler implements HandlerInterface
// Leggo ulteriori campi oltre a id e descrizione per inserirli nell'option nella forma "data-nomecampo1", "data-nomecampo2", ecc // Leggo ulteriori campi oltre a id e descrizione per inserirli nell'option nella forma "data-nomecampo1", "data-nomecampo2", ecc
unset($element['optgroup']); unset($element['optgroup']);
$attributes[] = "data-select-attributes='".replace(json_encode($element), ["'" => "\'"])."'"; $attributes[] = "data-select-attributes='".htmlspecialchars(json_encode($element), ENT_QUOTES)."'";
$result .= ' $result .= '
<option value="'.prepareToField($element['id']).'" '.implode(' ', $attributes).'>'.$element['text'].'</option>'; <option value="'.prepareToField($element['id']).'" '.implode(' ', $attributes).'>'.$element['text'].'</option>';
} }

View File

@ -205,7 +205,7 @@ foreach ($righe as $key => $riga) {
$subtotale_gruppo = 0; $subtotale_gruppo = 0;
$iva_gruppo = 0; $iva_gruppo = 0;
$has_gruppo = true; $has_gruppo = true;
$colspan_titolo = $options['pricing'] ? 'colspan="5"' : 'colspan="2"'; $colspan_titolo = $options['pricing'] ? 5 : 2;
$descrizione = '<b>'.nl2br((string) $r['descrizione']).'</b>'; $descrizione = '<b>'.nl2br((string) $r['descrizione']).'</b>';
} else { } else {
$descrizione = nl2br((string) $r['descrizione']); $descrizione = nl2br((string) $r['descrizione']);
@ -236,7 +236,7 @@ foreach ($righe as $key => $riga) {
} }
echo ' echo '
<td style="vertical-align: middle" '.$colspan_titolo.'> <td style="vertical-align: middle" colspan="'.$colspan_titolo.'">
'.$descrizione; '.$descrizione;
if ($riga->isArticolo()) { if ($riga->isArticolo()) {
@ -320,28 +320,28 @@ foreach ($righe as $key => $riga) {
if ($has_gruppo && ($next->is_titolo || $next == null) && ($options['pricing'] || $options['show-only-total'])) { if ($has_gruppo && ($next->is_titolo || $next == null) && ($options['pricing'] || $options['show-only-total'])) {
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right">
<b>'.tr('Subtotale', [], ['upper' => true]).':</b> <b>'.tr('Subtotale', [], ['upper' => true]).':</b>
</td> </td>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <td colspan="1" class="text-right">
'.moneyFormat($subtotale_gruppo, $d_totali).' '.moneyFormat($subtotale_gruppo, $d_totali).'
</td> </td>
</tr>'; </tr>';
if (!$options['no-iva']) { if (!$options['no-iva']) {
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right">
<b>'.tr('Iva', [], ['upper' => true]).':</b> <b>'.tr('Iva', [], ['upper' => true]).':</b>
</td> </td>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 1)).'" class="text-right"> <td colspan="1" class="text-right">
'.moneyFormat($iva_gruppo, $d_totali).' '.moneyFormat($iva_gruppo, $d_totali).'
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right">
<b>'.tr('Subtotale ivato', [], ['upper' => true]).':</b> <b>'.tr('Subtotale ivato', [], ['upper' => true]).':</b>
</td> </td>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 1)).'" class="text-right"> <td colspan="1" class="text-right">
<b>'.moneyFormat($subtotale_gruppo + $iva_gruppo, $d_totali).'</b> <b>'.moneyFormat($subtotale_gruppo + $iva_gruppo, $d_totali).'</b>
</td> </td>
</tr>'; </tr>';
@ -372,11 +372,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// Totale imponibile // Totale imponibile
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : 4).'" class="text-right text-muted"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right text-muted">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b> <b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? ($options['no-iva'] ? 1 : 2) : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, $d_totali).'</b> <b>'.moneyFormat($show_sconto ? $imponibile : $totale_imponibile, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -385,11 +385,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
if ($show_sconto) { if ($show_sconto) {
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) :((($has_image) ? 6 : 5))).'" class="text-right text-muted">
<b>'.tr('Sconto', [], ['upper' => true]).':</b> <b>'.tr('Sconto', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($sconto, $d_totali).'</b> <b>'.moneyFormat($sconto, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -397,11 +397,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// Totale imponibile // Totale imponibile
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : ((($has_image) ? 6 : 5))).'" class="text-right text-muted">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b> <b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($totale_imponibile, $d_totali).'</b> <b>'.moneyFormat($totale_imponibile, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -411,11 +411,11 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
if (!$options['no-iva']) { if (!$options['no-iva']) {
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right text-muted">
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b> <b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($totale_iva, $d_totali).'</b> <b>'.moneyFormat($totale_iva, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -423,11 +423,10 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// TOTALE // TOTALE
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : (($has_image) ? 6 : 5)).'" class="text-right text-muted">
<b>'.tr('Totale documento', [], ['upper' => true]).':</b> <b>'.tr('Totale documento', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="1" class="text-right">
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<b>'.moneyFormat($totale, $d_totali).'</b> <b>'.moneyFormat($totale, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -436,10 +435,10 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// SCONTO IN FATTURA // SCONTO IN FATTURA
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : ((($has_image) ? 6 : 5))).'" class="text-right border-top">
<b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b> <b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($sconto_finale, $d_totali).'</b> <b>'.moneyFormat($sconto_finale, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';
@ -447,10 +446,10 @@ if (($options['pricing'] && !isset($options['hide-total'])) || $options['show-on
// NETTO A PAGARE // NETTO A PAGARE
echo ' echo '
<tr> <tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right border-top"> <td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : ((($has_image) ? 6 : 5))).'" class="text-right border-top">
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b> <b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
</td> </td>
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> <th colspan="1" class="text-right">
<b>'.moneyFormat($netto_a_pagare, $d_totali).'</b> <b>'.moneyFormat($netto_a_pagare, $d_totali).'</b>
</th> </th>
</tr>'; </tr>';