Migliorie minori

This commit is contained in:
Luca 2018-12-28 00:04:41 +01:00
parent dbc8f2f4f5
commit 1037aae3c7
7 changed files with 24 additions and 12 deletions

View File

@ -81,7 +81,7 @@ echo '
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
{[ "type": "checkbox", "label": "'.tr('Notifica di lettura').'", "name": "read_notify", "value": "'.$template['read_notify'].'" ]} {[ "type": "checkbox", "label": "'.tr('Richiedi notifica di lettura').'", "name": "read_notify", "value": "'.$template['read_notify'].'" ]}
</div> </div>
</div>'; </div>';

View File

@ -126,7 +126,7 @@ function search(button) {
}, },
success: function(data){ success: function(data){
if (data == "none") { if (data == "none") {
$("#update-search").html("'.tr('Nessun aggiornamento presente').'."); $("#update-search").html("'.tr('Nessun aggiornamento disponibile').'.");
} else { } else {
$("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + ".<br>'.tr('Scaricalo ora: _LINK_', [ $("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + ".<br>'.tr('Scaricalo ora: _LINK_', [
'_LINK_' => "<a target='_blank' href='https://github.com/devcode-it/openstamanager/releases'>https://github.com/devcode-it/openstamanager/releases</a>", '_LINK_' => "<a target='_blank' href='https://github.com/devcode-it/openstamanager/releases'>https://github.com/devcode-it/openstamanager/releases</a>",

View File

@ -20,7 +20,7 @@ switch (filter('op')) {
$dbo->update('co_banche', $array, ['id' => $id_record]); $dbo->update('co_banche', $array, ['id' => $id_record]);
} }
flash()->info(tr('Salvataggio completato!')); flash()->info(tr('Salvataggio completato.'));
} else { } else {
flash()->error(tr('Ci sono stati alcuni errori durante il salvataggio!')); flash()->error(tr('Ci sono stati alcuni errori durante il salvataggio!'));
} }
@ -29,9 +29,11 @@ switch (filter('op')) {
case 'add': case 'add':
$nome = filter('nome'); $nome = filter('nome');
$bic = filter('bic');
$iban = filter('iban');
if (isset($nome)) { if (isset($nome)) {
$dbo->query('INSERT INTO `co_banche` (`nome`) VALUES ('.prepare($nome).')'); $dbo->query('INSERT INTO `co_banche` (`nome`, `bic`, `iban`) VALUES ('.prepare($nome).', '.prepare($bic).', '.prepare($iban).')');
$id_record = $dbo->lastInsertedID(); $id_record = $dbo->lastInsertedID();
if (isAjaxRequest()) { if (isAjaxRequest()) {

View File

@ -12,6 +12,15 @@ include_once __DIR__.'/../../core.php';
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-8">
{[ "type": "text", "label": "<?php echo tr('IBAN'); ?>", "name": "iban", "required": "1", "class": "alphanumeric-mask", "maxlength": 32, "value": "$iban$" ]}
</div>
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('BIC'); ?>", "name": "bic", "class": "alphanumeric-mask", "maxlength": 11, "value": "$bic$" ]}
</div>
</div>
<!-- PULSANTI --> <!-- PULSANTI -->
<div class="row"> <div class="row">
<div class="col-md-12 text-right"> <div class="col-md-12 text-right">

View File

@ -48,7 +48,8 @@ include_once __DIR__.'/../../core.php';
<?php <?php
// Collegamenti diretti (numerici) // Collegamenti diretti (numerici)
$documenti = $dbo->fetchNum('SELECT idanagrafica FROM an_anagrafiche WHERE idbanca_vendite='.prepare($id_record).' $documenti = $dbo->fetchNum('SELECT idanagrafica FROM an_anagrafiche WHERE idbanca_vendite='.prepare($id_record).'
UNION SELECT idanagrafica FROM an_anagrafiche WHERE idbanca_acquisti='.prepare($id_record)); UNION SELECT idanagrafica FROM an_anagrafiche WHERE idbanca_acquisti='.prepare($id_record).'
UNION SELECT idanagrafica FROM co_documenti WHERE idbanca='.prepare($id_record));
if (!empty($documenti)) { if (!empty($documenti)) {
echo ' echo '

View File

@ -30,7 +30,7 @@ include_once __DIR__.'/../../core.php';
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
{[ "type": "checkbox", "label": "<?php echo tr('Notifica di lettura'); ?>", "name": "read_notify", "value": "$read_notify$", "placeholder": "<?php echo tr('Abilita la notifica di lettura'); ?>" ]} {[ "type": "checkbox", "label": "<?php echo tr('Richiedi notifica di lettura'); ?>", "name": "read_notify", "value": "$read_notify$", "placeholder": "<?php echo tr('Richiedi la notifica di lettura al destinatario.'); ?>" ]}
</div> </div>
</div> </div>
@ -47,15 +47,15 @@ include_once __DIR__.'/../../core.php';
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('CC'); ?>", "name": "cc", "value": "$cc$" ]} {[ "type": "text", "label": "<?php echo tr('CC'); ?>", "name": "cc", "value": "$cc$", "help": "<?php echo ('Copia carbone.'); ?>" ]}
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('BCC'); ?>", "name": "bcc", "value": "$bcc$" ]} {[ "type": "text", "label": "<?php echo tr('CCN'); ?>", "name": "bcc", "value": "$bcc$", "help": "<?php echo ('Copia carbone nascosta.'); ?>" ]}
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
{[ "type": "email", "label": "<?php echo tr('Reply to'); ?>", "name": "reply_to", "value": "$reply_to$" ]} {[ "type": "email", "label": "<?php echo tr('Rispondi a'); ?>", "name": "reply_to", "value": "$reply_to$", "help": "<?php echo ('Rispondi a questo indirizzo e-mail.'); ?>" ]}
</div> </div>
</div> </div>

View File

@ -168,7 +168,7 @@ if (empty($record['is_fiscale'])) {
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
{[ "type": "select", "label": "<?php echo tr('Banca'); ?>", "name": "idbanca", "values": "query=SELECT id, CONCAT (nome, ' - ' , iban) AS descrizione FROM co_banche WHERE deleted_at IS NULL ORDER BY nome ASC", "value": "$idbanca$" ]} {[ "type": "select", "label": "<?php echo tr('Banca'); ?>", "name": "idbanca", "values": "query=SELECT id, CONCAT (nome, ' - ' , iban) AS descrizione FROM co_banche WHERE deleted_at IS NULL ORDER BY nome ASC", "value": "$idbanca$", "icon-after": "add|<?php echo Modules::get('Banche')['id']; ?>" ]}
</div> </div>
</div> </div>
@ -202,13 +202,13 @@ if (!empty($record['is_fiscale'])) {
if (($n2 <= 0 && $record['stato'] == 'Emessa') || $differenza != 0) { if (($n2 <= 0 && $record['stato'] == 'Emessa') || $differenza != 0) {
?> ?>
<a class="btn btn-sm btn-primary <?php echo (!empty(Modules::get('Prima nota'))) ? '' : 'disabled'; ?>" href="javascript:;" onclick="launch_modal( 'Aggiungi prima nota', '<?php echo $rootdir; ?>/add.php?id_module=<?php echo Modules::get('Prima nota')['id']; ?>&iddocumento=<?php echo $id_record; ?>&dir=<?php echo $dir; ?>', 1 );"><i class="fa fa-euro"></i> <?php echo tr('Aggiungi prima nota'); ?>...</a><br><br> <a class="btn btn-primary <?php echo (!empty(Modules::get('Prima nota'))) ? '' : 'disabled'; ?>" href="javascript:;" onclick="launch_modal( 'Aggiungi prima nota', '<?php echo $rootdir; ?>/add.php?id_module=<?php echo Modules::get('Prima nota')['id']; ?>&iddocumento=<?php echo $id_record; ?>&dir=<?php echo $dir; ?>', 1 );"><i class="fa fa-euro"></i> <?php echo tr('Aggiungi prima nota'); ?>...</a><br><br>
<?php <?php
} }
if ($record['stato'] == 'Pagato') { if ($record['stato'] == 'Pagato') {
?> ?>
<a class="btn btn-sm btn-primary" href="javascript:;" onclick="if( confirm('Se riapri questa fattura verrà azzerato lo scadenzario e la prima nota. Continuare?') ){ $.post( '<?php echo $rootdir; ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>', { id_module: '<?php echo $id_module; ?>', id_record: '<?php echo $id_record; ?>', op: 'reopen' }, function(){ location.href='<?php echo $rootdir; ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>'; } ); }" title="Aggiungi prima nota"><i class="fa fa-folder-open"></i> <?php echo tr('Riapri fattura'); ?>...</a> <a class="btn btn-primary" href="javascript:;" onclick="if( confirm('Se riapri questa fattura verrà azzerato lo scadenzario e la prima nota. Continuare?') ){ $.post( '<?php echo $rootdir; ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>', { id_module: '<?php echo $id_module; ?>', id_record: '<?php echo $id_record; ?>', op: 'reopen' }, function(){ location.href='<?php echo $rootdir; ?>/editor.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>'; } ); }" title="Aggiungi prima nota"><i class="fa fa-folder-open"></i> <?php echo tr('Riapri fattura'); ?>...</a>
<?php <?php
} }
} }