Skip to content

Commit

Permalink
FIX: error when create WHT for Employee
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed Feb 8, 2024
1 parent 698d4cb commit d0e95a6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions thai_tax/public/js/payment_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ frappe.ui.form.on("Payment Entry", {
frm.doc.deductions.length > 0
) {
frm.add_custom_button(__("Create Withholding Tax Cert"), async function () {
let income_tax_form = (
await frappe.db.get_value(
frm.doc.party_type, frm.doc.party, "custom_default_income_tax_form"
)
).message.custom_default_income_tax_form;
let income_tax_form = "";
if (frm.doc.party_type == "Supplier") {
income_tax_form = (
await frappe.db.get_value(
frm.doc.party_type, frm.doc.party, "custom_default_income_tax_form"
)
).message.custom_default_income_tax_form;
}
const fields = [
{
fieldtype: "Link",
Expand Down

0 comments on commit d0e95a6

Please sign in to comment.