fix: visualizzazione scheda di modifica ordine

This commit is contained in:
FabioL 2024-10-25 09:42:39 +02:00
parent 95ede3e60f
commit 731d7e654c
1 changed files with 15 additions and 17 deletions

View File

@ -90,48 +90,46 @@ echo '
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="card-body"> <!-- RIGA 1 -->
<!-- RIGA 1 --> <div class="row">
<div class="row"> <div class="col-md-3">';
<div class="col-md-3">';
echo Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"'); echo Modules::link('Anagrafiche', $record['idanagrafica'], null, null, 'class="pull-right"');
if ($dir == 'entrata') { if ($dir == 'entrata') {
?> ?>
{[ "type": "select", "label": "<?php echo tr('Cliente'); ?>", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]} {[ "type": "select", "label": "<?php echo tr('Cliente'); ?>", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "ajax-source": "clienti" ]}
<?php <?php
} else { } else {
?> ?>
{[ "type": "select", "label": "<?php echo tr('Fornitore'); ?>", "name": "idanagrafica", "required": 1, "ajax-source": "fornitori", "value": "$idanagrafica$" ]} {[ "type": "select", "label": "<?php echo tr('Fornitore'); ?>", "name": "idanagrafica", "required": 1, "ajax-source": "fornitori", "value": "$idanagrafica$" ]}
<?php <?php
} }
echo ' echo '
</div> </div>
<div class="col-md-3">'; <div class="col-md-3">';
if (!empty($record['idreferente'])) { 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 ' echo '
{[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].', "idsede_destinazione": '.$record['idsede'].'} ]} {[ "type": "select", "label": "'.tr('Referente').'", "name": "idreferente", "value": "$idreferente$", "ajax-source": "referenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].', "idsede_destinazione": '.$record['idsede'].'} ]}
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "required": 1, "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "'.$record['idsede'].'" ]} {[ "type": "select", "label": "'.tr('Sede').'", "name": "idsede", "required": 1, "ajax-source": "sedi", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "'.$record['idsede'].'" ]}
</div>'; </div>';
if ($dir == 'entrata') { if ($dir == 'entrata') {
echo ' echo '
<div class="col-md-3">'; <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 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$" ]} {[ "type": "select", "label": "'.tr('Agente').'", "name": "idagente", "ajax-source": "agenti", "select-options": {"idanagrafica": '.$record['idanagrafica'].'}, "value": "$idagente$" ]}
</div>'; </div>';
} }
echo ' echo '
</div>
</div> </div>
</div> </div>
</div>'; </div>';