From ff4e996a8fee071f91db80d544dd3f8eed641ab1 Mon Sep 17 00:00:00 2001 From: webnotes Date: Sat, 15 Dec 2012 17:51:24 +0530 Subject: [PATCH 1/2] fixed syntax error in recurring sales invoice code --- accounts/doctype/sales_invoice/sales_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py index a146e932ef..ef6f66ceec 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.py +++ b/accounts/doctype/sales_invoice/sales_invoice.py @@ -719,7 +719,7 @@ def get_next_date(dt, mcount, day=None): if not day: day = getdate(dt).day if month > 12: - month, year = m-12, y+1 + month, year = month-12, year+1 try: next_month_date = datetime.date(year, month, day) except: @@ -909,4 +909,4 @@ def get_bank_cash_account(mode_of_payment): webnotes.msgprint("Default Bank / Cash Account not set in Mode of Payment: %s. Please add a Default Account in Mode of Payment master." % mode_of_payment) return { "cash_bank_account": val - } \ No newline at end of file + } From 5f17be83644cffe7978f05237e255e8fc1613246 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 15 Dec 2012 18:38:18 +0530 Subject: [PATCH 2/2] added payment link in expiry banner --- public/js/startup.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/js/startup.js b/public/js/startup.js index a5ed4c4416..1b9e3ea795 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -57,17 +57,18 @@ erpnext.startup.start = function() { var today = dateutil.str_to_obj(wn.boot.server_date); var expires_on = dateutil.str_to_obj(wn.boot.expires_on); var diff = dateutil.get_diff(expires_on, today); + var payment_link = "See Payment Options."; if (0 <= diff && diff <= 15) { var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff }); $('header').append(repl('
\ Your ERPNext subscription will expire %(expiry_string)s. \ Please renew your subscription to continue using ERPNext \ - (and remove this annoying banner). \ -
', { expiry_string: expiry_string })); + (and remove this annoying banner). %(payment_link)s\ + ', { expiry_string: expiry_string, payment_link: payment_link })); } else if (diff < 0) { $('header').append(repl('
\ - This ERPNext subscription has expired. \ -
', { expiry_string: expiry_string })); + This ERPNext subscription has expired. %(payment_link)s\ + ', { expiry_string: expiry_string, payment_link: payment_link })); } } erpnext.set_about(); @@ -179,4 +180,4 @@ erpnext.setup_mousetrap = function() { // start $(document).bind('startup', function() { erpnext.startup.start(); -}); \ No newline at end of file +});