Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] l10n_it_fatturapa_out: use parent codice_destinatario #4595

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

SylweKra
Copy link

@SylweKra SylweKra commented Feb 3, 2025

Fixed issue with the tests.
Superseeds #4436

@SylweKra SylweKra changed the title [14.0][FIX] l10n it fatturapa out [14.0][FIX] l10n_it_fatturapa_out Feb 3, 2025
@SylweKra SylweKra force-pushed the 14.0-FIX-l10n_it_fatturapa_out branch 3 times, most recently from c561e6e to f474a52 Compare February 5, 2025 09:30
Uses the parent codice_destinatario for each child
if the parent has set the flag l10n_it_use_parent_codice_destinatario.
@SylweKra SylweKra force-pushed the 14.0-FIX-l10n_it_fatturapa_out branch from f474a52 to 6d74e1b Compare February 5, 2025 10:42
@SylweKra SylweKra changed the title [14.0][FIX] l10n_it_fatturapa_out [14.0][FIX] l10n_it_fatturapa_out: use parent codice_destinatario Feb 5, 2025
@SylweKra
Copy link
Author

SylweKra commented Feb 5, 2025

La modifica dei test è stata fatta perché abbiamo implementato una funzionalità che prevede che se il contatto padre ha il flag "soggetto obbligato" abilitato e il contatto figlio non ce l'ha, quando si fattura al contatto figlio va utilizzato il codice destinatario del padre. Questo molto probabilmente ha portato ad un errore nei test perché nel modulo l10n_it_fatturapa_out i test non passavano a causa di un errore di confronto delle stringhe XML. L'errore riguardava la differenza nel CAP e nella Provincia nel confronto tra le stringhe xml della fattura di demo e la fattura generata. Per risolvere il problema, è stato necessario modificare i dati di test, in particolare il file XML di prova CHE114993395IVA_00007.xml. Questo file conteneva un CAP errato (era "00100" invece di "00000") e mancava il tag Provincia. Secondo le linee guida per la fatturazione elettronica estera (fonte: https://www.agenziaentrate.gov.it/portale/schede/comunicazioni/fatture-e-corrispettivi/faq-fe/risposte-alle-domande-piu-frequenti-categoria/fatture-verso-e-da-soggetti-stranieri-transfrontaliere#:~:text=Infine%2C%20per%20indicare%20in%20fattura,per%20indicare%20il%20CAP%20straniero), tutte le fatture per clienti esteri (sia UE che Extra UE) devono avere il CAP "00000" e il Codice Destinatario "XXXXXXX". Nel file di test, è stato quindi corretto il CAP e aggiunta la Provincia. Sebbene la Provincia non sia necessaria per le fatture estere, è stata inserita con la sigla "EE" per rispettare le convenzioni usate nei test, che richiedono la provincia per il confronto tra il file XML generato e quello di prova. Dopo queste modifiche, i test passavano correttamente in locale, ma non nella PR. Questo accadeva perché anche i dati di demo dei test nel modulo l10n_it_fatturapa_out_rc presentavano lo stesso problema: il CAP errato e la provincia assente per le aziende estere. È probabile che ci sia una dipendenza tra i due moduli, e che i dati di test nel modulo secondario non fossero stati aggiornati in modo coerente con la funzionalità implementata.

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.

[l10n_it_fatturapa_out] - usare codice destinatario del commercial partner
2 participants