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

Do not select this option unless you have the in-staff HTML expertise to make the desired customizations 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.

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>

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 In memory of… The description recorded on the contribution
FundDescription Text Mission trips and outreach The description of the fund associated to the contribution
FundName Text Mission The name of the fund associated to the contribution
Name Text Joe Smith The name of the person who gave the contribution

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": ""
        "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.&nbsp;</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
<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}}
</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 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 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>

StatementTemplateFooter

This optional file can be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplateFooter.

1
<div style="text-align:center">Thank you for being a donor!</div>


Latest Update 03/17/2020

Added new article.

© 2020 TouchPoint Software, LLC.  All rights reserved.