From 24c4bb5d6a6f08dff07e5cfd341cef0f98fc04fa Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 1 Feb 2013 16:03:50 +0530 Subject: [PATCH] fixes in sales invoice --- .../doctype/sales_invoice/sales_invoice.py | 19 ++++++++++--------- selling/doctype/quotation/quotation.js | 3 +-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py index 65f23f5be1..4c40525bb1 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.py +++ b/accounts/doctype/sales_invoice/sales_invoice.py @@ -650,15 +650,16 @@ class DocType(SellingController): # tax table gl entries for tax in self.doclist.get({"parentfield": "other_charges"}): - gl_entries.append( - self.get_gl_dict({ - "account": tax.account_head, - "against": self.doc.debit_to, - "credit": flt(tax.tax_amount), - "remarks": self.doc.remarks, - "cost_center": tax.cost_center_other_charges - }, is_cancel) - ) + if flt(tax.tax_amount): + gl_entries.append( + self.get_gl_dict({ + "account": tax.account_head, + "against": self.doc.debit_to, + "credit": flt(tax.tax_amount), + "remarks": self.doc.remarks, + "cost_center": tax.cost_center_other_charges + }, is_cancel) + ) # item gl entries for item in getlist(self.doclist, 'entries'): diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index 2112ac8702..a4d8ee6b0e 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -80,7 +80,6 @@ cur_frm.cscript.quotation_to = function(doc,cdt,cdn){ // REFRESH // =================================================================================== cur_frm.cscript.refresh = function(doc, cdt, cdn) { - cur_frm.clear_custom_buttons(); if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn); @@ -119,7 +118,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) { 'get_default_customer_address', '', callback); if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']); cur_frm.toggle_display("contact_section", doc.customer || doc.lead); - + console.log(doc.customer_group); } cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {