mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-37359
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"api_details_section",
|
"api_details_section",
|
||||||
|
"disabled",
|
||||||
"service_provider",
|
"service_provider",
|
||||||
"api_endpoint",
|
"api_endpoint",
|
||||||
"access_key",
|
"access_key",
|
||||||
@@ -78,8 +79,6 @@
|
|||||||
"label": "Service Provider",
|
"label": "Service Provider",
|
||||||
"options": "frankfurter.app\nexchangerate.host\nCustom",
|
"options": "frankfurter.app\nexchangerate.host\nCustom",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@@ -92,17 +91,12 @@
|
|||||||
"fieldname": "access_key",
|
"fieldname": "access_key",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Access Key"
|
"label": "Access Key"
|
||||||
>>>>>>> 81591a34c2 (refactor: introduce access_key field)
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
<<<<<<< HEAD
|
|
||||||
"modified": "2022-01-10 15:51:14.521174",
|
|
||||||
=======
|
|
||||||
"modified": "2023-10-04 15:30:25.333860",
|
"modified": "2023-10-04 15:30:25.333860",
|
||||||
>>>>>>> 81591a34c2 (refactor: introduce access_key field)
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Currency Exchange Settings",
|
"name": "Currency Exchange Settings",
|
||||||
|
|||||||
@@ -51,7 +51,15 @@ frappe.ui.form.on("Journal Entry", {
|
|||||||
}, __('Make'));
|
}, __('Make'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
before_save: function(frm) {
|
||||||
|
if ((frm.doc.docstatus == 0) && (!frm.doc.is_system_generated)) {
|
||||||
|
let payment_entry_references = frm.doc.accounts.filter(elem => (elem.reference_type == "Payment Entry"));
|
||||||
|
if (payment_entry_references.length > 0) {
|
||||||
|
let rows = payment_entry_references.map(x => "#"+x.idx);
|
||||||
|
frappe.throw(__("Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.", [frappe.utils.comma_and(rows)]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
make_inter_company_journal_entry: function(frm) {
|
make_inter_company_journal_entry: function(frm) {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: __("Select Company"),
|
title: __("Select Company"),
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
|
|||||||
if entries:
|
if entries:
|
||||||
return flt(entries[0].exchange_rate)
|
return flt(entries[0].exchange_rate)
|
||||||
|
|
||||||
|
if frappe.get_cached_value(
|
||||||
|
"Currency Exchange Settings", "Currency Exchange Settings", "disabled"
|
||||||
|
):
|
||||||
|
return 0.00
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cache = frappe.cache()
|
cache = frappe.cache()
|
||||||
key = "currency_exchange_rate_{0}:{1}:{2}".format(transaction_date, from_currency, to_currency)
|
key = "currency_exchange_rate_{0}:{1}:{2}".format(transaction_date, from_currency, to_currency)
|
||||||
|
|||||||
Reference in New Issue
Block a user