Last active
August 29, 2015 14:01
-
-
Save nathando/1ba8890013464c26ad5c to your computer and use it in GitHub Desktop.
Sales Invoice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cur_frm.cscript.custom_refresh = function(doc, dt, dn) { | |
var sales_invoice = locals[dt][dn]; | |
var total_com = total_com_senior = 0; | |
cur_frm.set_value('sales_commission_value', -2); | |
wn.call({ | |
method: "accounts.doctype.sales_invoice.sales_invoice.get_sale_commission", | |
args: {}, | |
callback: function(r) { | |
console.log("Received value ", r); // Return {message:1"} | |
cur_frm.set_value('sales_commission_value', r.message); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@webnotes.whitelist() | |
def get_sale_commission(): | |
return 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment