fix: struttura scheda preventivo / contratto

This commit is contained in:
Luca 2024-10-24 16:27:03 +02:00
parent a73af9c926
commit 8b4089bf39
2 changed files with 37 additions and 40 deletions

View File

@ -52,36 +52,34 @@ echo '
</div>
</div>
<div class="card-body">
<div class="card-body">
<!-- RIGA 1 -->
<div class="row">
<div class="col-md-3">
'.Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Cliente').'", "name": "idanagrafica", "id": "idanagrafica_c", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "value": "$idsede$", "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "placeholder": "Sede legale" ]}
</div>
<!-- RIGA 1 -->
<div class="row">
<div class="col-md-3">
'.Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Cliente').'", "name": "idanagrafica", "id": "idanagrafica_c", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "value": "$idsede$", "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "placeholder": "Sede legale" ]}
</div>
<div class="col-md-3">
'.Plugins::link('Referenti', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].',"idsede_destinazione": '.$record['idsede'].'} ]}
</div>
<div class="col-md-3">
'.Plugins::link('Referenti', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].',"idsede_destinazione": '.$record['idsede'].'} ]}
</div>
<div class="col-md-3">';
<div class="col-md-3">';
if ($record['idagente'] != 0) {
echo Modules::link('Anagrafiche', $record['idagente'], null, null, 'class="pull-right"');
echo Modules::link('Anagrafiche', $record['idagente'], null, null, 'class="pull-right"');
}
?>
{[ "type": "select", "label": "<?php echo tr('Agente'); ?>", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": <?php echo $record['idanagrafica']; ?>}, "value": "$idagente$" ]}
</div>
echo '
{[ "type": "select", "label": "' . tr('Agente') . '", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": ' . $record['idanagrafica'] . '}, "value": "$idagente$" ]}
</div>
</div>
</div>
</div>
</div>';
?>
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title"><?php echo tr('Intestazione'); ?></h3>

View File

@ -57,34 +57,33 @@ if (count($preventivo->revisioni) > 1) {
</div>
</div>
<div class="card-body">
<div class="card-body">
<!-- RIGA 1 -->
<div class="row">
<div class="col-md-3">
'.Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Cliente').'", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]}
</div>
<!-- RIGA 1 -->
<div class="row">
<div class="col-md-3">
'.Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"').'
{[ "type": "select", "label": "'.tr('Cliente').'", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "value": "$idsede$", "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "placeholder": "Sede legale" ]}
</div>';
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "value": "$idsede$", "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "placeholder": "Sede legale" ]}
</div>';
if (!empty($record['idreferente'])) {
echo Plugins::link('Referenti', $record['idanagrafica'], null, null, 'class="pull-right"');
echo Plugins::link('Referenti', $record['idanagrafica'], null, null, 'class="pull-right"');
}
echo '
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].',"idsede_destinazione": '.$record['idsede'].'} ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].',"idsede_destinazione": '.$record['idsede'].'} ]}
</div>
<div class="col-md-3">';
<div class="col-md-3">';
if ($record['idagente'] != 0) {
echo Modules::link('Anagrafiche', $record['idagente'], null, null, 'class="pull-right"');
echo Modules::link('Anagrafiche', $record['idagente'], null, null, 'class="pull-right"');
}
echo '
{[ "type": "select", "label": "'.tr('Agente').'", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "$idagente$" ]}
</div>
{[ "type": "select", "label": "'.tr('Agente').'", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "$idagente$" ]}
</div>
</div>
</div>