Browse Source

fix currency conversion for paypal subscriptions

master
Alexandros Theodotou 6 months ago
parent
commit
654f67a9ba
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      locale/el/LC_MESSAGES/messages.po
  2. 2
      locale/fr/LC_MESSAGES/messages.po
  3. 2
      locale/messages.pot
  4. 6
      template.py

2
locale/el/LC_MESSAGES/messages.po

@ -17,8 +17,8 @@ msgstr "" @@ -17,8 +17,8 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.12-dev\n"
"Generated-By: Babel 2.6.0\n"
"X-Generator: Weblate 4.12-dev\n"
#: template.py:399
msgid "ZChordz maps the chords of a minor or major scale to white keys"

2
locale/fr/LC_MESSAGES/messages.po

@ -16,8 +16,8 @@ msgstr "" @@ -16,8 +16,8 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.12-dev\n"
"Generated-By: Babel 2.4.0\n"
"X-Generator: Weblate 4.12-dev\n"
#: template.py:399
msgid "ZChordz maps the chords of a minor or major scale to white keys"

2
locale/messages.pot

@ -8,7 +8,7 @@ msgid "" @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-03-25 09:49+0000\n"
"POT-Creation-Date: 2022-03-27 20:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

6
template.py

@ -226,7 +226,7 @@ if fetch_orders: @@ -226,7 +226,7 @@ if fetch_orders:
if 'fee_amound' in tx:
amount += float(tx['fee_amount']['value'])
if tx['transaction_amount']['currency_code'] == 'USD':
amount *= usd_to_gbp
amount = amount / currency_rates['USD']
if amount > 0:
print ('adding {} paypal subscription earnings'.format(amount))
monthly_earning += amount
@ -235,9 +235,9 @@ if fetch_orders: @@ -235,9 +235,9 @@ if fetch_orders:
if 'fee_amound' in tx:
amount += float(tx['fee_amount']['value'])
if tx['transaction_amount']['currency_code'] == 'USD':
amount *= usd_to_gbp
amount = amount / currency_rates['USD']
elif tx['transaction_amount']['currency_code'] == 'EUR':
amount *= eur_to_gbp
amount = amount / currency_rates['EUR']
if amount > 0:
print ('adding {} paypal custom donation earnings'.format(amount))
monthly_earning += amount

Loading…
Cancel
Save