Merge pull request #16556 from nabinhait/payroll-cost-center
fix: Don't force fetch cost center from company in payroll entry
This commit is contained in:
commit
efff826e15
@ -95,6 +95,8 @@ frappe.ui.form.on('Payroll Entry', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setup: function (frm) {
|
setup: function (frm) {
|
||||||
|
frm.add_fetch('company', 'cost_center', 'cost_center');
|
||||||
|
|
||||||
frm.set_query("payment_account", function () {
|
frm.set_query("payment_account", function () {
|
||||||
var account_types = ["Bank", "Cash"];
|
var account_types = ["Bank", "Cash"];
|
||||||
return {
|
return {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@ -861,7 +862,8 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_from": "company.cost_center",
|
"default": ":Company",
|
||||||
|
"fetch_from": "",
|
||||||
"fieldname": "cost_center",
|
"fieldname": "cost_center",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1189,7 +1191,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-08-21 16:15:45.276711",
|
"modified": "2019-02-05 10:41:08.865842",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Payroll Entry",
|
"name": "Payroll Entry",
|
||||||
|
@ -21,6 +21,8 @@ class TestPayrollEntry(unittest.TestCase):
|
|||||||
make_earning_salary_component(setup=True)
|
make_earning_salary_component(setup=True)
|
||||||
make_deduction_salary_component(setup=True)
|
make_deduction_salary_component(setup=True)
|
||||||
|
|
||||||
|
frappe.db.set_value("HR Settings", None, "email_salary_slip_to_employee", 0)
|
||||||
|
|
||||||
def test_payroll_entry(self): # pylint: disable=no-self-use
|
def test_payroll_entry(self): # pylint: disable=no-self-use
|
||||||
company = erpnext.get_default_company()
|
company = erpnext.get_default_company()
|
||||||
for data in frappe.get_all('Salary Component', fields = ["name"]):
|
for data in frappe.get_all('Salary Component', fields = ["name"]):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user