Skip to content

Commit 8399ae7

Browse files
committed
Merge branch 'staging' into production
2 parents 80bb48a + 37e9f26 commit 8399ae7

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

bloomstack_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
__version__ = '2.0.12'
4+
__version__ = '2.0.13'

bloomstack_core/bloomstack_core/doctype/authorization_request/authorization_request.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ def send_authorization_request(self):
2828

2929
doc = frappe.get_doc(self.linked_doctype, self.linked_docname)
3030
company = doc.company if hasattr(doc, 'company') else get_default_company()
31+
default_letterhead = frappe.db.get_value("Company", company, "default_letter_head")
32+
letterhead_content = ""
33+
if default_letterhead:
34+
letterhead_content = frappe.db.get_value("Letter Head", default_letterhead, "content")
3135

3236
subject = "{0} requests your authorization on {1}".format(company, self.linked_doctype)
3337
message = frappe.render_template("templates/emails/authorization_request.html", {
3438
"authorization_request": self,
3539
"linked_doc": doc,
36-
"company": company
40+
"company": company,
41+
"letter_head": letterhead_content
3742
})
3843

3944
frappe.sendmail(recipients=[self.authorizer_email], subject=subject, message=message)

bloomstack_core/bloomstack_core/page/license_search/license_search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class LicenseSearch {
135135
return;
136136
}
137137

138-
$wrapper.html(`<p class="text-muted">${cards_range_start} -
138+
$wrapper.html(`<p class="text-muted">${cards_range_start ? cards_range_start : 1} -
139139
${(cards_range_end >= me.total_count ? me.total_count : cards_range_end)}
140140
of ${me.total_count}</p>`);
141141
}

bloomstack_core/templates/emails/authorization_request.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,25 @@
1010
</head>
1111

1212
<body style="margin: 0;">
13-
13+
1414
<table
1515
style="max-width: 600px; margin: 0 auto; font-family: Helvetica, 'sans-serif'; color: #808080; line-height: 24px;">
1616

17+
<thead style="background-color: #f7f7f7;">
18+
<tr>
19+
<td style="padding: 40px 20px">
20+
<div style="margin-bottom: 7px;" class="text-center">{{ letter_head }}</div>
21+
<p style="float: right; padding-top: 25px; font-size: 21px; margin-bottom: 0;">
22+
{% if authorization_request.status == "Request Sent" %}
23+
Authorization Request
24+
{% else %}
25+
{{ authorization_request.linked_docname }}
26+
{% endif %}
27+
</p>
28+
</td>
29+
</tr>
30+
</thead>
31+
1732
<tbody>
1833
<tr>
1934
<td>

0 commit comments

Comments
 (0)