transaction.js: calculate only if one entry in table

This commit is contained in:
Anand Doshi 2014-06-03 14:12:49 +05:30
parent 9a0f6f5bb4
commit 221dec8cac

View File

@ -38,7 +38,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
onload_post_render: function() { onload_post_render: function() {
var me = this; var me = this;
if(this.frm.doc.__islocal && this.frm.doc.company && !this.frm.doc.is_pos) { if(this.frm.doc.__islocal && this.frm.doc.company && this.frm.doc[this.fname] && !this.frm.doc.is_pos) {
this.calculate_taxes_and_totals(); this.calculate_taxes_and_totals();
} }
if(frappe.meta.get_docfield(this.tname, "item_code")) { if(frappe.meta.get_docfield(this.tname, "item_code")) {