Merge branch 'master' into develop
This commit is contained in:
commit
ab42fc006f
@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '7.2.5'
|
||||
__version__ = '7.2.6'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
@ -9,11 +9,13 @@
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
@ -30,6 +32,7 @@
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
@ -40,6 +43,7 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "budget_amount",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
@ -50,11 +54,13 @@
|
||||
"label": "Budget Amount",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
@ -72,7 +78,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-11 03:27:58.705376",
|
||||
"modified": "2017-01-02 17:02:53.339420",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Budget Account",
|
||||
|
@ -326,10 +326,12 @@ class JournalEntry(AccountsController):
|
||||
if d.account_currency == self.company_currency:
|
||||
d.exchange_rate = 1
|
||||
elif not d.exchange_rate or d.exchange_rate == 1 or \
|
||||
(d.reference_type in ("Sales Invoice", "Purchase Invoice") and d.reference_name and d.posting_date):
|
||||
(d.reference_type in ("Sales Invoice", "Purchase Invoice")
|
||||
and d.reference_name and self.posting_date):
|
||||
|
||||
# Modified to include the posting date for which to retreive the exchange rate
|
||||
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency, self.company,
|
||||
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
|
||||
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency,
|
||||
self.company, d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
|
||||
|
||||
if not d.exchange_rate:
|
||||
frappe.throw(_("Row {0}: Exchange Rate is mandatory").format(d.idx))
|
||||
|
@ -110,10 +110,14 @@ def apply_pricing_rule(args):
|
||||
item_list = args.get("items")
|
||||
args.pop("items")
|
||||
|
||||
set_serial_nos_based_on_fifo = frappe.db.get_single_value("Stock Settings",
|
||||
"automatically_set_serial_nos_based_on_fifo")
|
||||
|
||||
for item in item_list:
|
||||
args_copy = copy.deepcopy(args)
|
||||
args_copy.update(item)
|
||||
out.append(get_pricing_rule_for_item(args_copy))
|
||||
if set_serial_nos_based_on_fifo:
|
||||
out.append(get_serial_no_for_item(args_copy))
|
||||
return out
|
||||
|
||||
|
@ -217,7 +217,7 @@ class LeaveApplication(Document):
|
||||
|
||||
def validate_attendance(self):
|
||||
attendance = frappe.db.sql("""select name from `tabAttendance` where employee = %s and (att_date between %s and %s)
|
||||
and docstatus = 1""",
|
||||
and status = "Present" and docstatus = 1""",
|
||||
(self.employee, self.from_date, self.to_date))
|
||||
if attendance:
|
||||
frappe.throw(_("Attendance for employee {0} is already marked for this day").format(self.employee),
|
||||
|
@ -77,7 +77,7 @@ def send_via_gateway(arg):
|
||||
for d in arg.get('receiver_list'):
|
||||
args[ss.receiver_parameter] = d
|
||||
status = send_request(ss.sms_gateway_url, args)
|
||||
if status > 200 and status < 300:
|
||||
if status >= 200 and status < 300:
|
||||
success_list.append(d)
|
||||
|
||||
if len(success_list) > 0:
|
||||
|
@ -9,6 +9,7 @@ from frappe.utils.jinja import validate_template
|
||||
|
||||
class TermsandConditions(Document):
|
||||
def validate(self):
|
||||
if self.terms:
|
||||
validate_template(self.terms)
|
||||
|
||||
@frappe.whitelist()
|
||||
|
Loading…
Reference in New Issue
Block a user