gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Thu Apr 1 12:08:10 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/fc848ec3 (commit)
via https://github.com/Gnucash/gnucash/commit/506fd579 (commit)
from https://github.com/Gnucash/gnucash/commit/4e8b0f85 (commit)
commit fc848ec3c3be5f9b9495a6a64e4efca5c1cc04ab
Merge: 4e8b0f852 506fd5798
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Apr 1 09:07:47 2021 -0700
Merge Koldavi's 'fix-to_str' into maint.
commit 506fd57989dcb3750f7c1d153bc8220168d5676d
Author: koldavi <81752579+koldavi at users.noreply.github.com>
Date: Thu Apr 1 13:26:15 2021 +0200
Fix to_string_with_decimal_point_placed
>>> nominator='123456'
A digit is missing in the string returned from to_string_with_decimal_point_placed. The -1 error.
>>> point_place=2
>>> nominator[:-point_place - 1], nominator[-point_place:]
('123', '56')
diff --git a/bindings/python/example_scripts/export_account_totals.py b/bindings/python/example_scripts/export_account_totals.py
index b44322cfd..66a142596 100644
--- a/bindings/python/example_scripts/export_account_totals.py
+++ b/bindings/python/example_scripts/export_account_totals.py
@@ -52,7 +52,7 @@ def to_string_with_decimal_point_placed(number: GncNumeric):
if len(nominator) <= point_place: # prepending zeros if the nominator is too short
nominator = '0' * (point_place - len(nominator)) + nominator
- return '.'.join([nominator[:-point_place - 1], nominator[-point_place:]])
+ return '.'.join([nominator[:-point_place], nominator[-point_place:]])
if __name__ == '__main__':
Summary of changes:
bindings/python/example_scripts/export_account_totals.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the gnucash-changes
mailing list