Hi. I am trying to extend the taxes_and_totals classes but its not working. I have used below code in my custom_taxes_and_totals.js file:
console.log("Custom Taxes and Totals Script Loaded..");
erpnext.taxes_and_totals = class CustomTaxesAndTotals extends (erpnext.taxes_and_totals){
calculate_net_total() {
console.log("Custom calculate_net_total method called.");
}
}
and in my custom app hooks.py i have added:
app_include_js = [
"/assets/eiccustom/js/custom_taxes_and_totals.js",
]
When loading Sales Invoice Page, “Custom Taxes and Totals Script Loaded…” this message is printed but override method calculate_net_total is not executing rather the main class calculate_net_total is executed.
Am i doing anything wrong?