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``.
.. seealso::
:doc:`CustomStatements`
All five elements can be configured either by including a block of HTML code within the appropriate
tags (such as ``
Sample Church
105 Highway 151
Ventura, TN 34773
615.232.3432
{{contributor.Name}}
{{{contributor.MailingAddress}}}
Dear {{contributor.Name}},
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!
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. .. csv-table:: :header: "Name", "Type", "Value", "Examples" :widths: 20, 20, 60, 40 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
105 Highway 151 | Ventura, TN 34773 | 615.232.3432
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. .. code-block:: html :linenos: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.
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
StatementTemplate ~~~~~~~~~~~~~~~~~ This file should be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplate. .. literalinclude:: Files/StatementTemplate.html :linenos: StatementTemplateBody ~~~~~~~~~~~~~~~~~~~~~ This file should be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplateBody. .. literalinclude:: Files/StatementTemplateBody.html :linenos: StatementTemplateFooter ~~~~~~~~~~~~~~~~~~~~~~~ This optional file can be created at Administration > Special Content > Text Content. Below is sample code for the StatementTemplateFooter. .. code-block:: html :linenos: