* fix: salary payment based on payments * fix: bank remittance report * fix: Payroll period onboarding * fix: provident-fund-deductions report * fix: Considered unmarked days * fix: onboarding paYroll * feat: quick entry in payroll entry (cherry picked from commit c2523e845340addec214ea36e42992ba89d9b210) Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
This commit is contained in:
parent
c312b3af13
commit
9cba6bddde
@ -53,7 +53,7 @@
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-06-22 20:12:32.684189",
|
||||
"modified": "2020-06-29 17:17:12.689089",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Payroll",
|
||||
"name": "Payroll Period",
|
||||
@ -96,6 +96,7 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
|
@ -207,7 +207,7 @@ class SalarySlip(TransactionBase):
|
||||
frappe.throw(_("There are more holidays than working days this month."))
|
||||
|
||||
if not payroll_based_on:
|
||||
frappe.throw(_("Please set Payroll based on in HR settings"))
|
||||
frappe.throw(_("Please set Payroll based on in Payroll settings"))
|
||||
|
||||
if payroll_based_on == "Attendance":
|
||||
actual_lwp, absent = self.calculate_lwp_and_absent_days_based_on_attendance(holidays)
|
||||
@ -244,15 +244,13 @@ class SalarySlip(TransactionBase):
|
||||
for holiday in holidays:
|
||||
if not frappe.db.exists("Attendance", {"employee": self.employee, "attendance_date": holiday, "docstatus": 1 }):
|
||||
self.payment_days += 1
|
||||
|
||||
|
||||
else:
|
||||
self.payment_days = 0
|
||||
|
||||
def get_unmarked_days(self):
|
||||
marked_days = frappe.get_all("Attendance", filters = {
|
||||
"attendance_date": ["between", ['2020-05-1',"2020-05-30"]],
|
||||
"employee": 'HR-EMP-00003',
|
||||
"attendance_date": ["between", [self.start_date, self.end_date]],
|
||||
"employee": self.employee,
|
||||
"docstatus": 1
|
||||
}, fields = ["COUNT(*) as marked_days"])[0].marked_days
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources/payroll-entry",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
"modified": "2020-06-04 16:35:30.650792",
|
||||
"modified": "2020-06-29 17:00:25.113341",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Payroll",
|
||||
"name": "Payroll",
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
}
|
@ -152,6 +152,9 @@ def set_company_account(payment_accounts, payroll_entries):
|
||||
company_accounts_map[acc.account] = acc
|
||||
|
||||
for entry in payroll_entries:
|
||||
entry["company_account"] = company_accounts_map[entry.payment_account]['bank_account_no']
|
||||
company_account = ''
|
||||
if entry.payment_account in company_accounts_map:
|
||||
company_account = company_accounts_map[entry.payment_account]['bank_account_no']
|
||||
entry["company_account"] = company_account
|
||||
|
||||
return payroll_entries
|
||||
|
@ -100,6 +100,8 @@ def get_data(filters, mode_of_payments):
|
||||
total_row = get_total_based_on_mode_of_payment(data, mode_of_payments)
|
||||
total_deductions = gross_pay - total_row.get("total")
|
||||
|
||||
report_summary = []
|
||||
|
||||
if data:
|
||||
data.append(total_row)
|
||||
data.append({})
|
||||
|
@ -97,7 +97,7 @@ def prepare_data(entry,component_type_dict):
|
||||
"employee": d.employee,
|
||||
"employee_name": d.employee_name,
|
||||
"pf_account": employee_account_dict.get(d.employee),
|
||||
"component_type": d.amount
|
||||
component_type: d.amount
|
||||
})
|
||||
|
||||
return data_list
|
||||
|
Loading…
x
Reference in New Issue
Block a user