fix: struttura dati cliente/fornitore ddt uscita/entrata

This commit is contained in:
Luca 2024-10-24 16:16:11 +02:00
parent 8e14aff240
commit eacba9b3bc
1 changed files with 18 additions and 19 deletions

View File

@ -134,7 +134,7 @@ echo '
</div>
</div>
<div class="card-body">
<div class="card-body">
<!-- RIGA 1 -->
<div class="row">
@ -143,26 +143,25 @@ echo '
{[ "type": "select", "label": "'.($dir == 'uscita' ? tr('Mittente') : tr('Destinatario')).'", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti_fornitori" ]}
</div>';
if ($dir == 'entrata') {
echo '
echo '
<div class="col-md-3">';
if ($record['idagente'] != 0) {
if ($record['idagente'] != 0) {
echo Modules::link('Anagrafiche', $record['idagente'], null, null, 'class="pull-right"');
}
echo '
}
echo '
{[ "type": "select", "label": "'.tr('Agente').'", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "$idagente$" ]}
</div>';
}
echo '
<div class="col-md-3">';
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 '
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].', "idsede_destinazione": '.$record['idsede_destinazione'].'} ]}
</div>
</div>
</div>
</div>
</div>';
?>
<div class="row">