fix: Backport missing commits to develop branch (#25305)

This commit is contained in:
Nabin Hait
2021-04-13 15:46:01 +05:30
committed by GitHub
parent 2fe3056fa2
commit 10c61376e3
65 changed files with 739 additions and 152 deletions

View File

@@ -175,7 +175,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 14:45:48.566756",
"modified": "2021-03-31 22:33:59.098532",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Additional Salary",

View File

@@ -147,7 +147,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 14:46:22.465521",
"modified": "2021-03-31 22:35:08.940087",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Employee Benefit Application",

View File

@@ -144,7 +144,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 15:51:51.489269",
"modified": "2021-03-31 22:37:21.024625",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Employee Benefit Claim",

View File

@@ -94,7 +94,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 14:48:00.919839",
"modified": "2021-03-31 22:38:20.332316",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Employee Incentive",

View File

@@ -119,7 +119,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 20:41:57.387749",
"modified": "2021-03-31 22:39:59.237361",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Employee Tax Exemption Declaration",

View File

@@ -142,7 +142,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 20:48:32.639885",
"modified": "2021-03-31 22:41:13.723339",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Employee Tax Exemption Proof Submission",

View File

@@ -104,7 +104,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 20:53:33.323712",
"modified": "2021-03-31 22:42:08.139520",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Income Tax Slab",

View File

@@ -567,6 +567,7 @@ def create_salary_slips_for_employees(employees, args, publish_progress=True):
if publish_progress:
frappe.publish_progress(count*100/len(set(employees) - set(salary_slips_exists_for)),
title = _("Creating Salary Slips..."))
else:
salary_slips_not_created.append(emp)

View File

@@ -105,7 +105,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 14:50:29.401020",
"modified": "2021-03-31 22:43:28.363644",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Retention Bonus",

View File

@@ -119,6 +119,7 @@ frappe.ui.form.on("Salary Slip", {
frm.set_df_property('exchange_rate', 'hidden', 1);
frm.set_df_property("exchange_rate", "description", "" );
}
}
}
},

View File

@@ -631,7 +631,7 @@
"idx": 9,
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 15:39:28.817166",
"modified": "2021-03-31 22:44:09.772331",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Slip",

View File

@@ -598,10 +598,10 @@ class SalarySlip(TransactionBase):
continue
if (
not d.additional_salary
and (not additional_salary or additional_salary.overwrite)
or additional_salary
and additional_salary.name == d.additional_salary
(not d.additional_salary
and (not additional_salary or additional_salary.overwrite))
or (additional_salary
and additional_salary.name == d.additional_salary)
):
component_row = d
break
@@ -611,7 +611,7 @@ class SalarySlip(TransactionBase):
self.set(component_type, [
d for d in self.get(component_type)
if d.salary_component != component_data.salary_component
or d.additional_salary and additional_salary.name != d.additional_salary
or (d.additional_salary and additional_salary.name != d.additional_salary)
or d == component_row
])

View File

@@ -312,7 +312,7 @@ class TestSalarySlip(unittest.TestCase):
frappe.db.sql("DELETE FROM `tabSalary Slip` where employee_name = 'test_ytd@salary.com'")
create_salary_slips_for_payroll_period(applicant, salary_structure.name,
payroll_period, deduct_random=False)
payroll_period, deduct_random=False, num=6)
salary_slips = frappe.get_all('Salary Slip', fields=['year_to_date', 'net_pay'], filters={'employee_name':
'test_ytd@salary.com'}, order_by = 'posting_date')

View File

@@ -164,7 +164,13 @@ def create_salary_structure_assignment(employee, salary_structure, from_date=Non
salary_structure_assignment.employee = employee
salary_structure_assignment.base = 50000
salary_structure_assignment.variable = 5000
salary_structure_assignment.from_date = from_date or add_days(nowdate(), -1)
if getdate(nowdate()).day == 1:
date = from_date or nowdate()
else:
date = from_date or add_days(nowdate(), -1)
salary_structure_assignment.from_date = date
salary_structure_assignment.salary_structure = salary_structure
salary_structure_assignment.currency = currency
salary_structure_assignment.payroll_payable_account = get_payable_account(company)

View File

@@ -145,7 +145,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-03-31 15:49:36.361253",
"modified": "2021-03-31 22:44:46.267974",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Salary Structure Assignment",

View File

@@ -8,7 +8,7 @@
"is_mandatory": 1,
"is_single": 0,
"is_skipped": 0,
"modified": "2020-06-01 11:53:54.553947",
"modified": "2020-06-29 11:53:54.553947",
"modified_by": "Administrator",
"name": "Create Payroll Period",
"owner": "Administrator",

View File

@@ -1,19 +1,19 @@
{
"action": "Go to Page",
"action": "Update Settings",
"creation": "2020-06-04 16:34:29.664917",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
"is_single": 0,
"is_single": 1,
"is_skipped": 0,
"modified": "2020-06-04 16:34:29.664917",
"modified": "2020-06-29 16:34:29.664917",
"modified_by": "Administrator",
"name": "Payroll Settings",
"owner": "Administrator",
"path": "#Form/Payroll Settings",
"reference_document": "Payroll Settings",
"show_full_form": 0,
"title": "Payroll Settings",
"validate_action": 1
"validate_action": 0
}