Merge branch 'develop' of https://github.com/frappe/erpnext into rebrand-ui
This commit is contained in:
commit
3ebe511eb9
4
.github/helper/documentation.py
vendored
4
.github/helper/documentation.py
vendored
@ -21,8 +21,8 @@ def docs_link_exists(body):
|
|||||||
if word.startswith('http') and uri_validator(word):
|
if word.startswith('http') and uri_validator(word):
|
||||||
parsed_url = urlparse(word)
|
parsed_url = urlparse(word)
|
||||||
if parsed_url.netloc == "github.com":
|
if parsed_url.netloc == "github.com":
|
||||||
_, org, repo, _type, ref = parsed_url.path.split('/')
|
parts = parsed_url.path.split('/')
|
||||||
if org == "frappe" and repo in docs_repos:
|
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import g
|
|||||||
class AssetValueAdjustment(Document):
|
class AssetValueAdjustment(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_date()
|
self.validate_date()
|
||||||
self.set_difference_amount()
|
|
||||||
self.set_current_asset_value()
|
self.set_current_asset_value()
|
||||||
|
self.set_difference_amount()
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.make_depreciation_entry()
|
self.make_depreciation_entry()
|
||||||
@ -53,6 +53,7 @@ class AssetValueAdjustment(Document):
|
|||||||
je.posting_date = self.date
|
je.posting_date = self.date
|
||||||
je.company = self.company
|
je.company = self.company
|
||||||
je.remark = "Depreciation Entry against {0} worth {1}".format(self.asset, self.difference_amount)
|
je.remark = "Depreciation Entry against {0} worth {1}".format(self.asset, self.difference_amount)
|
||||||
|
je.finance_book = self.finance_book
|
||||||
|
|
||||||
credit_entry = {
|
credit_entry = {
|
||||||
"account": accumulated_depreciation_account,
|
"account": accumulated_depreciation_account,
|
||||||
|
@ -18,13 +18,18 @@ frappe.ui.form.on('Employee Advance', {
|
|||||||
if (!frm.doc.employee) {
|
if (!frm.doc.employee) {
|
||||||
frappe.msgprint(__("Please select employee first"));
|
frappe.msgprint(__("Please select employee first"));
|
||||||
}
|
}
|
||||||
var company_currency = erpnext.get_currency(frm.doc.company);
|
let company_currency = erpnext.get_currency(frm.doc.company);
|
||||||
|
let currencies = [company_currency];
|
||||||
|
if (frm.doc.currency && (frm.doc.currency != company_currency)) {
|
||||||
|
currencies.push(frm.doc.currency);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"root_type": "Asset",
|
"root_type": "Asset",
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"company": frm.doc.company,
|
"company": frm.doc.company,
|
||||||
"account_currency": ["in", [frm.doc.currency, company_currency]],
|
"account_currency": ["in", currencies],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -181,21 +186,23 @@ frappe.ui.form.on('Employee Advance', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
currency: function(frm) {
|
currency: function(frm) {
|
||||||
var from_currency = frm.doc.currency;
|
if (frm.doc.currency) {
|
||||||
var company_currency;
|
var from_currency = frm.doc.currency;
|
||||||
if (!frm.doc.company) {
|
var company_currency;
|
||||||
company_currency = erpnext.get_currency(frappe.defaults.get_default("Company"));
|
if (!frm.doc.company) {
|
||||||
} else {
|
company_currency = erpnext.get_currency(frappe.defaults.get_default("Company"));
|
||||||
company_currency = erpnext.get_currency(frm.doc.company);
|
} else {
|
||||||
|
company_currency = erpnext.get_currency(frm.doc.company);
|
||||||
|
}
|
||||||
|
if (from_currency != company_currency) {
|
||||||
|
frm.events.set_exchange_rate(frm, from_currency, company_currency);
|
||||||
|
} else {
|
||||||
|
frm.set_value("exchange_rate", 1.0);
|
||||||
|
frm.set_df_property('exchange_rate', 'hidden', 1);
|
||||||
|
frm.set_df_property("exchange_rate", "description", "" );
|
||||||
|
}
|
||||||
|
frm.refresh_fields();
|
||||||
}
|
}
|
||||||
if (from_currency != company_currency) {
|
|
||||||
frm.events.set_exchange_rate(frm, from_currency, company_currency);
|
|
||||||
} else {
|
|
||||||
frm.set_value("exchange_rate", 1.0);
|
|
||||||
frm.set_df_property('exchange_rate', 'hidden', 1);
|
|
||||||
frm.set_df_property("exchange_rate", "description", "" );
|
|
||||||
}
|
|
||||||
frm.refresh_fields();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
set_exchange_rate: function(frm, from_currency, company_currency) {
|
set_exchange_rate: function(frm, from_currency, company_currency) {
|
||||||
|
@ -59,7 +59,7 @@ class Member(Document):
|
|||||||
frappe.msgprint(_("A customer is already linked to this Member"))
|
frappe.msgprint(_("A customer is already linked to this Member"))
|
||||||
cust = create_customer(frappe._dict({
|
cust = create_customer(frappe._dict({
|
||||||
'fullname': self.member_name,
|
'fullname': self.member_name,
|
||||||
'email': self.email_id or self.user,
|
'email': self.email_id or self.email,
|
||||||
'phone': None
|
'phone': None
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
@ -12,14 +12,6 @@ frappe.ui.form.on('Additional Salary', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!frm.doc.currency) return;
|
|
||||||
frm.set_query("salary_component", function() {
|
|
||||||
return {
|
|
||||||
query: "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
|
||||||
filters: {currency: frm.doc.currency, company: frm.doc.company}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
employee: function(frm) {
|
employee: function(frm) {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"employee_benefits",
|
"employee_benefits",
|
||||||
"totals",
|
"totals",
|
||||||
"total_amount",
|
"total_amount",
|
||||||
|
"column_break",
|
||||||
"pro_rata_dispensed_amount"
|
"pro_rata_dispensed_amount"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -139,11 +140,15 @@
|
|||||||
"label": "Company",
|
"label": "Company",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-11-25 11:49:05.095101",
|
"modified": "2020-12-14 15:52:08.566418",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Payroll",
|
"module": "Payroll",
|
||||||
"name": "Employee Benefit Application",
|
"name": "Employee Benefit Application",
|
||||||
|
@ -11,11 +11,11 @@ frappe.ui.form.on('Employee Incentive', {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!frm.doc.currency) return;
|
if (!frm.doc.company) return;
|
||||||
frm.set_query("salary_component", function() {
|
frm.set_query("salary_component", function() {
|
||||||
return {
|
return {
|
||||||
query: "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
query: "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
||||||
filters: {type: "earning", currency: frm.doc.currency, company: frm.doc.company}
|
filters: {type: "earning", company: frm.doc.company}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4,9 +4,13 @@
|
|||||||
frappe.ui.form.on('Retention Bonus', {
|
frappe.ui.form.on('Retention Bonus', {
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_query("employee", function() {
|
frm.set_query("employee", function() {
|
||||||
|
if (!frm.doc.company) {
|
||||||
|
frappe.msgprint(__("Please Select Company First"));
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"status": "Active"
|
"status": "Active",
|
||||||
|
"company": frm.doc.company
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -55,17 +55,17 @@ frappe.ui.form.on('Salary Structure', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set_earning_deduction_component: function(frm) {
|
set_earning_deduction_component: function(frm) {
|
||||||
if(!frm.doc.currency && !frm.doc.company) return;
|
if(!frm.doc.company) return;
|
||||||
frm.set_query("salary_component", "earnings", function() {
|
frm.set_query("salary_component", "earnings", function() {
|
||||||
return {
|
return {
|
||||||
query : "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
query : "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
||||||
filters: {type: "earning", currency: frm.doc.currency, company: frm.doc.company}
|
filters: {type: "earning", company: frm.doc.company}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
frm.set_query("salary_component", "deductions", function() {
|
frm.set_query("salary_component", "deductions", function() {
|
||||||
return {
|
return {
|
||||||
query : "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
query : "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
||||||
filters: {type: "deduction", currency: frm.doc.currency, company: frm.doc.company}
|
filters: {type: "deduction", company: frm.doc.company}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -74,7 +74,6 @@ frappe.ui.form.on('Salary Structure', {
|
|||||||
currency: function(frm) {
|
currency: function(frm) {
|
||||||
calculate_totals(frm.doc);
|
calculate_totals(frm.doc);
|
||||||
frm.trigger("set_dynamic_labels")
|
frm.trigger("set_dynamic_labels")
|
||||||
frm.trigger('set_earning_deduction_component');
|
|
||||||
frm.refresh()
|
frm.refresh()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ def get_employees(salary_structure):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@frappe.validate_and_sanitize_search_inputs
|
@frappe.validate_and_sanitize_search_inputs
|
||||||
def get_earning_deduction_components(doctype, txt, searchfield, start, page_len, filters):
|
def get_earning_deduction_components(doctype, txt, searchfield, start, page_len, filters):
|
||||||
if len(filters) < 3:
|
if len(filters) < 2:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
|
@ -12,6 +12,9 @@ erpnext.setup_auto_gst_taxation = (doctype) => {
|
|||||||
tax_category: function(frm) {
|
tax_category: function(frm) {
|
||||||
frm.trigger('get_tax_template');
|
frm.trigger('get_tax_template');
|
||||||
},
|
},
|
||||||
|
customer_address: function(frm) {
|
||||||
|
frm.trigger('get_tax_template');
|
||||||
|
},
|
||||||
get_tax_template: function(frm) {
|
get_tax_template: function(frm) {
|
||||||
if (!frm.doc.company) return;
|
if (!frm.doc.company) return;
|
||||||
|
|
||||||
|
@ -151,6 +151,7 @@ class Gstr1Report(object):
|
|||||||
{select_columns}
|
{select_columns}
|
||||||
from `tab{doctype}`
|
from `tab{doctype}`
|
||||||
where docstatus = 1 {where_conditions}
|
where docstatus = 1 {where_conditions}
|
||||||
|
and is_opening = 'No'
|
||||||
order by posting_date desc
|
order by posting_date desc
|
||||||
""".format(select_columns=self.select_columns, doctype=self.doctype,
|
""".format(select_columns=self.select_columns, doctype=self.doctype,
|
||||||
where_conditions=conditions), self.filters, as_dict=1)
|
where_conditions=conditions), self.filters, as_dict=1)
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestVoiceCallSettings(unittest.TestCase):
|
||||||
|
pass
|
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Voice Call Settings', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
@ -0,0 +1,124 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:user",
|
||||||
|
"creation": "2020-12-08 16:52:40.590146",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"user",
|
||||||
|
"call_receiving_device",
|
||||||
|
"column_break_3",
|
||||||
|
"greeting_message",
|
||||||
|
"agent_busy_message",
|
||||||
|
"agent_unavailable_message"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "User",
|
||||||
|
"options": "User",
|
||||||
|
"permlevel": 1,
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "greeting_message",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Greeting Message"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "agent_busy_message",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Agent Busy Message"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "agent_unavailable_message",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Agent Unavailable Message"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "Computer",
|
||||||
|
"fieldname": "call_receiving_device",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Call Receiving Device",
|
||||||
|
"options": "Computer\nPhone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2020-12-14 18:49:34.600194",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Telephony",
|
||||||
|
"name": "Voice Call Settings",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "All",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"permlevel": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"permlevel": 2,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"permlevel": 2,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "All",
|
||||||
|
"share": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class VoiceCallSettings(Document):
|
||||||
|
pass
|
Loading…
x
Reference in New Issue
Block a user