Contribution Statements - HTML Option¶
The HTML option for contribution statements allows for more complete customization than is possible with the default statements. The special content files StatementHeader and StatementNotice still control what is displayed at the top of the statements. But with the HTML option enabled, you can also control the format of the rest of the statement with the new files StatementTemplate, StatementTemplateBody, and StatementTemplateFooter.
Later in this article, samples of the files are provided, as well as information about the replacement codes that can be used in the templates.
To switch to the new custom statements, prepare the above-mentioned files per the directions
below. Then add the setting UseNewStatementsFormat
with a value of True
. After setting this
to True
, the first time you view a contribution statement, if you have not already created the
files, default files for StatementTemplate and StatementTemplateBody will be created and
placed on the Text Content tab.
Important
The default templates will be suitable in most cases. Do not attempt extensive customization unless you have the in-staff HTML expertise to make the desired changes to the statement templates. It is outside the scope of our support to create customized statements for you or to offer guidance beyond the information provided in this help article.
Custom Statements for Ministry Fund Sets¶
If you currently use the Custom Statements feature, allowing you to generate custom statements
for particular sets of funds, you can still use that feature with this HTML option. As before,
you will continue to define the header and notice for your custom statements with the
CustomStatements file. But with the UseNewStatementsFormat
setting set to True
,
you will now also be able to define the Template
, TemplateBody
, and Footer
.
See also
All five elements can be configured either by including a block of HTML code within the appropriate
tags (such as <Notice> [HTML code block] </Notice>
) or by referencing an external special content file
as an attribute within the tag. An example of this second method is <Notice content="CustomNoticeContent" />
where the filename can be one of your own choosing. The sample code below contains the available tags
and demonstrates their use with the second (external file) method.
1 2 3 4 5 6 7 8 9 10 11 12 | <CustomStatements> <Statement description="Ministry name"> <Funds> <!--A range or set of fund IDs included in this custom statement--> </Funds> <Header content="CustomHeaderContent" /> <Notice content="CustomNoticeContent" /> <Template content="CustomTemplateContent" /> <TemplateBody content="CustomTemplateBodyContent" /> <Footer content="CustomFooterContent" /> </Statement> </CustomStatements> |
Including a Cover Letter¶
You can prepend a cover letter to statements by including HTML code similar to the following at the top of the <body> section of the StatementTemplate file. The final line is important as it creates the page break between the cover letter and the statement proper.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <p style="padding-top: 144pt; text-align: right; font-size: 13pt; line-height: 150%;"> Sample Church<br> 105 Highway 151<br> Ventura, TN 34773<br> 615.232.3432 </p> <p style="padding-top: 72pt; font-size: 13pt; line-height: 150%;"> {{contributor.Name}}<br /> {{{contributor.MailingAddress}}} </p> <p style="padding-top: 36pt; font-size: 13pt;"> Dear {{contributor.Name}}, </p> <p style="padding-top: 24pt; font-size: 13pt; line-height: 200%;"> We are grateful for your generosity this past year. Your gifts have made possible the various ministries of Sample Church, making a difference in the lives of people in this community. Attached is your giving statement for {{FmtDate fromDate}} - {{FmtDate toDate}}. Again, thank you! </p> <p style="page-break-before: always;"> </p> |
Settings Used with the HTML Option¶
Some of the settings already in use for statements will continue to work with the HTML option enabled. Others will no longer be used. The settings that will continue to be used are:
MinContributionAmount
NoTitlesOnStatements
RequireAddressOnStatement
ShowPledgeIfMet
The following settings will no longer be used when the HTML option is enabled because the options can be controlled within the StatementTemplateBody or StatementTemplate:
ContributionStatementFundDisplayFieldName
DisplayNonTaxOnStatement
NoPrintDateOnStatement
PrintEnvelopeNumberOnStatement
RequireCheckNoOnStatement
RequireNotesOnStatement
StatementAddrPos
StatementRetAddrPos
Templating Language¶
The statement template files use Handlebars to allow for extensive customization. The object use in templating the statement is called a StatementContext. The following objects and properties are available from the StatementContext.
Name |
Type |
Value |
Examples |
---|---|---|---|
fromDate |
DateTime |
Start date of the statement; see DateTime below |
1/1/2019 |
toDate |
DateTime |
End date of the statement; see DateTime below |
12/31/2019 |
header |
HTML |
HTML of the statement header (StatementHeader special content) |
See StatementHeader |
now |
DateTime |
The current date & time; see DateTime below |
1/25/2020 |
notice |
HTML |
HTML of the statement notice (StatementNotice special content) |
See StatementNotice |
body |
HTML |
HTML of the statement body (StatementTemplateBody special content) |
See StatementTemplateBody |
footer |
HTML |
HTML of the statement footer (StatementTemplateFooter special content) |
See StatementTemplateFooter |
envelopeNumber |
Text |
The value of the contributor’s EnvelopeNumber extra value |
1234 |
contributor |
ContributorInfo |
An object with properties describing the contributor including Name, MailingAddress, PeopleId, SpouseID, FamilyId, DeacesedDate, FamilyPositionId, Age, Joint, CampusId |
See ContributorInfo |
contributions |
List |
A list of tax deductible Contribution objects |
See Contributions |
giftsinkind |
List |
A list of gift-in-kind Contribution objects |
See Contributions |
nontaxitems |
List |
A list of non-tax deductible Contribution objects |
See Contributions |
pledges |
List |
A list of pledge summary objects |
See PledgeSummary |
taxSummary |
List |
A list of tax deductible summary objects |
See TaxSummary |
nontaxSummary |
List |
A list of non-tax deductible summary objects |
See *NonTaxSummary |
totalGiven |
Decimal |
The total amount of tax and non-tax deductible contributions |
1234.56 |
Objects¶
DateTime¶
These are only some of the most commonly-used properties. The full reference can be found
here.
A DateTime object is often used to display only the date. Using {{FmtDate now}}
would print
a date like 7/30/2019
.
Property |
Example Value |
Description |
---|---|---|
Day |
30 |
The day of the month (1 - 31) |
Hour |
15 |
The hour of the day in 24-hour format (0 - 23) |
Minute |
36 |
The minute of the hour (0 - 59) |
Month |
7 |
The month number (1 - 12) |
Year |
2019 |
The 4-digit year |
ContributorInfo¶
Use information from the names in this table with the format contributor.age
where age
is
replaced with the Name of the specific information desired.
Property |
Type |
Example Value |
Description |
---|---|---|---|
Age |
Integer |
30 |
The person’s age if available |
CampusId |
Integer |
1 |
The ID of the person’s campus |
DeceasedDate |
DateTime |
10/4/2019 |
If the person is deceased, the date of their death |
FamilyId |
Integer |
123 |
The person’s family ID |
FamilyPositionId |
Integer |
20 |
The person’s position ID in the family (10 = Primary, 20 = Secondary, 30 = Child) |
hohInd |
Integer |
1 |
The person’s status as head of house (1 = Head, 2 = Spouse, 3 = Other) |
Joint |
Boolean |
true |
Whether the person contributes jointly with spouse |
MailingAddress |
HTML |
123 Main St<br/> Dallas, Texas<br/> 75240 |
<br/> tags are automatically added to create a multi-line address for mailers |
Name |
Text |
Mr. and Mrs. Smith |
A calculated name based on combined rules from preferred name, CoupleName extra value, whether the couple are joint givers, and whether other titles are applied to the people this statement is for |
PeopleId |
Integer |
456 |
The person’s TouchPoint ID |
SpouseId |
Integer |
457 |
The TouchPoint ID of the contributor’s spouse |
Contributions¶
This list of contributions can be iterated using {{#each contributions}}
. See the Sample TemplateBody,
lines 103-115, for an example of how to use the properties in this table.
Property |
Type |
Example Value |
Description |
---|---|---|---|
BundleType |
Text |
Generic Envelopes, Loose Checks and Cash, Online |
The type of bundle this contribution is in |
CheckNo |
Text |
1234 |
The check number recorded on the contribution |
ContributionAmount |
Decimal |
12.34 |
The total amount of the contribution (in dollars and cents) |
ContributionDate |
DateTime |
10/4/2019 |
The date recorded on the contribution |
ContributionId |
Integer |
123456 |
The contribution ID |
ContributionType |
Text |
Regular, Online |
The description of the type of contribution recorded |
ContributionTypeId |
Integer |
1, 5, 10, 20 |
The ID of the type of contribution recorded |
Description |
Text |
Recurring Giving |
The description recorded on the contribution |
FundDescription |
Text |
Missions trips and Outreach |
The description of the fund associated to the contribution |
FundName |
Text |
Missions |
The name of the fund associated to the contribution |
Name |
Text |
Joe Smith |
The name of the person who gave the contribution |
Notes |
Text |
In memory of… |
The memo left by donor when making the gift |
Decimal¶
The normal use of a Decimal object is to display a dollar amount. Using {{FmtMoney Amount}}
would print the
amount as $12.34
.
PledgeSummary¶
This is a summary object intended for displaying sums that have been pledged or given to pledge funds.
Property |
Type |
Example Value |
Description |
---|---|---|---|
CurrentYearTotal |
Decimal |
800.00 |
Total amount given to the fund for the year of the statement |
FundDescription |
Text |
Mission trips and outreach |
The description of the fund |
FundName |
Text |
Mission |
The name of the fund |
Given |
Decimal |
900.00 |
Total amount given to the fund |
Pledged |
Decimal |
1000.00 |
Total amount pledged to the fund |
PledgeDate |
DateTime |
10/4/2019 |
The date of the earliest pledge made to the fund |
PriorYearsTotal |
Decimal |
100.00 |
Total amount given to the fund for the years preceding the statement |
NonTaxSummary¶
This is a summarized list of totals by fund containing the properties FundName, FundDescription,
ContributionAmount for contributions that are classified as non-tax deductible. This list can be
iterated using {{#each nonTaxSummary}}
. See the Sample TemplateBody, lines 65-70 for an example
of how to use the properties listed above. Additionally, the following properties is available and
can be used as seen on lines 72-73 of the sample code.
Property |
Type |
Example Value |
Description |
---|---|---|---|
Total |
Decimal |
789.00 |
Total amount given to all funds |
TaxSummary¶
This is a summarized list of totals by fund containing the properties FundName, FundDescription,
ContributionAmount for contributions that are classified as tax deductible. This list can be
iterated using {{#each taxSummary}}
. See the Sample TemplateBody, lines 42-47 for an example
of how to use the properties listed above. Additionally, the following properties is available and
can be used as seen on lines 49-50 of the sample code.
Property |
Type |
Example Value |
Description |
---|---|---|---|
Total |
Decimal |
789.00 |
Total amount given to all funds |
StatementOptions¶
A script element in the StatementTemplate or StatementTemplateBody defined as <script id=”options”> and ending with </script> can contain options defined as JSON within this block to set various options for the generation of the PDF. The following definition explains all of the possible values and their defaults.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <script id="options"> { "header": { "rightText": "", "fontName": "", "fontSize": null, "centerText": "", "contentSpacing": null, "leftText": "", "useLineSeparator": false }, "footer": { "rightText": "Page [page] of [topage]", "fontName": "Helvetica", "fontSize": 10, "centerText": "", "contentSpacing": null, "leftText": "pid: {{contributor.PeopleId}}", "useLineSeparator": false }, "margins": { "all": 0.5, "unit": "Inches", "bottom": null, "left": null, "right": null, "top": null }, "paperSize": "Letter" } </script> |
HTML Template Files¶
Below are samples of the required HTML template files.
StatementHeader¶
This file should exist (or, if not, should be created) at Administration > Special Content > HTML Content. Below is sample source code for a statement header.
1 2 3 4 5 | <p><img alt="" src="https://ssl.cf2.rackcdn.com/samplechurch.1234567.samplechurch-statement-logo.png" style="width: 400px; height: 100px;" /></p> <hr align="left" style="width:85%;" /> <p><span style="font-family: Helvetica, Arial, sans-serif; font-size:1.1em;">105 Highway 151 | Ventura, TN 34773 | 615.232.3432 </span></p> |
StatementNotice¶
This file should exist (or, if not, should be created) at Administration > Special Content > HTML Content. Below is sample source code for a statement notice.
1 2 3 4 | <p><i>NOTE: No goods or services were provided to you by the church in connection with any contribution; any value received consisted entirely of intangible religious benefits. </i></p> <p><i>Thank you for your faithfulness in the giving of your time, talents, and resources. Together we can share the love of Jesus with our city </i></p> |
StatementTemplate¶
This file should be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | <!DOCTYPE html> <html> <head> <style type="text/css"> * { font-family: Helvetica, Helv; font-size: 11pt; margin: 0; padding: 0; text-align: left; text-indent: 0; vertical-align: top; -webkit-border-horizontal-spacing: 0; } thead { display: table-header-group; } tfoot { display: table-header-group; } table, tbody { page-break-inside: auto; } table { margin-bottom: 20pt; } tr { page-break-inside: avoid !important; } td, th { padding: 2pt; } .right { text-align: right; } .header { border-bottom: 2px solid black; } .subtotal { border-top: 2px solid black; } </style> </head> <body> <table style="width:100%;height: 3.5in;"> <tbody> <tr> <td style="width: 55%">{{{header}}}</td> <td class="right">Printed: {{FmtDate now}} id:{{contributor.PeopleId}} {{contributor.CampusId}}<br />{{{notice}}}</td> </tr> <tr> <td style="padding-left:20pt;font-size:13pt">{{contributor.Name}}<br />{{{contributor.MailingAddress}}}</td> <td></td> </tr> </tbody> </table> {{{body}}} {{{footer}}} </body> </html> |
StatementTemplateBody¶
This file should be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplateBody.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | <p style="font-weight:bold;margin-bottom: 20pt;"> Period: {{FmtDate fromDate}} - {{FmtDate toDate}} </p> {{#ifGT pledges.Count 0}} <table style="width:100%"> <thead> <tr><th colspan="5">Pledge Summary as of {{FmtDate toDate}}</th></tr> <tr> <th class="header">Fund</th> <th class="header right">Pledge</th> <th class="header right">Prior Years</th> <th class="header right">Current Year</th> <th class="header right">Balance</th> </tr> </thead> <tbody> {{#each pledges}} <tr> <td>{{FundName}}</td> <td class="right">{{FmtMoney Pledged}}</td> <td class="right">{{FmtMoney PriorYearsTotal}}</td> <td class="right">{{FmtMoney CurrentYearTotal}}</td> <td class="right">{{FmtMoney Balance}}</td> </tr> {{/each}} </tbody> </table> {{/ifGT}} <div><b>Contributions Summary</b></div> <div class="single-column"> {{#ifGT taxSummary.Count 0}} <table style="width:100%"> <thead> <tr> <th class="header"> Tax Deductible Summary by Fund </th> <th class="header right">Amount</th> </tr> </thead> <tbody> {{#each taxSummary}} <tr> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> </tr> {{/each}} <tr> <td class="subtotal"> Tax Deductible Total </td> <td class="subtotal right" style="padding-right:10pt">{{FmtMoney taxSummary.Total}}</td> </tr> </tbody> </table> {{/ifGT}} {{#ifGT nontaxSummary.Count 0}} <table style="width:100%"> <thead> <tr> <th class="header">Non-Tax Deductible Summary by Fund</th> <th class="header right">Amount</th> </tr> </thead> <tbody> {{#each nontaxSummary}} <tr> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> </tr> {{/each}} <tr> <td class="subtotal">Non-Tax Deductible Total</td> <td class="subtotal right" style="padding-right:10pt">{{FmtMoney nontaxSummary.Total}}</td> </tr> </tbody> </table> {{/ifGT}} {{#ifGT softcreditSummary.Count 0}} <table style="width:100%"> <thead> <tr> <th class="header">Soft Credit Summary by Fund (Non Tax Deductible)</th> <th class="header right">Amount</th> </tr> </thead> <tbody> {{#each softcreditSummary}} <tr> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> </tr> {{/each}} <tr> <td class="subtotal">Non-Tax Deductible Total</td> <td class="subtotal right" style="padding-right:10pt">{{FmtMoney softcreditSummary.Total}}</td> </tr> </tbody> </table> {{/ifGT}} </div> <div class="single-column"> {{#ifGT contributions.Count 0}} <table style="width:100%"> <thead> <tr> <th>Total Contributions For Period</th> <th class="right">{{FmtMoney totalGiven}}</th> </tr> </thead> <tbody></tbody> </table> <table style="width:100%"> <thead> <tr><th colspan="5">Tax Deductible Contributions</th></tr> <tr> <th class="header" style="width:60pt">Date</th> <th class="header" style="width:180pt">Fund</th> <th class="header right" style="width:60pt">Amount</th> <th class="header">Type</th> <th class="header">Detail</th> </tr> </thead> <tbody> {{#each contributions}} <tr> <td class="right">{{FmtDate ContributionDate}}</td> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> <td>{{ContributionType}}</td> {{#if Notes}} <td>{{Notes}}</td> {{else if CheckNo}} <td>{{CheckNo}}</td> {{else}} <td>{{Description}}</td> {{/if}} </tr> {{/each}} </tbody> </table> {{/ifGT}} {{#ifGT nontaxitems.Count 0}} <table style="width:100%"> <thead> <tr><th colspan="5">Non-Tax Deductible Contributions</th></tr> <tr> <th class="header" style="width:60pt">Date</th> <th class="header" style="width:180pt">Fund</th> <th class="header right" style="width:60pt">Amount</th> <th class="header">Type</th> <th class="header">Detail</th> </tr> </thead> <tbody> {{#each nontaxitems}} <tr> <td class="right">{{FmtDate ContributionDate}}</td> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> <td>{{ContributionType}}</td> {{#if CheckNo}} <td>{{CheckNo}}</td> {{else}} <td>{{Description}}</td> {{/if}} </tr> {{/each}} </tbody> </table> {{/ifGT}} {{#ifGT softcredits.Count 0}} <table style="width:100%"> <thead> <tr><th colspan="5">Soft Credit Contributions (Non Tax Deductible)</th></tr> <tr> <th class="header" style="width:60pt">Date</th> <th class="header" style="width:180pt">Fund</th> <th class="header right" style="width:60pt">Amount</th> <th class="header">Name</th> <th class="header">Detail</th> </tr> </thead> <tbody> {{#each softcredits}} <tr> <td class="right">{{FmtDate ContributionDate}}</td> <td>{{FundName}}</td> <td class="right">{{FmtMoney ContributionAmount}}</td> <td>{{Name}}</td> {{#if CheckNo}} <td>{{CheckNo}}</td> {{else}} <td>{{Description}}</td> {{/if}} </tr> {{/each}} </tbody> </table> {{/ifGT}} {{#ifGT giftsinkind.Count 0}} <table style="width:100%"> <thead> <tr><th colspan="5">Gift-in-kind Contributions</th></tr> <tr> <th class="header" style="width:60pt">Date</th> <th class="header" style="width:180pt">Fund</th> <th class="header right" style="width:60pt"></th> <th class="header">Type</th> <th class="header">Detail</th> </tr> </thead> <tbody> {{#each giftsinkind}} <tr> <td class="right">{{FmtDate ContributionDate}}</td> <td>{{FundName}}</td> <td></td> <td>{{ContributionType}}</td> <td>{{CheckNo}} {{Description}}</td> </tr> {{/each}} </tbody> </table> {{/ifGT}} </div> |