mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
xrange deprecated in python3, change to range
thanks to Sumit Bhardwaj for the hint
This commit is contained in:
@@ -129,7 +129,7 @@ def period_end(start_year, start_month, period_type):
|
||||
|
||||
|
||||
def generate_period_boundaries(start_year, start_month, period_type, periods):
|
||||
for i in xrange(periods):
|
||||
for i in range(periods):
|
||||
yield ( date(start_year, start_month, 1),
|
||||
period_end(start_year, start_month, period_type) )
|
||||
start_year, start_month = next_period_start(start_year, start_month,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
|
||||
|
||||
# Opens a GnuCash book file and adds an invoice to it for a particular
|
||||
# customer (by ID) with a specific ID and value
|
||||
# customer (by ID) with a specific ID and value
|
||||
# Optionally also adds a payment for the invoice as well
|
||||
#
|
||||
# The account tree and tax tables are assumed to be the same as the ones
|
||||
@@ -67,7 +67,7 @@ def gnc_numeric_from_decimal(decimal_value):
|
||||
numerator_place_value = 1
|
||||
# add each digit to the final value multiplied by the place value
|
||||
# from least significant to most sigificant
|
||||
for i in xrange(len(digits)-1,-1,-1):
|
||||
for i in range(len(digits)-1,-1,-1):
|
||||
numerator += digits[i] * numerator_place_value
|
||||
numerator_place_value *= TEN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user