diff --git a/plugins/importFE/actions.php b/plugins/importFE/actions.php
index 99049cc22..0c990c693 100644
--- a/plugins/importFE/actions.php
+++ b/plugins/importFE/actions.php
@@ -90,4 +90,18 @@ switch (filter('op')) {
include __DIR__.'/rows.php';
break;
+
+ case 'process':
+ $name = get('name');
+
+ // Processo il file ricevuto
+ if (Interaction::isEnabled()) {
+ $process_result = Interaction::processXML($name);
+ if (!empty($process_resul)) {
+ flash()->error($process_result);
+ }
+ }
+
+ break;
+
}
diff --git a/plugins/importFE/list.php b/plugins/importFE/list.php
index c5c400367..5e3cfaa03 100644
--- a/plugins/importFE/list.php
+++ b/plugins/importFE/list.php
@@ -13,7 +13,7 @@ if (!empty($list)) {
'.tr('Nome').' |
- # |
+ # |
';
@@ -29,6 +29,11 @@ if (!empty($list)) {
';
+ }else{
+ echo '
+ ';
}
echo '
@@ -81,22 +86,58 @@ function download(button, file) {
}
function delete_fe(button, file) {
- var restore = buttonLoading(button);
+ swal({
+ title: "'.tr("Rimuovere la fattura salvata localmente?").'",
+ html: "'.tr("Sarà possibile inserirla nuovamente nel gestionale attraverso il caricamento").'",
+ type: "error",
+ showCancelButton: true,
+ confirmButtonText: "'.tr('Sì').'"
+ }).then(function (result) {
+ var restore = buttonLoading(button);
+
+ $.ajax({
+ url: globals.rootdir + "/actions.php",
+ type: "get",
+ data: {
+ id_module: globals.id_module,
+ id_plugin: ' . $id_plugin . ',
+ op: "delete",
+ name: file,
+ },
+ success: function(data) {
+ $("#list").load("' . $structure->fileurl('list.php') . '?id_module=' . $id_module . '&id_plugin=' . $id_plugin . '", function() {
+ buttonRestore(button, restore);
+ });
+ }
+ });
+ });
+}
- $.ajax({
- url: globals.rootdir + "/actions.php",
- type: "get",
- data: {
- id_module: globals.id_module,
- id_plugin: '.$id_plugin.',
- op: "delete",
- name: file,
- },
- success: function(data) {
- $("#list").load("'.$structure->fileurl('list.php').'?id_module='.$id_module.'&id_plugin='.$id_plugin.'", function() {
- buttonRestore(button, restore);
- });
- }
+function process_fe(button, file) {
+ swal({
+ title: "'.tr("Segnare la fattura come processata?").'",
+ html: "'.tr("Non sarà possibile individuarla nuovamente in modo automatico: l'unico modo per recuperarla sarà contattare l'assistenza").'",
+ type: "info",
+ showCancelButton: true,
+ confirmButtonText: "'.tr('Sì').'"
+ }).then(function (result) {
+ var restore = buttonLoading(button);
+
+ $.ajax({
+ url: globals.rootdir + "/actions.php",
+ type: "get",
+ data: {
+ id_module: globals.id_module,
+ id_plugin: '.$id_plugin.',
+ op: "process",
+ name: file,
+ },
+ success: function(data) {
+ $("#list").load("'.$structure->fileurl('list.php').'?id_module='.$id_module.'&id_plugin='.$id_plugin.'", function() {
+ buttonRestore(button, restore);
+ });
+ }
+ });
});
}