hi there, turns out the code does work as is, to give the ability to make a journal entry for submitted salary slips. However, one must use the payroll entry to create the salary slips. Then once the payroll entry is submitted you have options of submitting salary slips (creates one journal entry for all salary slips) or to Make the journal entry for the actual payment (this is an aggregate one as well). Please note, the “Posting Date” of the Payroll Entry is used to find/locate the salary slips to submit (and create a journal entry from).
I believe we should be able to create non-aggregate (for each employee) journal entries for the payroll accruals when we submit the Salary Slip directly (currently not the case, we must use a Payroll Entry now). Perhaps we should use the code currently in the payroll_entry.py module to the modify the salary_slip.py file to allow for creating of these when each individual salary slip is submitted. Also it would be nice to use something other than the posting date to link the payroll entry and salary slips (add a reference field on the Salary Slip). By adding this more visible link we could put rules in place like: if the salary slip is connected to a payroll entry then one must use the payroll entry to submit the salary slips and an aggregate entry is created but if it is blank then a journal entry will be created for the individual salary slip.
I am willing to work on this plus also note some other work has already been done, by others, to create a payroll voucher which is similar to the payroll entry, which links the Payroll Voucher to Salary Slips