Fix del bug #115

This commit is contained in:
Thomas Zilio 2018-01-14 17:46:00 +01:00
parent 30227465c8
commit a2f425dd37
3 changed files with 16 additions and 10 deletions

View File

@ -284,6 +284,10 @@ switch (get('op')) {
$dbo->query('INSERT INTO co_righe2_contratti(idcontratto, descrizione, subtotale, um, qta) VALUES('.prepare($new_idcontratto).', '.prepare($rs[$i]['descrizione']).', '.prepare($rs[$i]['subtotale']).', '.prepare($rs[$i]['um']).', '.prepare($rs[$i]['qta']).')');
}
// Replicazione degli impianti
$impianti = $dbo->fetchArray('SELECT idimpianto FROM my_impianti_contratti WHERE idcontratto='.prepare($id_record));
$dbo->sync('my_impianti_contratti', ['idcontratto' => $new_idcontratto], ['idimpianto' => array_column($impianti, 'idimpianto')]);
$_SESSION['infos'][] = tr('Contratto rinnovato!');
redirect($rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$new_idcontratto);

View File

@ -16,7 +16,7 @@ $imponibile_art = 0.0;
$iva_art = 0.0;
echo '
<table class="table table-striped table-hover table-condensed">
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<th>'.tr('Descrizione').'</th>

View File

@ -9,15 +9,17 @@ $rs = $dbo->fetchArray("SELECT *, IFNULL((SELECT codice FROM mg_articoli WHERE i
echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<tr>
<th>'.tr('Descrizione').'</th>
<th width="120">'.tr('Q.').'</th>
<th width="80">'.tr('U.m.').'</th>
<th width="120">'.tr('Costo unitario').'</th>
<th width="120">'.tr('Iva').'</th>
<th width="120">'.tr('Imponibile').'</th>
<th width="60"></th>
</tr>
<thead>
<tr>
<th>'.tr('Descrizione').'</th>
<th width="120">'.tr('Q.').'</th>
<th width="80">'.tr('U.m.').'</th>
<th width="120">'.tr('Costo unitario').'</th>
<th width="120">'.tr('Iva').'</th>
<th width="120">'.tr('Imponibile').'</th>
<th width="60"></th>
</tr>
</thead>
<tbody class="sortable">';
if (!empty($rs)) {