From c7fc11a8127aca057f3b347bd851f9981bceb4c3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 18 Nov 2015 12:59:00 +0530 Subject: [PATCH] [fix] Don't add pagebreak in print format if terms contains only spaces and newlines --- erpnext/hr/print_format/offer_letter/offer_letter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/print_format/offer_letter/offer_letter.json b/erpnext/hr/print_format/offer_letter/offer_letter.json index d480159b66..40a3fe198a 100644 --- a/erpnext/hr/print_format/offer_letter/offer_letter.json +++ b/erpnext/hr/print_format/offer_letter/offer_letter.json @@ -5,8 +5,8 @@ "doc_type": "Offer Letter", "docstatus": 0, "doctype": "Print Format", - "html": "{% if letter_head and not no_letterhead -%}\n
{{ letter_head }}
\n
\n{%- endif %}\n\n
\n

\n\n\nDate: {{ doc.offer_date }}\n

\n\nDear {{ doc.applicant_name }}, \n\n

\n\nWe are pleased to appoint you in the services of {{ doc.company }} on the terms and conditions detailed in this letter.\n\n

\n\nYour designation shall be {{ doc.designation }}.\n\n

\n\n\n\n{%- if doc.offer_terms -%}\n {%- for row in doc.offer_terms -%}\n {{ row.offer_term }}: {{ row.value }}\n\n
\n {%- endfor -%}\n{%- endif -%}\n\n
\n\n\n\n\nPlease read the detailed terms as below. If you have any queries, feel free to get in touch with us.\nWe look forward to your long and fruitful career association with our organisation.\nIf you decide to join us, 'Welcome to {{ doc.company }} !'\n\n

\n\n

\n\nYours truly,\n\n



\n\nAuthorized Signatory\n\n
\n\n{{ doc.company }}\n\n\n\n

\n
\n\n\n
{{ doc.terms }}
", - "modified": "2015-04-01 05:22:51.345050", + "html": "{% set terms_exist = (doc.terms|striptags).strip() %}\n\n{% if letter_head and not no_letterhead -%}\n
{{ letter_head }}
\n
\n{%- endif %}\n\n
\n

\n\n\nDate: {{ doc.offer_date }}\n

\n\nDear {{ doc.applicant_name }}, \n\n

\n\nWe are pleased to appoint you in the services of {{ doc.company }} on the terms and conditions detailed in this letter.\n\n

\n\nYour designation shall be {{ doc.designation }}.\n\n

\n\n\n\n{%- if doc.offer_terms -%}\n {%- for row in doc.offer_terms -%}\n {{ row.offer_term }}: {{ row.value }}\n\n
\n {%- endfor -%}\n{%- endif -%}\n\n
\n\n\n\n\nPlease read the detailed terms as below. If you have any queries, feel free to get in touch with us.\nWe look forward to your long and fruitful career association with our organisation.\nIf you decide to join us, 'Welcome to {{ doc.company }} !'\n\n

\n\n

\n\nYours truly,\n\n



\n\nAuthorized Signatory\n\n
\n\n{{ doc.company }}\n\n\n\n

\n
\n\n\n{% if terms_exist %}\n
{{ doc.terms }}
\n{% endif %}", + "modified": "2015-11-18 12:53:04.997745", "modified_by": "Administrator", "name": "Offer Letter", "owner": "Administrator",