Skip to content

Autofattura: interrompi la creazione senza righe IVA compatibili - #1936

Open
sajotrei wants to merge 1 commit into
devcode-it:masterfrom
sajotrei:codex/autofattura-no-compatible-vat-rows
Open

sajotrei wants to merge 1 commit into
devcode-it:masterfrom
sajotrei:codex/autofattura-no-compatible-vat-rows

Conversation

@sajotrei

Copy link
Copy Markdown
Contributor

Descrizione

Se nessuna riga della fattura di acquisto rientra nel filtro IVA della generazione automatica, il codice attuale prosegue con un importo a zero.

Aggiunge un controllo su $righe_fe->isEmpty(): mostra un messaggio che invita a verificare le aliquote IVA e interrompe l'azione prima di creare il documento.

Risolve #1935.

Tipologia

  • Bug fix

Verifica

  • php -l modules/fatture/actions.php: superato.
  • 22 controlli isolati sul blocco reale prima/dopo: casi senza righe compatibili fermati prima di Fattura::build(); percorsi compatibili, prezzi IVA inclusa/esclusa, sconto completo e segno della nota di credito mantengono lo stesso comportamento.
  • Le query di selezione sono eseguite su SQLite con dati inventati; ORM, scritture dei documenti e setter della riga sono sostituiti da doppi di test.
  • Collaudo OSM completo/MySQL non eseguito. Scansione DAST non eseguita: CLI HawkScan non disponibile.

La modifica è limitata a un file e 6 righe aggiunte, senza cambiare aliquote, filtri IVA o formule di calcolo.

@sajotrei
sajotrei marked this pull request as ready for review October 26, 2026 22:49
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T22:49:13.400481Z
We couldn’t complete this review. Comment @codex review to try again.
2227331 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant