Add invoice with small amount in surcharge tax scenario
issue10617 review373141002
This commit is contained in:
1 parent
b6e5c0e49b
commit
2b4d7f4fde
2 files changed
+12
-3
No files matched your search
@@ -95,6 +95,14 @@ Create invoices::
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.total_amount
|
||||
Decimal('63.10')
|
||||
>>> invoice, = invoice.duplicate()
|
||||
>>> invoice.invoice_date = fiscalyear.start_date
|
||||
>>> line, = invoice.lines
|
||||
>>> line.quantity = 1
|
||||
>>> line.unit_price = Decimal('0.03')
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.total_amount
|
||||
Decimal('0.04')
|
||||
|
||||
Generate VAT Book::
|
||||
|
||||
@@ -109,15 +117,15 @@ Generate VAT Book::
|
||||
... report = Report('account.reporting.aeat.vat_book')
|
||||
... extension, content, _, name = report.execute(records)
|
||||
>>> len(records)
|
||||
2
|
||||
>>> tax_record, = [r for r in records if not r.surcharge_tax]
|
||||
3
|
||||
>>> tax_record = [r for r in records if not r.surcharge_tax][0]
|
||||
>>> tax_record.party == party
|
||||
True
|
||||
>>> tax_record.base_amount == Decimal('100.00')
|
||||
True
|
||||
>>> tax_record.tax_amount == Decimal('21.00')
|
||||
True
|
||||
>>> surcharge_tax_record, = [r for r in records if r.surcharge_tax]
|
||||
>>> surcharge_tax_record = [r for r in records if r.surcharge_tax][0]
|
||||
>>> surcharge_tax_record.party == surcharge_party
|
||||
True
|
||||
>>> surcharge_tax_record.base_amount == Decimal('50.00')
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
2020;1T;E;;F1;;;01/01/2020;;;1;;00000000T;;Party;;121,00;100,00;21,00;21,00;;;;;;;;
|
||||
2020;1T;E;;F1;;;01/01/2020;;;2;;00000001R;;Surcharge Party;;63,10;50,00;21,00;10,50;5,20;2,60;;;;;;
|
||||
2020;1T;E;;F1;;;01/01/2020;;;3;;00000001R;;Surcharge Party;;0,04;0,03;21,00;0,01;5,20;0,00;;;;;;
|
||||
|
Reference in new issue
Block a user