1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-02 08:56:48 +01:00

migliorie minori

This commit is contained in:
Luca 2019-10-04 13:26:47 +02:00
parent 12eaad2b12
commit f3e4cec613
2 changed files with 10 additions and 3 deletions

View File

@ -39,7 +39,7 @@ switch (post('op')) {
// Informazioni sull'anagrafica
$anagrafica->codice = post('codice');
$anagrafica->tipo = post('tipo');
$anagrafica->codice_destinatario = post('codice_destinatario');
$anagrafica->codice_destinatario = strtoupper(post('codice_destinatario'));
$anagrafica->ragione_sociale = post('ragione_sociale');
$anagrafica->nome = post('nome');
$anagrafica->cognome = post('cognome');
@ -230,8 +230,8 @@ switch (post('op')) {
$anagrafica->idagente = $idagente;
$anagrafica->pec = post('pec');
$anagrafica->tipo = post('tipo');
$anagrafica->codice_destinatario = post('codice_destinatario');
$anagrafica->id_nazione = post('id_nazione') ?: null;
$anagrafica->codice_destinatario = strtoupper(post('codice_destinatario'));
$anagrafica->save();

View File

@ -108,7 +108,7 @@ echo '
echo '
<div class="col-md-4">
{[ "type": "text", "label": "'.tr('Codice destinatario').'", "name": "codice_destinatario", "required": 0, "class": "text-center text-uppercase alphanumeric-mask", "maxlength": "7", "extra": "", "help": "'.tr($help_codice_destinatario).'" ]}
{[ "type": "text", "label": "'.tr('Codice destinatario').'", "name": "codice_destinatario", "required": 0, "class": "text-center text-uppercase alphanumeric-mask", "maxlength": "7", "extra": "", "help": "'.tr($help_codice_destinatario).'", "readonly": "1" ]}
</div>
</div>
</div>
@ -144,4 +144,11 @@ echo
$('#ragione_sociale', '#bs-popup, #bs-popup2').prop('disabled', false).prop('required', true);
}
});
$('#id_nazione', '#bs-popup, #bs-popup2').change(function(){
if ($(this).find('option:selected').data('text')=='IT - Italia'){
$('#codice_destinatario', '#bs-popup, #bs-popup2').removeAttr('readonly');
}
});
</script>