Migliorata importazione fe con possibilità di creare al volo gli articoli

This commit is contained in:
Luca 2019-05-16 17:24:21 +02:00
parent 0619a3a377
commit 9ac9f39de7
4 changed files with 8 additions and 7 deletions

View File

@ -215,11 +215,11 @@ if (Auth::check()) {
<!-- Navbar Left Menu -->
<div class="navbar-left" class="hidden-xs">
<ul class="nav navbar-nav" class="hidden-xs">
<li><a href="#" id="daterange" style="color:'.$calendar.';background:inherit">
<li><a href="#" id="daterange" style="color:'.$calendar.';background:inherit;" >
<i class="fa fa-calendar" style="color:inherit"></i> <i class="fa fa-caret-down" style="color:inherit"></i>
</a></li>
<li><a href="#" style="color:'.$calendar.';background:inherit">
<li><a style="color:'.$calendar.';background:inherit;cursor:default;">
'.Translator::dateToLocale($_SESSION['period_start']).' - '.Translator::dateToLocale($_SESSION['period_end']).'
</a></li>
</ul>

View File

@ -4,17 +4,18 @@ include_once __DIR__.'/../../core.php';
unset($_SESSION['superselect']['id_categoria']);
?><form action="" method="post" id="add-form">
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Inserisci il codice:'); ?>", "name": "codice", "required": 1 ]}
{[ "type": "text", "label": "<?php echo tr('Inserisci il codice:'); ?>", "name": "codice", "required": 1, "value": "<?php echo (htmlentities(filter('codice')) ? : ''); ?>" ]}
</div>
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Inserisci la descrizione:'); ?>", "name": "descrizione", "required": 1 ]}
{[ "type": "text", "label": "<?php echo tr('Inserisci la descrizione:'); ?>", "name": "descrizione", "required": 1, "value": "<?php echo (htmlentities(filter('descrizione')) ? : ''); ?>" ]}
</div>
<div class="col-md-6">

View File

@ -37,7 +37,7 @@ if (!empty($list)) {
}
echo '
<button type="button" class="btn btn-warning" '.((!extension_loaded('ssl') and strpos($element, 'p7m') !== false) ? 'disabled' : '').' onclick="download(this, \''.$element.'\')">
<button type="button" class="btn btn-warning" '.((!extension_loaded('openssl') AND substr(strtolower($element), -4) == '.p7m') ? 'disabled' : '').' onclick="download(this, \''.$element.'\')">
<i class="fa fa-download"></i> '.tr('Importa').'
</button>
</td>

View File

@ -37,7 +37,7 @@ echo '
<div class="row" >
<div class="col-md-6">
<h4>'.
$ragione_sociale.' '.((empty($idanagrafica = $dbo->fetchOne('SELECT idanagrafica FROM an_anagrafiche WHERE ( codice_fiscale = '.prepare($codice_fiscale).' AND codice_fiscale != \'\' ) OR ( piva = '.prepare($partita_iva).' AND piva != \'\' ) ')['idanagrafica'])) ? '<span class="badge badge-success" >'.tr('Nuova').'</span>' : '<small>'.Modules::link('Anagrafiche', $idanagrafica, '', null, '')).'</small>'.'<br>
$ragione_sociale.' '.((empty($idanagrafica = $dbo->fetchOne('SELECT idanagrafica FROM an_anagrafiche WHERE ( codice_fiscale = '.prepare($codice_fiscale).' AND codice_fiscale != \'\' ) OR ( piva = '.prepare($partita_iva).' AND piva != \'\' ) ')['idanagrafica'])) ? '<span class="badge badge-success" >'.tr('Nuova anagrafica').'</span>' : '<small>'.Modules::link('Anagrafiche', $idanagrafica, '', null, '')).'</small>'.'<br>
<small>
'.(!empty($codice_fiscale) ? (tr('Codice Fiscale').': '.$codice_fiscale.'<br>') : '').'
'.(!empty($partita_iva) ? (tr('Partita IVA').': '.$partita_iva.'<br>') : '').'
@ -224,7 +224,7 @@ if (!empty($righe)) {
{[ "type": "select", "name": "conto['.$key.']", "ajax-source": "conti-acquisti", "required": 1, "placeholder": "Conto acquisti" ]}
</td>
<td>
{[ "type": "select", "name": "articoli['.$key.']", "ajax-source": "articoli", "class": "", "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
{[ "type": "select", "name": "articoli['.$key.']", "ajax-source": "articoli", "class": "", "icon-after": "add|'.Modules::get('Articoli')['id'].'|codice='.htmlentities($riga['CodiceArticolo'][0]['CodiceValore']).'&descrizione='.htmlentities($riga['Descrizione']).'" ]}
</td>
</tr>';
}