diff --git a/liberapay/constants.py b/liberapay/constants.py index abe6b59831..fc4b5da117 100644 --- a/liberapay/constants.py +++ b/liberapay/constants.py @@ -174,16 +174,16 @@ def with_vat(self): KYC_DOC_MAX_SIZE_MB = int(KYC_DOC_MAX_SIZE / 1000000) KYC_DOCS_EXTS = ['pdf', 'jpeg', 'jpg', 'gif', 'png'] KYC_DOCS_EXTS_STR = ', '.join(KYC_DOCS_EXTS) -KYC_INCOME_THRESHOLDS = ( +KYC_INCOME_THRESHOLDS = [(i, Money(a, 'EUR')) for i, a in ( (1, 18000), (2, 30000), (3, 50000), (4, 80000), (5, 120000), (6, 120000), -) -KYC_PAYIN_YEARLY_THRESHOLD = Decimal('2500') -KYC_PAYOUT_YEARLY_THRESHOLD = Decimal('1000') +)] +KYC_PAYIN_YEARLY_THRESHOLD = Money('2500', 'EUR') +KYC_PAYOUT_YEARLY_THRESHOLD = Money('1000', 'EUR') LAUNCH_TIME = datetime(2016, 2, 3, 12, 50, 0, 0, utc) diff --git a/templates/identity-form-2.html b/templates/identity-form-2.html index f233e30620..f30e1ff0ea 100644 --- a/templates/identity-form-2.html +++ b/templates/identity-form-2.html @@ -54,7 +54,6 @@ % set saved = account.IncomeRange % set prev_threshold = None % for i, threshold in constants.KYC_INCOME_THRESHOLDS - % set threshold = Money(threshold, 'EUR')
diff --git a/www/%username/wallet/payin/bankwire/%back_to.spt b/www/%username/wallet/payin/bankwire/%back_to.spt index cf275cec1f..729123f4fe 100644 --- a/www/%username/wallet/payin/bankwire/%back_to.spt +++ b/www/%username/wallet/payin/bankwire/%back_to.spt @@ -7,7 +7,7 @@ from mangopay.resources import BankWirePayIn from liberapay.billing.fees import upcharge_bank_wire from liberapay.billing.transactions import payin_bank_wire -from liberapay.constants import EVENTS, KYC_PAYIN_YEARLY_THRESHOLD, PAYIN_BANK_WIRE_MIN +from liberapay.constants import EVENTS, PAYIN_BANK_WIRE_MIN from liberapay.exceptions import InvalidNumber from liberapay.utils import b64decode_s, get_participant from liberapay.utils.i18n import Money @@ -60,7 +60,7 @@ if weekly > 0: min_weeks = (constants.PAYIN_BANK_WIRE_MIN[currency].amount / weekly).to_integral_value(ROUND_UP) max_weeks = min( max(constants.PAYIN_BANK_WIRE_TARGET[currency].amount // weekly, 52), - constants.KYC_PAYIN_YEARLY_THRESHOLD // weekly + constants.PAYIN_BANK_WIRE_MAX[currency].amount // weekly ) weeks_list = sorted(set((min_weeks, 4, 13, 26, 39, max_weeks))) weeks_list = [w for w in weeks_list if w >= min_weeks and w <= max_weeks] or [min_weeks] diff --git a/www/%username/wallet/payin/card/%back_to.spt b/www/%username/wallet/payin/card/%back_to.spt index 5a0bae1c56..ef067162f1 100644 --- a/www/%username/wallet/payin/card/%back_to.spt +++ b/www/%username/wallet/payin/card/%back_to.spt @@ -9,7 +9,7 @@ from liberapay.billing.fees import skim_amount, upcharge_card from liberapay.billing.transactions import ( charge, record_exchange_result, repr_error, ) -from liberapay.constants import FEE_PAYIN_CARD, PAYIN_CARD_MIN, KYC_PAYIN_YEARLY_THRESHOLD +from liberapay.constants import FEE_PAYIN_CARD, PAYIN_CARD_MIN from liberapay.exceptions import InvalidNumber, Redirect from liberapay.models.exchange_route import ExchangeRoute from liberapay.utils import b64decode_s, get_participant, is_card_expired diff --git a/www/%username/wallet/payin/direct-debit/%exchange_id.spt b/www/%username/wallet/payin/direct-debit/%exchange_id.spt index a8a186e064..2451b62e6b 100644 --- a/www/%username/wallet/payin/direct-debit/%exchange_id.spt +++ b/www/%username/wallet/payin/direct-debit/%exchange_id.spt @@ -10,9 +10,7 @@ from liberapay.billing.transactions import ( prepare_direct_debit, execute_direct_debit, record_exchange_result, repr_error, repr_exception, ) -from liberapay.constants import ( - FEE_PAYIN_DIRECT_DEBIT, PAYIN_DIRECT_DEBIT_MIN, KYC_PAYIN_YEARLY_THRESHOLD -) +from liberapay.constants import FEE_PAYIN_DIRECT_DEBIT, PAYIN_DIRECT_DEBIT_MIN from liberapay.exceptions import InvalidNumber from liberapay.models.exchange_route import ExchangeRoute from liberapay.utils import ( diff --git a/www/about/faq.spt b/www/about/faq.spt index 2821d389ca..d014e7e7d9 100644 --- a/www/about/faq.spt +++ b/www/about/faq.spt @@ -121,8 +121,8 @@ title = _("Frequently Asked Questions") "There are no restrictions on the total amount you can give or receive, " "but for legal reasons you will need to provide identity documents if " "you give more than {0}, or receive more than {1}, per year." - , Money(constants.KYC_PAYIN_YEARLY_THRESHOLD, 'EUR') - , Money(constants.KYC_PAYOUT_YEARLY_THRESHOLD, 'EUR') + , constants.KYC_PAYIN_YEARLY_THRESHOLD + , constants.KYC_PAYOUT_YEARLY_THRESHOLD ) }}