Fix #1088, pull request #1163

This commit is contained in:
Pek5892 2023-01-26 16:18:35 +01:00
parent c8afdf27f9
commit 791ea68abd
3 changed files with 15 additions and 6 deletions

View File

@ -322,6 +322,7 @@ span.form-control {
.widget li {
margin-left: 0;
list-style-type: none;
height: 106px;
}
.widget {

View File

@ -245,11 +245,11 @@ class WidgetManager implements ManagerInterface
// Generazione del codice HTML
if (!empty($widgets)) {
$row_max = count($widgets);
if ($row_max > 4) {
$row_max = 4;
} elseif ($row_max < 2) {
$row_max = 2;
$row_max = setting('Numero massimo Widget per riga');
if ($row_max > 6) {
$row_max = 6;
} elseif ($row_max < 1) {
$row_max = 1;
}
$result = '

View File

@ -119,4 +119,12 @@ WHERE
GROUP BY
`descrizione`
HAVING
2=2" WHERE `name` = 'Pagamenti';
2=2" WHERE `name` = 'Pagamenti';
-- Aggiunta impostazione Numero massimo widget per colonna
INSERT INTO zz_settings(nome, valore, tipo, editable, sezione) VALUES ('Numero massimo Widget per riga','6','list[1,2,3,4,6]','1','Generali');
-- Modifica widget Magazzino
UPDATE `zz_widgets` SET `query` = 'SELECT REPLACE(REPLACE(REPLACE(FORMAT(SUM(qta),2), ",", "#"), ".", ","), "#", ".") AS dato FROM mg_articoli WHERE qta>0 AND deleted_at IS NULL AND servizio=0 AND 1=1' WHERE `zz_widgets`.`name` = 'Articoli in magazzino';
UPDATE `zz_widgets` SET `text` = 'Unità' WHERE `zz_widgets`.`name` = 'Articoli in magazzino';
UPDATE `zz_widgets` SET `text` = 'Valore' WHERE `zz_widgets`.`name` = 'Valore magazzino';