Skip to content

Commit

Permalink
FIX adattamento test per reference -> ref + payment_reference
Browse files Browse the repository at this point in the history
NOTA: commit da squashare nel commit di migrazione
  • Loading branch information
TheMule71 committed Jun 18, 2021
1 parent 3dbe483 commit c1a7809
Show file tree
Hide file tree
Showing 17 changed files with 113 additions and 28 deletions.
11 changes: 11 additions & 0 deletions l10n_it_fatturapa_in/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ def _compute_e_invoice_validation_error(self):
if error_message:
error_messages.append(error_message)

if bill.e_invoice_reference and bill.ref != bill.e_invoice_reference:
error_messages.append(
_(
"Vendor reference ({bill_vendor_ref}) "
"does not match with "
"e-bill vendor reference ({e_bill_vendor_ref})"
).format(
bill_vendor_ref=bill.ref or "",
e_bill_vendor_ref=bill.e_invoice_reference,
)
)
if (
bill.e_invoice_reference
and bill.payment_reference != bill.e_invoice_reference
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data> 2014-12-18 </Data>
<Numero>123</Numero>
<Numero>14311</Numero>
<Causale>LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS</Causale>
<Causale>SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB</Causale>
</DatiGeneraliDocumento>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT01234567890_FPR07.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<TipoDocumento>TD04</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-01-09</Data>
<Numero>123</Numero>
<Numero>14331</Numero>
</DatiGeneraliDocumento>
</DatiGenerali>
<DatiBeniServizi>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-01-09</Data>
<Numero>124</Numero>
<Numero>14401</Numero>
<DatiRitenuta>
<TipoRitenuta>RT02</TipoRitenuta>
<ImportoRitenuta>52.00</ImportoRitenuta>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT01234567890_FPR12.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-01-09</Data>
<Numero>124</Numero>
<Numero>14410</Numero>
<DatiRitenuta>
<TipoRitenuta>RT02</TipoRitenuta>
<ImportoRitenuta>54.00</ImportoRitenuta>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT01234567890_FPR15.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-09-30</Data>
<Numero>FPR 17/20</Numero>
<Numero>14481</Numero>
<ImportoTotaleDocumento>54313.50</ImportoTotaleDocumento>
</DatiGeneraliDocumento>
</DatiGenerali>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2014-12-18+01:00</Data>
<Numero>123</Numero>
<Numero>14221</Numero>
<DatiCassaPrevidenziale>
<TipoCassa>TC01</TipoCassa>
<AlCassa>4.00</AlCassa>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT05979361218_010.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2014-12-18</Data>
<Numero>129</Numero>
<Numero>14171</Numero>
<DatiRitenuta>
<TipoRitenuta>RT01</TipoRitenuta>
<ImportoRitenuta>1.00</ImportoRitenuta>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT05979361218_011.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2015-02-16</Data>
<Numero>FT/2015/0006</Numero>
<Numero>14021</Numero>
<DatiCassaPrevidenziale>
<TipoCassa>TC22</TipoCassa>
<AlCassa>0.00</AlCassa>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT05979361218_012.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2019-05-11</Data>
<Numero>852S1</Numero>
<Numero>14241</Numero>
<ImportoTotaleDocumento>34.32</ImportoTotaleDocumento>
<Causale>Rif ordine 908</Causale>
</DatiGeneraliDocumento>
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_fatturapa_in/tests/data/IT05979361218_015.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2019-05-11</Data>
<Numero>852S1</Numero>
<Numero>14261</Numero>
<ImportoTotaleDocumento>34.32</ImportoTotaleDocumento>
<Causale>Rif ordine 908</Causale>
</DatiGeneraliDocumento>
Expand Down Expand Up @@ -91,4 +91,4 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
</DatiRiepilogo>
</DatiBeniServizi>
</FatturaElettronicaBody>
</p:FatturaElettronica>
</p:FatturaElettronica>
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/tests/data/IT05979361218_016.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2019-05-11</Data>
<Numero>852S1</Numero>
<Numero>14461</Numero>
<ImportoTotaleDocumento>18.07</ImportoTotaleDocumento>
<Causale>Rif ordine 908</Causale>
</DatiGeneraliDocumento>
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_fatturapa_in/tests/data/IT05979361218_no_decl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2014-12-18</Data>
<Numero>123</Numero>
<Numero>14201</Numero>
<Causale>LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS</Causale>
<Causale>SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB</Causale>
</DatiGeneraliDocumento>
Expand Down Expand Up @@ -116,7 +116,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2014-12-20</Data>
<Numero>456</Numero>
<Numero>14202</Numero>
<Causale>LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS</Causale>
<Causale>SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB</Causale>
</DatiGeneraliDocumento>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-10-25</Data>
<Numero>001</Numero>
<Numero>14441</Numero>

<DatiRitenuta>
<TipoRitenuta>RT01</TipoRitenuta>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<TipoDocumento>TD01</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2020-10-25</Data>
<Numero>003</Numero>
<Numero>14031</Numero>

<DatiRitenuta>
<TipoRitenuta>RT01</TipoRitenuta>
Expand Down
Loading

0 comments on commit c1a7809

Please sign in to comment.