Skip to content

Commit 60822ef

Browse files
authored
Fix README example and remove unused "import os" (#76)
The example code in the README no longer works with the latest version. A similar example in https://github.com/pretix/python-drafthorse/blob/master/tests/conftest.py exists, and uses a Decimal for doc.trade.settlement.monetary_summation.tax_total instead of a tuple. Change README example to do that as well. Also, remove an unused import ("import os"). Bug: #66
1 parent a62b2e8 commit 60822ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Parsing::
4949

5050
Generating::
5151

52-
import os
5352
from datetime import date, datetime, timezone
5453
from decimal import Decimal
5554

@@ -106,7 +105,7 @@ Generating::
106105
li.settlement.trade_tax.type_code = "VAT"
107106
li.settlement.trade_tax.category_code = "E"
108107
li.settlement.trade_tax.rate_applicable_percent = Decimal("0.00")
109-
li.settlement.monetary_summation.total_amount = (Decimal("999.00"), "EUR")
108+
li.settlement.monetary_summation.total_amount = Decimal("999.00")
110109
doc.trade.items.add(li)
111110

112111
trade_tax = ApplicableTradeTax()

0 commit comments

Comments
 (0)