Skip to content

Commit

Permalink
fix: only fetch check number on "pay" payment types (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
agritheory authored Dec 11, 2023
1 parent 818cb53 commit 1b6dd48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_run/public/js/custom/payment_entry_custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ frappe.ui.form.on('Payment Entry', {
})

function get_next_check_number(frm) {
if (!(frm.doc.bank_account || frm.doc.mode_of_payment)) {
if (!(frm.doc.bank_account || frm.doc.mode_of_payment) || frm.doc.payment_type != 'Pay') {
return
}
frappe.db.get_value('Bank Account', frm.doc.bank_account, 'check_number').then(r => {
Expand Down

0 comments on commit 1b6dd48

Please sign in to comment.