Fix causale predefinita ddt

This commit is contained in:
MatteoPistorello 2021-01-14 17:01:57 +01:00
parent 8dc67f15d9
commit 9a0dc79ee9
2 changed files with 15 additions and 14 deletions

View File

@ -25,33 +25,34 @@ include_once __DIR__.'/../../core.php';
<div class="row">
<div class="col-md-9">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1, "value": "$descrizione$" ]}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{[ "type": "checkbox", "label": "<?php echo tr('Causale predefinita'); ?>", "name": "predefined", "value": "$predefined$", "help":"<?php echo tr('Impostare questa causale di trasporto come predefinita per i ddt'); ?>." ]}
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Flags'); ?></h3>
</div>
<div class="panel-body">
<div class="col-md-4">
{[ "type": "checkbox", "label": "<?php echo tr('Causale predefinita'); ?>", "name": "predefined", "value": "$predefined$", "help":"<?php echo tr('Impostare questa causale di trasporto come predefinita per i ddt'); ?>." ]}
</div>
<div class="col-md-4">
{[ "type": "checkbox", "label": "<?php echo tr('Importabile?'); ?>", "name": "is_importabile", "value": "$is_importabile$", "help": "<?php echo tr('I documenti associati a questa causale possono essere importati a livello contabile in altri documenti (per esempio, in Fatture)'); ?>", "placeholder": "<?php echo tr('Importabile'); ?>" ]}
</div>
<div class="panel-body">
<div class="col-md-4">
{[ "type": "checkbox", "label": "<?php echo tr('Abilita storno'); ?>", "name": "reversed", "value": "$reversed$", "help": "<?php echo tr('I documenti associati a questa causale possono essere stornati come nota di credito'); ?>", "placeholder": "<?php echo tr('Abilita storno'); ?>" ]}
</div>
</div>
</div>
</div>
</div>
</form>

View File

@ -36,7 +36,7 @@ if ($module['name'] == 'Ddt di vendita') {
$tipo_anagrafica = tr('Fornitore');
$label = tr('Mittente');
}
$id_causalet = $dbo->fetchOne('SELECT id FROM dt_causalet WHERE predefined=1')['id'];
$id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : '';
?><form action="" method="post" id="add-form">
@ -62,7 +62,7 @@ $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : '';
</div>
<div class="col-md-4">
{[ "type": "select", "label": "<?php echo tr('Causale trasporto'); ?>", "name": "idcausalet", "required": 1, "value": "$idcausalet$", "ajax-source": "causali", "icon-after": "add|<?php echo Modules::get('Causali')['id']; ?>|||<?php echo $block_edit ? 'disabled' : ''; ?>" ]}
{[ "type": "select", "label": "<?php echo tr('Causale trasporto'); ?>", "name": "idcausalet", "required": 1, "value": "<?php echo $id_causalet; ?>", "ajax-source": "causali", "icon-after": "add|<?php echo Modules::get('Causali')['id']; ?>|||<?php echo $block_edit ? 'disabled' : ''; ?>" ]}
</div>
</div>