Skip to content

Commit

Permalink
fix: payment entry exchange gain loss issue
Browse files Browse the repository at this point in the history
(cherry picked from commit 2dbef23)
  • Loading branch information
vishakhdesai authored and mergify[bot] committed Feb 28, 2025
1 parent bc53365 commit 3fb9033
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions erpnext/accounts/doctype/payment_entry/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ frappe.ui.form.on("Payment Entry", {
frappe.flags.allocate_payment_amount = true;
},

validate: async function (frm) {
await frm.events.set_exchange_gain_loss_deduction(frm);
},

validate_company: (frm) => {
if (!frm.doc.company) {
frappe.throw({ message: __("Please select a Company first."), title: __("Mandatory") });
Expand Down Expand Up @@ -1893,8 +1897,6 @@ function prompt_for_missing_account(frm, account) {
(values) => resolve(values?.[account]),
__("Please Specify Account")
);

dialog.on_hide = () => resolve("");
});
}

Expand Down

0 comments on commit 3fb9033

Please sign in to comment.