mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 07:02:54 +00:00
-webnotes +frappe 💥
This commit is contained in:
@@ -4,14 +4,14 @@ cur_frm.cscript.account_head = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
if(!d.charge_type && d.account_head){
|
||||
msgprint("Please select Charge Type first");
|
||||
wn.model.set_value(cdt, cdn, "account_head", "");
|
||||
frappe.model.set_value(cdt, cdn, "account_head", "");
|
||||
} else if(d.account_head && d.charge_type!=="Actual") {
|
||||
wn.call({
|
||||
frappe.call({
|
||||
type:"GET",
|
||||
method: "erpnext.controllers.accounts_controller.get_tax_rate",
|
||||
args: {"account_head":d.account_head},
|
||||
callback: function(r) {
|
||||
wn.model.set_value(cdt, cdn, "rate", r.message || 0);
|
||||
frappe.model.set_value(cdt, cdn, "rate", r.message || 0);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user