From 27b4a92b0275eb170d08bed2dd424665aff36a52 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2013 11:10:29 +0530 Subject: [PATCH] error fixed in recurring invoices --- accounts/doctype/sales_invoice/sales_invoice.py | 3 ++- stock/page/stock_ageing/stock_ageing.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py index 60bf0102ab..6171d5ef90 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.py +++ b/accounts/doctype/sales_invoice/sales_invoice.py @@ -756,6 +756,7 @@ def manage_recurring_invoices(next_date=None): def make_new_invoice(ref_wrapper, posting_date): from webnotes.model.wrapper import clone + from accounts.utils import get_fiscal_year new_invoice = clone(ref_wrapper) mcount = month_map[ref_wrapper.doc.recurring_type] @@ -772,7 +773,7 @@ def make_new_invoice(ref_wrapper, posting_date): "invoice_period_to_date": \ get_next_date(ref_wrapper.doc.invoice_period_to_date, mcount), - + "fiscal_year": get_fiscal_year(posting_date)[0], "owner": ref_wrapper.doc.owner, }) diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js index 16847266ec..57e69cd600 100644 --- a/stock/page/stock_ageing/stock_ageing.js +++ b/stock/page/stock_ageing/stock_ageing.js @@ -64,7 +64,10 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ }, filters: [ {fieldtype:"Select", label: "Warehouse", link:"Warehouse", - default_value: "Select Warehouse..."}, + default_value: "Select Warehouse...", + filter: function(val, item, opts, me) { + return me.apply_zero_filter(val, item, opts, me); + }}, {fieldtype:"Select", label: "Brand", link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; @@ -79,6 +82,7 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ var me = this; this._super(); this.trigger_refresh_on_change(["warehouse", "plot_by", "brand"]); + this.show_zero_check(); }, init_filter_values: function() { this._super();