From 7f7ae841badd7401e49b0d76a8cab13f2b55b80b Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Fri, 7 Dec 2018 15:30:08 +0100 Subject: [PATCH] Miglioramenti minori --- plugins/exportFE/actions.php | 5 ----- plugins/exportFE/download.php | 5 +++++ plugins/exportFE/edit.php | 27 +++++++++++++++++++++++++-- plugins/exportFE/init.php | 2 ++ plugins/exportFE/view.php | 1 - 5 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 plugins/exportFE/download.php diff --git a/plugins/exportFE/actions.php b/plugins/exportFE/actions.php index 8b1f458a2..79482b10b 100644 --- a/plugins/exportFE/actions.php +++ b/plugins/exportFE/actions.php @@ -1,6 +1,5 @@ getFilename()); - break; } diff --git a/plugins/exportFE/download.php b/plugins/exportFE/download.php new file mode 100644 index 000000000..deb4e8fb3 --- /dev/null +++ b/plugins/exportFE/download.php @@ -0,0 +1,5 @@ +getFilename()); diff --git a/plugins/exportFE/edit.php b/plugins/exportFE/edit.php index 73200f4c8..3a5c73b36 100644 --- a/plugins/exportFE/edit.php +++ b/plugins/exportFE/edit.php @@ -1,6 +1,5 @@ fetchOne('SELECT * FROM `co_pagamenti` WHERE `id` = '.prepare($record['idpagamento'])); +$fields = [ + 'codice_modalita_pagamento_fe' => 'Codice di pagamento FE', +]; + +$missing = []; +foreach ($fields as $key => $name) { + if (empty($pagamento[$key])) { + $missing[] = $name; + } +} + +if (!empty($missing) && !$generated) { + echo ' +
+

'.tr("Prima di procedere alla generazione della fattura elettronica completa i seguenti campi del tipo di pagamento: _FIELDS_", [ + '_FIELDS_' => ''.implode(', ', $missing).'', + ]).'

+
'; + + $disabled = true; +} + // Campi obbligatori per l'anagrafica Azienda $azienda = FatturaElettronica::getAzienda(); $fields = [ @@ -118,7 +141,7 @@ echo ' echo ' - + '.tr('Scarica').' diff --git a/plugins/exportFE/init.php b/plugins/exportFE/init.php index 5b7f5c3fd..fae8db0f4 100644 --- a/plugins/exportFE/init.php +++ b/plugins/exportFE/init.php @@ -1,5 +1,7 @@