Skip to content

Commit

Permalink
Merge pull request #39 from tschager/master
Browse files Browse the repository at this point in the history
allow more than one DatiRitenuta tag in DatiGeneraliDocumento
  • Loading branch information
spanezz authored Jan 3, 2024
2 parents 8a217b4 + a25d16a commit 3afcb44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion a38/fattura.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class DatiGeneraliDocumento(models.Model):
divisa = fields.StringField()
data = fields.DateField()
numero = fields.StringField(max_length=20)
dati_ritenuta = fields.ModelField(DatiRitenuta, null=True)
dati_ritenuta = fields.ModelListField(DatiRitenuta, null=True)
dati_bollo = fields.ModelField(DatiBollo, null=True)
dati_cassa_previdenziale = fields.ModelListField(DatiCassaPrevidenziale, null=True)
sconto_maggiorazione = fields.ModelListField(ScontoMaggiorazione, null=True)
Expand Down
12 changes: 12 additions & 0 deletions tests/data/dati_trasporto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
<Numero>1</Numero>
<ImportoTotaleDocumento>123.45</ImportoTotaleDocumento>
<Causale>Test Causale</Causale>
<DatiRitenuta>
<TipoRitenuta>RT04</TipoRitenuta>
<ImportoRitenuta>70.00</ImportoRitenuta>
<AliquotaRitenuta>1.00</AliquotaRitenuta>
<CausalePagamento>ZO</CausalePagamento>
</DatiRitenuta>
<DatiRitenuta>
<TipoRitenuta>RT02</TipoRitenuta>
<ImportoRitenuta>805.00</ImportoRitenuta>
<AliquotaRitenuta>11.50</AliquotaRitenuta>
<CausalePagamento>Q</CausalePagamento>
</DatiRitenuta>
</DatiGeneraliDocumento>
<DatiOrdineAcquisto>
<RiferimentoNumeroLinea>1</RiferimentoNumeroLinea>
Expand Down

0 comments on commit 3afcb44

Please sign in to comment.