mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 17:34:47 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -56,23 +56,23 @@ class AccountsController(TransactionBase):
|
|||||||
def set_price_list_currency(self, buying_or_selling):
|
def set_price_list_currency(self, buying_or_selling):
|
||||||
company_currency = get_company_currency(self.doc.company)
|
company_currency = get_company_currency(self.doc.company)
|
||||||
fieldname = buying_or_selling.lower() + "_price_list"
|
fieldname = buying_or_selling.lower() + "_price_list"
|
||||||
|
|
||||||
# TODO - change this, since price list now has only one currency allowed
|
# TODO - change this, since price list now has only one currency allowed
|
||||||
if self.meta.get_field(fieldname) and self.doc.fields.get(fieldname) and \
|
if self.meta.get_field(fieldname) and self.doc.fields.get(fieldname):
|
||||||
not self.doc.price_list_currency:
|
if not self.doc.price_list_currency:
|
||||||
self.doc.fields.update(get_price_list_currency(self.doc.fields.get(fieldname)))
|
self.doc.fields.update(get_price_list_currency(self.doc.fields.get(fieldname)))
|
||||||
|
|
||||||
if self.doc.price_list_currency:
|
if self.doc.price_list_currency:
|
||||||
if not self.doc.plc_conversion_rate:
|
if self.doc.price_list_currency == company_currency:
|
||||||
if self.doc.price_list_currency == company_currency:
|
self.doc.plc_conversion_rate = 1.0
|
||||||
self.doc.plc_conversion_rate = 1.0
|
elif not self.doc.plc_conversion_rate:
|
||||||
else:
|
exchange = self.doc.price_list_currency + "-" + company_currency
|
||||||
exchange = self.doc.price_list_currency + "-" + company_currency
|
self.doc.plc_conversion_rate = flt(webnotes.conn.get_value("Currency Exchange",
|
||||||
self.doc.plc_conversion_rate = flt(webnotes.conn.get_value("Currency Exchange",
|
exchange, "exchange_rate"))
|
||||||
exchange, "exchange_rate"))
|
|
||||||
|
|
||||||
if not self.doc.currency:
|
if not self.doc.currency:
|
||||||
self.doc.currency = self.doc.price_list_currency
|
self.doc.currency = self.doc.price_list_currency
|
||||||
self.doc.conversion_rate = self.doc.plc_conversion_rate
|
self.doc.conversion_rate = self.doc.plc_conversion_rate
|
||||||
|
|
||||||
if self.meta.get_field("currency"):
|
if self.meta.get_field("currency"):
|
||||||
if self.doc.currency and self.doc.currency != company_currency:
|
if self.doc.currency and self.doc.currency != company_currency:
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ erpnext.toolbar.setup = function() {
|
|||||||
$user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
|
$user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
|
||||||
<i class="icon-fixed-width icon-quote-left"></i> '+wn._('Forum')+'</a></li>');
|
<i class="icon-fixed-width icon-quote-left"></i> '+wn._('Forum')+'</a></li>');
|
||||||
|
|
||||||
if(wn.boot.expires_on) {
|
if(wn.boot.expires_on || wn.boot.commercial_support) {
|
||||||
$user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
|
$user.append('<li>\
|
||||||
|
<a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
|
||||||
<i class="icon-fixed-width icon-comments"></i> '+wn._('Live Chat')+'</a></li>');
|
<i class="icon-fixed-width icon-comments"></i> '+wn._('Live Chat')+'</a></li>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ def boot_session(bootinfo):
|
|||||||
|
|
||||||
# load subscription info
|
# load subscription info
|
||||||
import conf
|
import conf
|
||||||
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']:
|
for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode',
|
||||||
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
|
'commercial_support']:
|
||||||
|
if hasattr(conf, key): bootinfo[key] = getattr(conf, key)
|
||||||
|
|
||||||
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
|
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
|
||||||
from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
|
from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
|
||||||
|
|||||||
Reference in New Issue
Block a user