diff --git a/modules/articoli/plugins/articoli.lotti.php b/modules/articoli/plugins/articoli.lotti.php index 177737eed..ba2effa1d 100644 --- a/modules/articoli/plugins/articoli.lotti.php +++ b/modules/articoli/plugins/articoli.lotti.php @@ -22,41 +22,41 @@ echo '
  • '.tr('Generazione').'
  • '.tr('Inserimento').'
  • - +
    - +
    {[ "type": "text", "label": "'.tr('Inizio').'", "name": "serial_start", "extra": "onkeyup=\"$(\'#serial_end\').val( $(this).val()); ricalcola_generazione();\"" ]}
    - +
    - +
    {[ "type": "text", "label": "'.tr('Fine').'", "name": "serial_end", "extra": "onkeyup=\"ricalcola_generazione();\"" ]}
    - +

    '.tr('Totale prodotti da inserire').': 0

    - +
    - -
    + + - +
    {[ "type": "select", "label": "'.tr('Nuovi seriali').'", "name": "serials[]", "extra": "onchange=\"ricalcola_inserimento();\"", "multiple": 1, "values": [] ]} @@ -67,7 +67,7 @@ echo '

    '.tr('Totale prodotti da inserire').': 0

    - +
    @@ -255,8 +255,8 @@ $(document).ready(function() { tokenSeparators: [\',\'] }); }); - -function addSerial(form_id, numero) { + +function addSerial(form_id, numero) { if (numero > 0){ swal({ title: "'.tr('Nuovi seriali').'", diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index cecb11d74..600709ac6 100644 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -111,49 +111,50 @@ switch (post('op')) { $fattura->save(); - if ($stato_precedente->descrizione == 'Bozza' && $stato['descrizione'] == 'Emessa') { + if ($fattura->direzione == 'entrata' && $stato_precedente->descrizione == 'Bozza' && $stato['descrizione'] == 'Emessa') { // Generazione automatica della Fattura Elettronica $stato_fe = empty($fattura->codice_stato_fe) || in_array($fattura->codice_stato_fe, ['GEN', 'NS', 'EC02']); $checks = FatturaElettronica::controllaFattura($fattura); if ($stato_fe && empty($checks)) { try { $fattura_pa = new FatturaElettronica($id_record); - $file = $fattura_pa->save(DOCROOT.'/'.FatturaElettronica::getDirectory()); + $file = $fattura_pa->save(DOCROOT . '/' . FatturaElettronica::getDirectory()); flash()->info(tr('Fattura elettronica generata correttamente!')); if (!$fattura_pa->isValid()) { $errors = $fattura_pa->getErrors(); - flash()->warning(tr('La fattura elettronica potrebbe avere delle irregolarità!').' '.tr('Controllare i seguenti campi: _LIST_', [ + flash()->warning(tr('La fattura elettronica potrebbe avere delle irregolarità!') . ' ' . tr('Controllare i seguenti campi: _LIST_', [ '_LIST_' => implode(', ', $errors), - ]).'.'); + ]) . '.'); } } catch (UnexpectedValueException $e) { } } elseif (!empty($checks)) { - $message = tr('La fattura elettronica non è stata generata a causa di alcune informazioni mancanti').':'; + $message = tr('La fattura elettronica non è stata generata a causa di alcune informazioni mancanti') . ':'; foreach ($checks as $check) { $message .= ' -

    '.$check['name'].' '.$check['link'].'

    -
      '; +

      ' . $check['name'] . ' ' . $check['link'] . '

      +
        '; foreach ($check['errors'] as $error) { if (!empty($error)) { $message .= ' -
      • '.$error.'
      • '; +
      • ' . $error . '
      • '; } } $message .= ' -
      '; +
    '; } flash()->warning($message); } } + aggiorna_sedi_movimenti('documenti', $id_record); flash()->info(tr('Fattura modificata correttamente!')); diff --git a/modules/utenti/actions.php b/modules/utenti/actions.php index 3f9f1f143..694c0894f 100644 --- a/modules/utenti/actions.php +++ b/modules/utenti/actions.php @@ -13,9 +13,10 @@ switch (filter('op')) { // Verifico che questo nome gruppo non sia già stato usato if ($dbo->fetchNum('SELECT nome FROM zz_groups WHERE nome='.prepare($nome)) == 0) { - $dbo->query('INSERT INTO zz_groups( nome, editable ) VALUES('.prepare($nome).', 1)'); - flash()->info(tr('Gruppo aggiunto!')); + $dbo->query('INSERT INTO zz_groups(nome, editable) VALUES('.prepare($nome).', 1)'); $id_record = $dbo->lastInsertedID(); + + flash()->info(tr('Gruppo aggiunto!')); } else { flash()->error(tr('Gruppo già esistente!')); }