How to solve this
function calculate_payment_date(frm) {
frappe.call({
method: “frappe.client.get”,
args: {
doctype: “NG 02 Vendor Master”,
filters: {
name: frm.doc.vendor_name_database
}
},
callback: function(response) {
if(response.message) {
let vendor_master = response.message
let payment_date = new Date(frm.doc.date_of_invoice)
let credit_days = vendor_master.credit_period
}
}
})
}