[V7] Query on further changes - Salary Slip, Salary Structure

Hi @rmehta,

Thank you for the update on version 7.

We understand the changes made to Salary Structure, the introduction of doctypes Salary Detail and Salary Component. However, we notice that on Salary Slip, the old way of Salary Slip Earning and Salary Slip Deduction remains.

We would like to check, if this will be consistent moving forward, especially with regard to Salary Slip. We currently have some customizations, between Salary Structure and Salary Slip, which needs to be edited, with regard to the current changes. Thus, we would like to check if there would be any more similar changes to Salary Slip, so that we can edit our customizations, to prepare for version 7.

Thank you.

All major changes are in, so you can start updating your customizations.

@rmehta Thanks a lot!

I am really unable to understand the new changes in the HR salary in V7 2 new tables have been introduced namely “Salary Component” and “Salary Detail” but the old tables are also there and this is kind of creating a confusion at my end as to what purpose the 2 new table serve.

I would like to understand as how the changes are being incorporated so that I could make my changes accordingly.

I thought that with the new tables old tables would be deleted namely:

Salary Component should have subsumed Salary Structure Earnings and Salary Structure Deductions tables and similarly Salary Detail should have subsumed Salary Slip Earnings and Salary Slip Deductions Table am I missing something since I don’t see these tables being deleted.

Those old table should be deleted automatically through patch and all the data should be copied to the new table Salary Detail.

The changes are:

  1. Salary Structure Earning / Salary Structure Deduction / Salary Slip Earning / Salary Slip Deduction → Salary Detail

  2. Earning Type / Deduction Type → Salary Component

Check the following patch to learn more about this renaming:
https://github.com/frappe/erpnext/blob/develop/erpnext/patches/v7_0/rename_salary_components.py

Hi Nabin,

I think these old tables are still in the DEVELOP branch of erpnext so it means that they are there in the user’s erpnext versions as well.

Check the links below:
Salary Structure Deduction Still Exists: https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/salary_structure_deduction

Salary Structure Earning Still Exists:
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/salary_structure_earning

Salary Slip Deduction Still Exists:
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/salary_slip_deduction

Salary Slip Earning Still Exists:
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/salary_slip_earning

Earning Type Still Exists:
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/earning_type

Deduction Type Still Exists:
https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/deduction_type

And also the 2 new tables Salary Component and Salary Detail are also existing which is creating a lot of confusion as to which tables the team plans to keep and which ones are to be removed.

Can you please help me understand or is it an oversight that these tables are still there as I am utterly confused.

1 Like

Thanks for pointing out those json files, I will delete those files from the repo in the next release. And I will write a new patch to delete those doctypes, if new doctypes already imported.

1 Like

So even if the tables are existing in my DB, I should disregard them, kind of confusing but I think I can manage.

1 Like

@nabinhait I have just noticed that the patch to rename tables to salary component does not copy the custom fields values (if any) in the old tables to the new table Salary Detail

In my DB the custom fields were showing in the Salary Details’ customize form view but were not created and also their values from the old table were not copied.

So I would suggest that you take caution before deleting the old tables from the database totally.

In my pull request (Delete old salary earning and deduction doctypes by nabinhait · Pull Request #5938 · frappe/erpnext · GitHub), it will create columns based on custom fields. But as multiple tables are merged into one, it is not possible to copy the data from old to new, please copy the values manually. Thanks again.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.