mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
Merge branch 'wsgi' of https://github.com/webnotes/erpnext into i18n
Conflicts: accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js public/js/complete_setup.js selling/doctype/opportunity/opportunity.js selling/doctype/quotation/quotation.js
This commit is contained in:
18
public/js/controllers/accounts.js
Normal file
18
public/js/controllers/accounts.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
// get tax rate
|
||||
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", "");
|
||||
} else if(d.account_head && d.charge_type!=="Actual") {
|
||||
wn.call({
|
||||
type:"GET",
|
||||
method: "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);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user