diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php
index c8456c3dd..33acfa9b6 100644
--- a/modules/fatture/actions.php
+++ b/modules/fatture/actions.php
@@ -636,6 +636,7 @@ switch (post('op')) {
case 'transform':
$fattura->id_segment = post('id_segment');
+ $fattura->data = post('data');
$fattura->save();
break;
diff --git a/modules/fatture/buttons.php b/modules/fatture/buttons.php
index bf44a3a93..a89bc450a 100644
--- a/modules/fatture/buttons.php
+++ b/modules/fatture/buttons.php
@@ -43,7 +43,8 @@ if ($dir == 'entrata') {
}
if (empty($record['is_fiscale'])) {
- $msg = '{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_module.'\' AND is_fiscale = 1 ORDER BY name" ]}';
+ $msg = '
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module=\''.$id_module.'\' AND is_fiscale = 1 ORDER BY name" ]}
+ {[ "type": "date", "label": "'.tr('Data').'", "name": "data", "required": 1, "value": "-now-" ]}';
echo '