fixes in sales invoice
This commit is contained in:
parent
c40a64a634
commit
24c4bb5d6a
@ -650,15 +650,16 @@ class DocType(SellingController):
|
|||||||
|
|
||||||
# tax table gl entries
|
# tax table gl entries
|
||||||
for tax in self.doclist.get({"parentfield": "other_charges"}):
|
for tax in self.doclist.get({"parentfield": "other_charges"}):
|
||||||
gl_entries.append(
|
if flt(tax.tax_amount):
|
||||||
self.get_gl_dict({
|
gl_entries.append(
|
||||||
"account": tax.account_head,
|
self.get_gl_dict({
|
||||||
"against": self.doc.debit_to,
|
"account": tax.account_head,
|
||||||
"credit": flt(tax.tax_amount),
|
"against": self.doc.debit_to,
|
||||||
"remarks": self.doc.remarks,
|
"credit": flt(tax.tax_amount),
|
||||||
"cost_center": tax.cost_center_other_charges
|
"remarks": self.doc.remarks,
|
||||||
}, is_cancel)
|
"cost_center": tax.cost_center_other_charges
|
||||||
)
|
}, is_cancel)
|
||||||
|
)
|
||||||
|
|
||||||
# item gl entries
|
# item gl entries
|
||||||
for item in getlist(self.doclist, 'entries'):
|
for item in getlist(self.doclist, 'entries'):
|
||||||
|
@ -80,7 +80,6 @@ cur_frm.cscript.quotation_to = function(doc,cdt,cdn){
|
|||||||
// REFRESH
|
// REFRESH
|
||||||
// ===================================================================================
|
// ===================================================================================
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
|
|
||||||
cur_frm.clear_custom_buttons();
|
cur_frm.clear_custom_buttons();
|
||||||
|
|
||||||
if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
|
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);
|
'get_default_customer_address', '', callback);
|
||||||
if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']);
|
if(doc.customer) unhide_field(['customer_address','contact_person','territory', 'customer_group']);
|
||||||
cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
|
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) {
|
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user