1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-10 08:30:48 +01:00
This commit is contained in:
Beppe 2021-03-17 18:51:27 +01:00
commit 89561fa12e
6 changed files with 40 additions and 31 deletions

View File

@ -104,7 +104,7 @@ if ($user->is_admin && string_contains($module['option'], '|select|')) {
<script> <script>
function modificaColonne(button) { function modificaColonne(button) {
openModal("'.tr('Modifica colonne').'", globals.rootdir + "/actions.php?id_module=" + globals.id_module + "&id_record=" + globals.id_record + "&op=aggiorna_colonne") openModal("'.tr('Modifica colonne').'", globals.rootdir + "/actions.php?id_module=" + globals.id_module + "&op=aggiorna_colonne")
} }
</script>'; </script>';
} }

View File

@ -26,7 +26,7 @@ class DatiFattureElettroniche extends Controllo
{ {
public function getName() public function getName()
{ {
return tr('Corrispondeze Fatture Elettroniche XML e Fatture di vendita'); return tr('Corrispondenze XML FE e Documenti di vendita');
} }
public function getType($record) public function getType($record)
@ -92,28 +92,26 @@ class DatiFattureElettroniche extends Controllo
]; ];
$riepilogo_anomalie = ' $riepilogo_anomalie = '
<table class="table table-bordered table-condensed"> <div>
<tr> <div class="col-md-3" style="background-color:#efefef;" >Sorgente</div>
<th>Sorgente</th> <div class="col-md-3" style="background-color:#efefef;" >P. Iva</div>
<th>P. Iva</th> <div class="col-md-3" style="background-color:#efefef;" >Cod. fiscale</div>
<th>Cod. fiscale</th> <div class="col-md-3" style="background-color:#efefef;" >Totale</div>
<th>Totale</th> </div>
</tr>
<div>
<div class="col-md-3" >XML</div>
<div class="col-md-3" >'.$anomalia['piva_xml'].'</div>
<div class="col-md-3" >'.$anomalia['codice_fiscale_xml'].'</div>
<div class="col-md-3" >'.$anomalia['totale_documento_xml'].'</div>
</div>
<tr> <div>
<td>XML</td> <div class="col-md-3">Gestionale</div>
<td>'.$anomalia['piva_xml'].'</td> <div class="col-md-3">'.$this->htmlDiff($anomalia['piva_xml'], $anomalia['piva']).'</div>
<td>'.$anomalia['codice_fiscale_xml'].'</td> <div class="col-md-3">'.$this->htmlDiff($anomalia['codice_fiscale_xml'], $anomalia['codice_fiscale']).'</div>
<td>'.$anomalia['totale_documento_xml'].'</td> <div class="col-md-3">'.$this->htmlDiff($anomalia['totale_documento_xml'], $anomalia['totale_documento']).'</div>
</tr> </div>';
<tr>
<td>Gestionale</td>
<td>'.$this->htmlDiff($anomalia['piva_xml'], $anomalia['piva']).'</td>
<td>'.$this->htmlDiff($anomalia['codice_fiscale_xml'], $anomalia['codice_fiscale']).'</td>
<td>'.$this->htmlDiff($anomalia['totale_documento_xml'], $anomalia['totale_documento']).'</td>
</tr>
</table>';
$this->addResult([ $this->addResult([
'id' => $fattura_vendita->id, 'id' => $fattura_vendita->id,

View File

@ -199,11 +199,15 @@ switch (filter('op')) {
$history = (array) $informazioni['history']; $history = (array) $informazioni['history'];
foreach ($history as $key => $value) { foreach ($history as $key => $value) {
$history[$key]['size'] = Filesystem::formatBytes($value['size']); $history[$key]['size'] = Filesystem::formatBytes($value['size']);
$history[$key]['invoices_size'] = Filesystem::formatBytes($value['invoices_size']);
$history[$key]['notifies_size'] = Filesystem::formatBytes($value['notifies_size']);
} }
echo json_encode([ echo json_encode([
'invoice_number' => $informazioni['invoice_number'], 'invoice_number' => $informazioni['invoice_number'],
'size' => Filesystem::formatBytes($informazioni['size']), 'size' => Filesystem::formatBytes($informazioni['size']),
'invoices_size' => Filesystem::formatBytes($informazioni['invoices_size']),
'notifies_size' => Filesystem::formatBytes($informazioni['notifies_size']),
'history' => $history, 'history' => $history,
]); ]);
break; break;

View File

@ -105,8 +105,10 @@ if (Services::isEnabled()) {
<thead> <thead>
<tr> <tr>
<th>'.tr('Anno').'</th> <th>'.tr('Anno').'</th>
<th>'.tr('Fatture transitate').'</th> <th>'.tr('Documenti transitati').'</th>
<th>'.tr('Spazio occupato').'</th> <th>'.tr('Spazio fatture').'</th>
<th>'.tr('Spazio ricevute').'</th>
<th>'.tr('Spazio totale occupato').'</th>
</tr> </tr>
</thead> </thead>
@ -114,6 +116,8 @@ if (Services::isEnabled()) {
<tr class="info"> <tr class="info">
<td>'.tr('Totale').'</td> <td>'.tr('Totale').'</td>
<td id="fe_numero"></td> <td id="fe_numero"></td>
<td id="fe_spazio_fatture"></td>
<td id="fe_spazio_ricevute"></td>
<td id="fe_spazio"></td> <td id="fe_spazio"></td>
</tr> </tr>
</tbody> </tbody>
@ -133,6 +137,8 @@ if (Services::isEnabled()) {
}, },
success: function (response) { success: function (response) {
$("#fe_numero").html(response.invoice_number); $("#fe_numero").html(response.invoice_number);
$("#fe_spazio_fatture").html(response.invoices_size);
$("#fe_spazio_ricevute").html(response.notifies_size);
$("#fe_spazio").html(response.size); $("#fe_spazio").html(response.size);
if (response.history.length) { if (response.history.length) {
@ -142,6 +148,8 @@ if (Services::isEnabled()) {
$("#elenco-fe").append(`<tr> $("#elenco-fe").append(`<tr>
<td>` + data["year"] + `</td> <td>` + data["year"] + `</td>
<td>` + data["number"] + `</td> <td>` + data["number"] + `</td>
<td>` + data["invoices_size"] + `</td>
<td>` + data["notifies_size"] + `</td>
<td>` + data["size"] + `</td> <td>` + data["size"] + `</td>
</tr>`); </tr>`);
} }

View File

@ -158,13 +158,9 @@ class SelectHandler implements HandlerInterface
$attributes[] = 'style="background:'.$element['_bgcolor_'].'; color:'.color_inverse($element['_bgcolor_'].';"'); $attributes[] = 'style="background:'.$element['_bgcolor_'].'; color:'.color_inverse($element['_bgcolor_'].';"');
} }
$exclude = ['id', 'text'];
// 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
foreach ($element as $key => $value) { unset($element['optgroup']);
if (!in_array($key, $exclude)) { $attributes[] = "data-select-attributes='".replace(json_encode($element), ["'" => "\'"])."'";
$attributes[] = 'data-'.$key.'="'.prepareToField($value).'"';
}
}
$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>';

View File

@ -51,3 +51,6 @@ UPDATE `zz_widgets` SET `query` = 'SELECT\n CONCAT_WS(\' \', REPLACE(REPLACE(REP
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
(NULL, 'v1', 'create', 'articolo', 'Modules\\Articoli\\API\\v1\\Articoli', '1'), (NULL, 'v1', 'create', 'articolo', 'Modules\\Articoli\\API\\v1\\Articoli', '1'),
(NULL, 'v1', 'update', 'articolo', 'Modules\\Articoli\\API\\v1\\Articoli', '1'); (NULL, 'v1', 'update', 'articolo', 'Modules\\Articoli\\API\\v1\\Articoli', '1');
-- Fix visualizzazione attività in dashboard
UPDATE `zz_segments` SET `clause` = '(orario_inizio BETWEEN \'|period_start|\' AND \'|period_end|\' OR orario_fine BETWEEN \'|period_start|\' AND \'|period_end|\')' WHERE `zz_segments`.`name` = 'Attività';