From c157609191468f11ce1488f55fffd76fc88e819c Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Wed, 2 Dec 2020 11:31:52 +0100 Subject: [PATCH] Migliorie grafiche e bugfix minori --- include/common/articolo.php | 7 +- modules/checklists/modutil.php | 24 ++++-- modules/fatture/edit.php | 82 +++++++++++-------- modules/stampe_contabili/edit.php | 12 +-- plugins/dettagli_articolo/actions.php | 5 +- .../dettagli_articolo/dettaglio_prezzi.php | 52 ++++++------ update/2_4_20.php | 11 +++ update/2_4_20.sql | 3 + 8 files changed, 110 insertions(+), 86 deletions(-) diff --git a/include/common/articolo.php b/include/common/articolo.php index bc065dc5e..e0ec67883 100755 --- a/include/common/articolo.php +++ b/include/common/articolo.php @@ -179,9 +179,7 @@ $("#idarticolo").on("change", function() { $("#um").selectSetNew($data.um, $data.um); // Aggiornamento automatico di guadagno e margine - if (direzione === "entrata") { - aggiorna_guadagno(); - } + }); $(document).on("change", "input[name^=qta], input[name^=prezzo_unitario], input[name^=sconto]", function() { @@ -333,4 +331,7 @@ function aggiornaQtaMinima() { div.removeClass("text-danger").addClass("text-success"); } } +if (direzione === "entrata") { + aggiorna_guadagno(); +} '; diff --git a/modules/checklists/modutil.php b/modules/checklists/modutil.php index 6e0763ee2..cf6b9d4ec 100755 --- a/modules/checklists/modutil.php +++ b/modules/checklists/modutil.php @@ -26,9 +26,16 @@ function renderChecklist($check, $level = 0)
  • checked_at) ? 'checked' : '').'> - '.$check->content.' - '.(!empty($check->checked_at) ? 'Verificato da '.$check->checkUser->username.' il '.timestampFormat($check->checked_at) : '').''; + '.$check->content.''; + + if (empty($check->user) || $check->user->id == $user->id) { + $result .= ' +
    + +
    '; + } + if ($level == 0) { $result .= ' @@ -37,13 +44,12 @@ function renderChecklist($check, $level = 0) '; } - if (empty($check->user) || $check->user->id == $user->id) { - $result .= ' -
    - -
    '; - } - + $result .= ' + '.(!empty($check->checked_at) ? tr('Verificato da _NAME_ il _DATE_', [ + '_NAME_' => $check->checkUser->username, + '_DATE_' => timestampFormat($check->checked_at), + ]) : '').''; + $result .= '