mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
Convert INR to USD
This commit is contained in:
@@ -36,7 +36,14 @@ class Bounty(WebsiteGenerator):
|
||||
def validate(self):
|
||||
from frappe.utils.user import get_user_fullname
|
||||
|
||||
self.bounty_collected = sum([backer.amount for backer in self.bounty_backer if backer.paid])
|
||||
self.bounty_collected = 0.0
|
||||
for backer in self.bounty_backer:
|
||||
if backer.paid:
|
||||
amount = backer.amount
|
||||
if backer.currency == 'INR':
|
||||
amount = backer.amount / 65.00
|
||||
self.bounty_collected += amount
|
||||
|
||||
if not self.route:
|
||||
self.published = 1
|
||||
self.route = 'bounties/' + self.feature_name.lower().replace(' ', '-')
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
"label": "Amount",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "currency",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@@ -206,8 +207,8 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-08-25 18:41:22.187182",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2017-08-28 17:42:12.216221",
|
||||
"modified_by": "faris@erpnext.com",
|
||||
"module": "ERPNext Foundation",
|
||||
"name": "Bounty Backer",
|
||||
"name_case": "",
|
||||
|
||||
Reference in New Issue
Block a user