1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 21:28:08 +01:00
Risoluzione di alcuni bug nei moduli Anagrafiche e Fatture, oltre che nella stampa dello Scadenziario.
This commit is contained in:
Thomas Zilio 2017-09-12 12:31:33 +02:00
parent 35580ca906
commit 7f0232a6a0
7 changed files with 13 additions and 47 deletions

View File

@ -155,7 +155,7 @@ $rs = $dbo->fetchArray('SELECT COUNT(id) AS tot FROM mg_prodotti WHERE id_artico
$tot_prodotti = $rs[0]['tot'];
// Visualizzazione di tutti i prodotti
$query = 'SELECT serial, created_at FROM mg_prodotti WHERE serial IS NOT NULL AND id_articolo='.prepare($id_record).(!empty($search_serial) ? ' AND serial LIKE '.prepare('%'.$search_serial.'%') : '').' GROUP BY serial ORDER BY created_at DESC, serial DESC, lotto DESC, altro DESC';
$query = 'SELECT id, serial, created_at FROM mg_prodotti WHERE serial IS NOT NULL AND id_articolo='.prepare($id_record).(!empty($search_serial) ? ' AND serial LIKE '.prepare('%'.$search_serial.'%') : '').' GROUP BY serial ORDER BY created_at DESC, serial DESC, lotto DESC, altro DESC';
$rs2 = $dbo->fetchArray($query);
echo '

View File

@ -37,16 +37,16 @@ if (!empty($rsddt)) {
<span>'.($key + 1).'</span>
</td>
<td>
'.Modules::link('Ddt di vendita', $rsddt[$i]['idddt'], $rsddt[$i]['numero_esterno']).'
'.Modules::link('Ddt di vendita', $r['idddt'], !empty($r['numero_esterno']) ? $r['numero_esterno'] : $r['numero']).'
</td>
<td>
<span>'.(!empty($rsddt[$i]['data']) ? Translator::dateToLocale($rsddt[$i]['data']) : '').'</span>
<span>'.(!empty($r['data']) ? Translator::dateToLocale($r['data']) : '').'</span>
</td>
<td>
<span>'.$rsddt[$i]['descrizione'].'</span>
<span>'.$r['descrizione'].'</span>
</td>
<td>
<span>'.Translator::numberToLocale($rsddt[$i]['qta']).' '.$rsddt[$i]['um'].'</span>
<span>'.Translator::numberToLocale($r['qta']).' '.$r['um'].'</span>
</td>
</tr>';
} ?>
@ -55,40 +55,6 @@ if (!empty($rsddt)) {
</tbody>
</table>
<script>
function attivaricerca (){
// Setup - add a text input to each footer cell
$('#tabella thead th').each( function () {
var title = $(this).text();
$(this).html( '<b>'+title+'</b><br><input type="text" class="filter form-control" placeholder="Filtra... '+title+'" />' );
});
table.columns.adjust().draw();
// Apply the search
table.columns().eq(0).each(function(colIdx) {
$('input', table.column(colIdx).header()).on('keyup change', function() {
table
.column(colIdx)
.search(this.value)
.draw();
});
$('input', table.column(colIdx).header()).on('click', function(e) {
e.stopPropagation();
});
});
}
$(document).ready(function() {
setTimeout(function(){
attivaricerca()
}, 1000);
});
</script>
<?php
} else {

View File

@ -385,7 +385,6 @@ switch (post('op')) {
$rs = $dbo->fetchArray($query);
$desc_iva = $rs[0]['descrizione'];
$subtot = $rsr[$i]['prezzo_vendita'] * $rsr[$i]['qta'];
$iva = ($subtot) / 100 * $rs[0]['percentuale'];
$iva_indetraibile = $iva / 100 * $rs[0]['indetraibile'];

View File

@ -7,11 +7,11 @@ include_once __DIR__.'/../../core.php';
<input type="hidden" name="backto" value="record-edit">
<div class="row">
<div class="col-md-2">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "" ]}
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Codice'); ?>", "name": "nome", "required": 1, "value": "" ]}
</div>
<div class="col-md-6">
<div class="col-md-8">
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1, "value": "" ]}
</div>
</div>

View File

@ -15,11 +15,11 @@ include_once __DIR__.'/../../core.php';
<div class="clearfix"></div>
<div class="row">
<div class="col-md-2">
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Codice') ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
</div>
<div class="col-md-6">
<div class="col-md-8">
{[ "type": "text", "label": "<?php echo tr('Descrizione') ?>", "name": "descrizione", "required": 1, "value": "$descrizione$" ]}
</div>
</div>

View File

@ -15,10 +15,10 @@ include_once $docroot.'/templates/pdfgen_variables.php';
*/
if (get('type') == 'clienti') {
$titolo = 'Scadenzario clienti';
$add_where = "AND an_tipianagrafiche.descrizione='Cliente'";
$add_where = "AND co_tipidocumento.dir='entrata'";
} elseif (get('type') == 'fornitori') {
$titolo = 'Scadenzario fornitori';
$add_where = "AND an_tipianagrafiche.descrizione='Fornitore'";
$add_where = "AND co_tipidocumento.dir='uscita'";
} else {
$titolo = 'Scadenzario';
$add_where = '';

View File

@ -805,6 +805,7 @@ OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Ddt di acquisto
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'MyImpianti') AND `name` = 'Data')
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Ordini cliente') AND `name` = 'Data')
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Movimenti') AND `name` = 'Data')
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Movimenti') AND `name` = 'Quantità')
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Prima nota') AND `name` = 'Dare')
OR (`id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Prima nota') AND `name` = 'Avere');