Skip to content

Commit

Permalink
Fix autofattura con aliquota N6
Browse files Browse the repository at this point in the history
  • Loading branch information
Pek5892 committed Oct 13, 2023
1 parent 1f6ea9e commit fb8e67e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/fatture/actions.php
Expand Up @@ -859,12 +859,14 @@
$imponibile = $database->table('co_righe_documenti')
->join('co_iva', 'co_iva.id', '=', 'co_righe_documenti.idiva')
->where('co_iva.codice_natura_fe', 'LIKE', 'N3%')
->orWhere('co_iva.codice_natura_fe', 'LIKE', 'N6%')
->where('co_righe_documenti.iddocumento', $fattura->id)
->sum('subtotale');

$sconto = $database->table('co_righe_documenti')
->join('co_iva', 'co_iva.id', '=', 'co_righe_documenti.idiva')
->where('co_iva.codice_natura_fe', 'LIKE', 'N3%')
->orWhere('co_iva.codice_natura_fe', 'LIKE', 'N6%')
->where('co_righe_documenti.iddocumento', $fattura->id)
->sum('sconto');

Expand Down

0 comments on commit fb8e67e

Please sign in to comment.