mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 16:40:19 +00:00
Fixed merge conflict
This commit is contained in:
@@ -12,6 +12,33 @@
|
||||
"editable_grid": 0,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Date",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0,
|
||||
"width": "5"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -38,7 +65,8 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"unique": 0,
|
||||
"width": "3"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -51,8 +79,12 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
<<<<<<< HEAD
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 1,
|
||||
=======
|
||||
"in_list_view": 0,
|
||||
>>>>>>> 4a0c8400762adb857c8e929d3af56ba83d8c3f76
|
||||
"label": "To Currency",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
@@ -66,7 +98,8 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"unique": 0,
|
||||
"width": "3"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -94,7 +127,8 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"unique": 0,
|
||||
"width": "3"
|
||||
}
|
||||
],
|
||||
"hide_heading": 0,
|
||||
@@ -108,7 +142,11 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
<<<<<<< HEAD
|
||||
"modified": "2016-11-07 05:28:09.772560",
|
||||
=======
|
||||
"modified": "2016-09-05 22:47:38.746711",
|
||||
>>>>>>> 4a0c8400762adb857c8e929d3af56ba83d8c3f76
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Currency Exchange",
|
||||
@@ -202,5 +240,8 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "name",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -7,13 +7,15 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import get_datetime, get_datetime_str, formatdate
|
||||
|
||||
class CurrencyExchange(Document):
|
||||
def autoname(self):
|
||||
self.name = self.from_currency + "-" + self.to_currency
|
||||
def autoname(self):
|
||||
self.name = formatdate(get_datetime_str(self.date),"yyyy-MM-dd") + "-" + self.from_currency + "-" + self.to_currency
|
||||
#self.name = self.date + "-" + self.from_currency + "-" + self.to_currency
|
||||
|
||||
def validate(self):
|
||||
self.validate_value("exchange_rate", ">", 0)
|
||||
def validate(self):
|
||||
self.validate_value("exchange_rate", ">", 0)
|
||||
|
||||
if self.from_currency == self.to_currency:
|
||||
frappe.throw(_("From Currency and To Currency cannot be same"))
|
||||
if self.from_currency == self.to_currency:
|
||||
frappe.throw(_("From Currency and To Currency cannot be same"))
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Currency Exchange",
|
||||
"date": "01-01-2016",
|
||||
"exchange_rate": 60.0,
|
||||
"from_currency": "USD",
|
||||
"to_currency": "INR"
|
||||
},
|
||||
{
|
||||
"doctype": "Currency Exchange",
|
||||
"date": "01-01-2016",
|
||||
"exchange_rate": 0.773,
|
||||
"from_currency": "USD",
|
||||
"to_currency": "EUR"
|
||||
},
|
||||
{
|
||||
"doctype": "Currency Exchange",
|
||||
"date": "01-01-2016",
|
||||
"exchange_rate": 0.0167,
|
||||
"from_currency": "INR",
|
||||
"to_currency": "USD"
|
||||
|
||||
Reference in New Issue
Block a user