Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
60f47b3648
@ -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:
|
||||
|
@ -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 = "<a href=\"https://erpnext.com/modes-of-payment.html\" target=\"_blank\">See Payment Options.</a>";
|
||||
if (0 <= diff && diff <= 15) {
|
||||
var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff });
|
||||
$('header').append(repl('<div class="expiry-info"> \
|
||||
Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
|
||||
Please renew your subscription to continue using ERPNext \
|
||||
(and remove this annoying banner). \
|
||||
</div>', { expiry_string: expiry_string }));
|
||||
(and remove this annoying banner). %(payment_link)s\
|
||||
</div>', { expiry_string: expiry_string, payment_link: payment_link }));
|
||||
} else if (diff < 0) {
|
||||
$('header').append(repl('<div class="expiry-info"> \
|
||||
This ERPNext subscription <b>has expired</b>. \
|
||||
</div>', { expiry_string: expiry_string }));
|
||||
This ERPNext subscription <b>has expired</b>. %(payment_link)s\
|
||||
</div>', { expiry_string: expiry_string, payment_link: payment_link }));
|
||||
}
|
||||
}
|
||||
erpnext.set_about();
|
||||
|
Loading…
x
Reference in New Issue
Block a user