1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-20 05:20:52 +01:00

Compare commits

...

3 Commits

Author SHA1 Message Date
valentina
9b3e6e5a6b fix: #1173 2024-10-07 16:36:32 +02:00
valentina
ccaf74c512 Gestione cassa previdenziale multipla in template di stampa 2024-10-07 16:27:30 +02:00
valentina
775f4e4ab7 Rimozione funzionalità deprecata 2024-10-07 15:33:28 +02:00
2 changed files with 20 additions and 21 deletions

View File

@ -126,18 +126,6 @@ $operations['ricerca-coordinate'] = [
],
];
// TODO: 06/08/2024 Correggere questa operazione e rimuovere da Beta
if (App::debug()) {
$operations['ricerca-coordinate-google'] = [
'text' => '<span><i class="fa fa-map"></i> '.tr('Ricerca coordinate (Google)').'</span> <span class="badge badge-danger">beta</span>',
'data' => [
'msg' => tr('Ricercare le coordinate per le anagrafiche selezionate senza latitudine e longitudine?'),
'button' => tr('Procedi'),
'class' => 'btn btn-lg btn-warning',
],
];
}
$operations['cambia-relazione'] = [
'text' => '<span><i class="fa fa-copy"></i> '.tr('Cambia relazione').'</span>',
'data' => [

View File

@ -44,7 +44,7 @@ $totale_imponibile = $totale_scontato + $rivalsa;
$totale_iva = 0;
foreach ($righe as $riga) {
$aliquota = $database->fetchOne('SELECT percentuale FROM co_iva WHERE id = '.prepare($riga->idiva))['percentuale'];
$totale_iva += $totale_imponibile * $aliquota / 100;
$totale_iva += $riga['iva'] + $riga['rivalsainps'] * $aliquota / 100;;
}
$totale = $totale_iva + $totale_imponibile;
@ -278,17 +278,22 @@ if ($show_sconto) {
* Rivalsa INPS | Totale (+ Rivalsa INPS)
*/
if ($has_rivalsa) {
$rs2 = $dbo->fetchOne('SELECT percentuale, descrizione FROM co_rivalse WHERE id=(SELECT idrivalsainps FROM co_righe_documenti WHERE iddocumento='.prepare($id_record).' AND idrivalsainps!=0)');
$rs2 = $dbo->fetchArray('SELECT percentuale, descrizione FROM co_rivalse WHERE id IN (SELECT idrivalsainps FROM co_righe_documenti WHERE iddocumento='.prepare($id_record).' AND idrivalsainps!=0)');
foreach ($rs2 as $rs) {
$descrizione .= '<p class="text-muted small-bold">'.$rs['descrizione'].'</p>';
}
echo '
<td class="cell-padded text-center">
'.moneyFormat($rivalsa, 2).'
<p class="text-muted small-bold">'.$rs2['descrizione'].'</p>
'.$descrizione.'
</td>
<td class="cell-padded text-center">
'.moneyFormat($totale_imponibile, $d_totali).'
</td>
</tr>';
} else if ($show_sconto) {
echo '
<td class="cell-padded text-center">
@ -326,10 +331,16 @@ echo '
<tr>
<td class="cell-padded text-center" colspan="'.$first_colspan.'">
'.moneyFormat($totale_iva, $d_totali).'
</td>
<td class="cell-padded text-center" colspan="'.$second_colspan.'">
'.moneyFormat($totale, $d_totali).'
</td>';
if ($has_ritenuta || $show_sconto || $has_rivalsa) {
echo'<td class="cell-padded text-center" colspan="'.$second_colspan.'">
'.moneyFormat($totale, $d_total);
} else {
echo'
<td class="cell-padded text-center" colspan="'.$second_colspan.'" style="background-color:#77dd77;">
<b>'.moneyFormat($totale, $d_total).'</b>';
}
echo'
</td>
</tr>';
@ -410,8 +421,8 @@ if ($has_ritenuta) {
$totale = $totale - ($ritenuta_acconto_totale + $ritenuta_contributi_totale);
echo '
<td class="cell-padded text-center" colspan="'.$second_colspan.'">
'.moneyFormat($totale, 2).'
<td class="cell-padded text-center" colspan="'.$second_colspan.'" style="background-color:#77dd77;">
<b>'.moneyFormat($totale, 2).'</b>
</td>
</tr>';
}