From 71cf1bf993acd17a170db85c38befc6f316d0cf9 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Fri, 13 Mar 2020 10:27:20 +0100 Subject: [PATCH] Bugfix autocompilazione FE --- modules/tipi_intervento/edit.php | 12 ++++++------ plugins/importFE/actions.php | 6 ++++++ plugins/importFE/buttons.php | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/tipi_intervento/edit.php b/modules/tipi_intervento/edit.php index 0cb1c3289..4f035a9cb 100755 --- a/modules/tipi_intervento/edit.php +++ b/modules/tipi_intervento/edit.php @@ -30,15 +30,15 @@ include_once __DIR__.'/../../core.php';
- {[ "type": "number", "label": "", "name": "costo_orario", "required": 1, "value": "$costo_orario$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_orario", "required": 1, "value": "$costo_orario$", "icon-after": "", "help": "" ]}
- {[ "type": "number", "label": "", "name": "costo_km", "required": 1, "value": "$costo_km$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_km", "required": 1, "value": "$costo_km$", "icon-after": "", "help": "" ]}
- {[ "type": "number", "label": "", "name": "costo_diritto_chiamata", "required": 1, "value": "$costo_diritto_chiamata$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_diritto_chiamata", "required": 1, "value": "$costo_diritto_chiamata$", "icon-after": "", "help": "" ]}
@@ -53,15 +53,15 @@ include_once __DIR__.'/../../core.php';
- {[ "type": "number", "label": "", "name": "costo_orario_tecnico", "required": 1, "value": "$costo_orario_tecnico$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_orario_tecnico", "required": 1, "value": "$costo_orario_tecnico$", "icon-after": "", "help": "" ]}
- {[ "type": "number", "label": "", "name": "costo_km_tecnico", "required_tecnico": 1, "value": "$costo_km_tecnico$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_km_tecnico", "required_tecnico": 1, "value": "$costo_km_tecnico$", "icon-after": "", "help": "" ]}
- {[ "type": "number", "label": "", "name": "costo_diritto_chiamata_tecnico", "required": 1, "value": "$costo_diritto_chiamata_tecnico$", "icon-after": "", "help": "" ]} + {[ "type": "number", "label": "", "name": "costo_diritto_chiamata_tecnico", "required": 1, "value": "$costo_diritto_chiamata_tecnico$", "icon-after": "", "help": "" ]}
diff --git a/plugins/importFE/actions.php b/plugins/importFE/actions.php index 1dd6c47d0..4039db956 100755 --- a/plugins/importFE/actions.php +++ b/plugins/importFE/actions.php @@ -170,6 +170,12 @@ switch (filter('op')) { break; case 'compile': + if (empty($anagrafica)) { + echo json_encode([]); + + return; + } + $fatture = $anagrafica->fattureAcquisto() ->contabile() ->orderByDesc('created_at') diff --git a/plugins/importFE/buttons.php b/plugins/importFE/buttons.php index 302d2f608..4239ced77 100755 --- a/plugins/importFE/buttons.php +++ b/plugins/importFE/buttons.php @@ -29,7 +29,9 @@ function compile(btn) { }, success: function(response) { var data = JSON.parse(response); - console.log(data); + if (data.length == 0){ + return; + } $("#id_tipo").selectSet(data.id_tipo); $("#pagamento").selectSetNew(data.pagamento.id, data.pagamento.descrizione);