jigneshpshah / greycube_helpmanual

Greycube Projects Help Manual
https://greycube.in
MIT License
9 stars 10 forks source link

feat: Track Loan Repayment as Paid on submit of salary slip #8

Open jigneshpshah opened 5 years ago

jigneshpshah commented 5 years ago

Salary Slip (on submit) > Salary Slip Loan > Loan Repayment Schedule (paid = true)

Match fields to update as Paid : Loan , Payment Date , Total Payment.

Loan > Repayment Schedule Table

image

Loan > Repayment Schedule (Form View) image

In Salary Slip > Salary Slip Loan (Table) add field Repayment Date from the Loan Repayment Schedule Table, this can be used as connecting key to match the installment

image

On submit of salary slip , match the Loan , Repayment Date, Total Payment field values to mark the loan installment as "paid" in the loan repayment schedule table.

Reload the Loan Doctype , to update the Total Amount (total_amount_paid) value = (Total Payment Column, paid = true) image

Salary Slip (on cancel ) > Salary Slip Loan > Loan Repayment Schedule (paid = false)

Reload the Loan Doctype , to update the Total Amount (total_amount_paid) field value = (Total Payment Column, paid = true)