mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Visualizzo i codici degli articoli in fase di import fe
Collegamento alla scheda anagrafica del fornitore
This commit is contained in:
@@ -37,7 +37,7 @@ if (!empty($list)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<button type="button" class="btn btn-warning" onclick="download(this, \''.$element.'\')">
|
<button type="button" class="btn btn-warning" '.((!extension_loaded('ssl') and strpos($element, 'p7m') !== false) ? 'disabled':'').' onclick="download(this, \''.$element.'\')">
|
||||||
<i class="fa fa-download"></i> '.tr('Importa').'
|
<i class="fa fa-download"></i> '.tr('Importa').'
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -37,7 +37,7 @@ echo '
|
|||||||
<div class="row" >
|
<div class="row" >
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h4>'.
|
<h4>'.
|
||||||
$ragione_sociale.'<br>
|
$ragione_sociale.' '.( (empty($idanagrafica = $dbo->fetchOne('SELECT idanagrafica FROM an_anagrafiche WHERE codice_fiscale = '.prepare($codice_fiscale).' OR piva='.prepare($partita_iva))['idanagrafica'])) ? '<span class="badge badge-success" >'.tr('Nuova').'</span>' : '<small>'.Modules::link('Anagrafiche', $idanagrafica, '', null, '')).'</small>'.'<br>
|
||||||
<small>
|
<small>
|
||||||
'.(!empty($codice_fiscale) ? (tr('Codice Fiscale').': '.$codice_fiscale.'<br>') : '').'
|
'.(!empty($codice_fiscale) ? (tr('Codice Fiscale').': '.$codice_fiscale.'<br>') : '').'
|
||||||
'.(!empty($partita_iva) ? (tr('Partita IVA').': '.$partita_iva.'<br>') : '').'
|
'.(!empty($partita_iva) ? (tr('Partita IVA').': '.$partita_iva.'<br>') : '').'
|
||||||
@@ -169,17 +169,47 @@ if (!empty($righe)) {
|
|||||||
|
|
||||||
$query .= ' ORDER BY descrizione ASC';
|
$query .= ' ORDER BY descrizione ASC';
|
||||||
|
|
||||||
|
/*Visualizzo codici articoli*/
|
||||||
|
$codici_articoli = '';
|
||||||
|
|
||||||
|
//caso di un solo codice articolo
|
||||||
|
if (isset($riga['CodiceArticolo']) and empty($riga['CodiceArticolo'][0]['CodiceValore'])){
|
||||||
|
|
||||||
|
$riga['CodiceArticolo'][0]['CodiceValore'] = $riga['CodiceArticolo']['CodiceValore'];
|
||||||
|
$riga['CodiceArticolo'][0]['CodiceTipo'] = $riga['CodiceArticolo']['CodiceTipo'];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($riga['CodiceArticolo'] as $key => $item) {
|
||||||
|
foreach($item as $key => $name){
|
||||||
|
if($key == 'CodiceValore'){
|
||||||
|
if (!empty($item['CodiceValore'])){
|
||||||
|
$codici_articoli .= '<small>'.$item['CodiceValore'].' ('.$item['CodiceTipo'].')</small>';
|
||||||
|
|
||||||
|
if ( ($item['CodiceValore'] != end($riga['CodiceArticolo'][(count($riga['CodiceArticolo'])-1)])) AND (is_array($riga['CodiceArticolo'][1]))){
|
||||||
|
$codici_articoli .= ', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*###*/
|
||||||
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
'.$riga['Descrizione'].'<br>
|
'.$riga['Descrizione'].'<br>
|
||||||
|
|
||||||
|
'.(($codici_articoli!='') ? $codici_articoli.'<br>' : '').'
|
||||||
|
|
||||||
<small>'.tr('Q.tà: _QTA_ _UM_', [
|
<small>'.tr('Q.tà: _QTA_ _UM_', [
|
||||||
'_QTA_' => Translator::numberToLocale($riga['Quantita']),
|
'_QTA_' => Translator::numberToLocale($riga['Quantita']),
|
||||||
'_UM_' => $riga['UnitaMisura'],
|
'_UM_' => $riga['UnitaMisura'],
|
||||||
]).'</small><br>
|
]).'</small><br>
|
||||||
|
|
||||||
<small>'.tr('Aliquota IVA _VALUE_ _DESC_', [
|
<small>'.tr('Aliquota IVA: _VALUE_ _DESC_', [
|
||||||
'_VALUE_' => empty($riga['Natura']) ? numberFormat($riga['AliquotaIVA']).'%' : $riga['Natura'],
|
'_VALUE_' => empty($riga['Natura']) ? numberFormat($riga['AliquotaIVA']).'%' : $riga['Natura'],
|
||||||
'_DESC_' => $riga['RiferimentoNormativo'] ? ' - '.$riga['RiferimentoNormativo'] : '',
|
'_DESC_' => $riga['RiferimentoNormativo'] ? ' - '.$riga['RiferimentoNormativo'] : '',
|
||||||
]).'</small>
|
]).'</small>
|
||||||
|
Reference in New Issue
Block a user