[minor] fixed update item name in bom patch, removed filter from sales invoice list, show tax calculation only if tax exists

This commit is contained in:
Anand Doshi 2015-02-04 18:52:35 +05:30
parent 0e13221338
commit dd942bb3d2
3 changed files with 11 additions and 6 deletions

View File

@ -5,14 +5,13 @@
frappe.listview_settings['Sales Invoice'] = {
add_fields: ["customer", "customer_name", "grand_total", "outstanding_amount", "due_date", "company",
"currency"],
filters: [["outstanding_amount", ">", "0"]],
get_indicator: function(doc) {
if(doc.outstanding_amount==0) {
return [__("Paid"), "green", "oustanding_amount,=,0"]
return [__("Paid"), "green", "outstanding_amount,=,0"]
} else if (doc.outstanding_amount > 0 && doc.due_date > frappe.datetime.get_today()) {
return [__("Unpaid"), "orange", "oustanding_amount,>,0|due_date,>,Today"]
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>,Today"]
} else if (doc.outstanding_amount > 0 && doc.due_date <= frappe.datetime.get_today()) {
return [__("Overdue"), "red", "oustanding_amount,>,0|due_date,<=,Today"]
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<=,Today"]
}
},
right_column: "grand_total_export"

View File

@ -7,6 +7,7 @@ def execute():
frappe.reload_doc("manufacturing", "doctype", "bom")
frappe.reload_doc("manufacturing", "doctype", "bom_item")
frappe.reload_doc("manufacturing", "doctype", "bom_explosion_item")
frappe.reload_doc("manufacturing", "doctype", "bom_operation")
frappe.db.sql("""update `tabBOM` as bom set bom.item_name = \
( select item.item_name from `tabItem` as item where item.name = bom.item)""")

View File

@ -793,8 +793,13 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
show_item_wise_taxes: function() {
if(this.frm.fields_dict.other_charges_calculation) {
$(this.get_item_wise_taxes_html())
.appendTo($(this.frm.fields_dict.other_charges_calculation.wrapper).empty());
var html = this.get_item_wise_taxes_html();
if (html) {
this.frm.toggle_display("other_charges_calculation", true);
$(this.frm.fields_dict.other_charges_calculation.wrapper).html(html);
} else {
this.frm.toggle_display("other_charges_calculation", false);
}
}
},