mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
latex_invoices.py: write takes string not bytes
write() fails if you give it bytes, so don't encode
This commit is contained in:
parent
ba4852a9da
commit
3ed6b4dab9
@ -160,7 +160,7 @@ def invoice_to_lco(invoice):
|
|||||||
n = ent.GetQuantity()
|
n = ent.GetQuantity()
|
||||||
|
|
||||||
uprice = locale.currency(price).rstrip(" EUR")
|
uprice = locale.currency(price).rstrip(" EUR")
|
||||||
un = unicode(
|
un = str(
|
||||||
int(float(n.num()) / n.denom())
|
int(float(n.num()) / n.denom())
|
||||||
) # choose best way to format numbers according to locale
|
) # choose best way to format numbers according to locale
|
||||||
|
|
||||||
@ -288,7 +288,6 @@ def main(argv=None):
|
|||||||
|
|
||||||
# Opening output file
|
# Opening output file
|
||||||
f = open(output_file_name, "w")
|
f = open(output_file_name, "w")
|
||||||
lco_str = lco_str.encode("latin1")
|
|
||||||
f.write(lco_str)
|
f.write(lco_str)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user