Selezione data in trasformazione fattura pro-forma

This commit is contained in:
Thomas Zilio 2019-07-31 18:28:50 +02:00
parent 28d74d2a05
commit ae44fb5e41
2 changed files with 3 additions and 1 deletions

View File

@ -636,6 +636,7 @@ switch (post('op')) {
case 'transform':
$fattura->id_segment = post('id_segment');
$fattura->data = post('data');
$fattura->save();
break;

View File

@ -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 = '<br>{[ "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 '
<button type="button" class="btn btn-warning ask" data-msg="'.tr('Vuoi trasformare questa fattura pro-forma in una di tipo fiscale?').'<br>'.prepareToField(\HTMLBuilder\HTMLBuilder::replace($msg)).'" data-op="transform" data-button="'.tr('Trasforma').'" data-class="btn btn-lg btn-warning" data-backto="record-edit">