hi i have this simple script
frappe.ui.form.on('Sales Invoice', {
customer: function(frm) {
if (frm.doc.customer) {
// Simulate setting a custom value
var custom_balance = 1000; // Replace this with any logic or value you want
frm.set_value('custom_party_balance', custom_balance);
console.log("Customer selected: " + frm.doc.customer + ", custom balance set: " + custom_balance);
}
}
});
The script works well, and I want to integrate it into my custom Frappe app. Where should I add the JavaScript file, and what should I edit in hooks.py?