transaction.js: calculate only if one entry in table
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index c086aed..a1d9f38 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -38,7 +38,7 @@
onload_post_render: function() {
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();
}
if(frappe.meta.get_docfield(this.tname, "item_code")) {