fixes in sales invoice

This commit is contained in:
Nabin Hait 2013-02-01 16:03:50 +05:30
parent c40a64a634
commit 24c4bb5d6a
2 changed files with 11 additions and 11 deletions

View File

@ -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'):

View File

@ -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) {