Skip to content

Payroll Entry with 0 Net Pay Creates Unlinked Journal Entry #3972

@elshafei-developer

Description

@elshafei-developer

Information about bug

When creating a Payroll Entry for an employee where the Net Pay is 0 (for example, due to Employee Advance, deductions, or other withholdings), the system allows the Payroll Entry to be submitted and posted without errors.

However, the generated Journal Entry does not include the Payroll Payable account, which causes the Journal Entry to remain unlinked to the corresponding Payroll Entry.

As a consequence:

  • Cancelling the Payroll Entry does not cancel the related Journal Entry.
  • On subsequent payroll runs for the same employee and the same payroll date, deductions (such as Employee Advance) are applied again.
  • This results in accounting inconsistencies and eventually triggers validation errors, such as: Return amount cannot be greater than unclaimed amount.
Image

This behavior leads to data integrity issues between Payroll Entry, Journal Entry, and Employee Advance records, specifically when the Net Pay equals zero.

Module

Payroll

Version

Frappe v15 and v16
ERPNext v15 and v16
HRMS v15 and v16

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions