Skip to content

Loan Deduction Repeated in Payroll when Loan Repayment Entry is Missing #1303

Description

@magedbjn

Information about bug

We are facing an issue in the Lending app loan deduction through Salary Slip.

Scenario:

A loan is configured with monthly repayment from salary, for example:

Loan Amount: 1,500
Monthly Repayment: 300
Repayment Period: 5 months
Repay From Salary: Enabled

The expected behavior is that the system deducts 300 from each monthly Salary Slip and creates/links the related Loan Repayment Entry.

Issue Observed:

In one monthly Salary Slip, the loan amount was deducted from the employee salary, but the loan_repayment_entry field in the Salary Slip Loan row remained blank.

As a result, the system treated that installment as unpaid and deducted it again in the next month, causing the next Salary Slip to deduct 600 instead of 300.

SQL Query Used

select
ss.name,
ss.docstatus,
ss.start_date,
ss.end_date,
ss.posting_date,
ssl_row.loan,
ssl_row.total_payment,
ssl_row.loan_repayment_entry
from tabSalary Slip ss
join tabSalary Slip Loan ssl_row
on ssl_row.parent = ss.name
where ssl_row.loan = 'ACC-LOAN-2026-00003'
and ss.employee = 'HR-EMP-10001'
order by ss.start_date
Image

Concern:

The Salary Slip shows that the loan amount was deducted, but Lending does not consider the installment paid if the Loan Repayment Entry is not created/linked.

Please investigate this issue in the Lending loan repayment integration with Salary Slip.

We are not requesting any direct modification to HRMS core. The concern is related to the Lending app behavior/integration.

Loan Repayment Schedule
Image

Module

Loan Management

Version

Frappe Framework: v15.113.1 (HEAD)
ERPNext: v15.114.0 (HEAD)
Frappe HR: v15.62.0 (HEAD)
Frappe Lending: v0.0.1 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions