0

I see a seperate extension for Canadian Tax Receipts, but I need to print out tax receipts that are USA compliant for all individuals.

How can I generate a tax receipt for the USA?

UPDATE:

More specifically, we need to generate a tax receipt for Contacts that have the annual total (not individual contributions) of each financial type that is tax deductible. So for example if we had three financial types of say Donations (tax deductible) and Building Fund (tax deductible) and Book Sales (not tax deductible) it would show the total for the entire year for their Donations and then the total for the entire year for their Building Fund contributions, but would not show the Book Sales.

4 Answers 4

1

We use Thank You Letters for our US year-end receipts Go to Find Contribution, set the date for last year, select the financial type(s), and Refresh Results. This gives you the list of contributions. Check "All Records" Then under actions select "Thank You Letters-Print or Email." On the Thank You screen Group by "Contact and Financial Type" Separator set to "Horizontal Cell"

You will have to create the receipt so it pulls in the information you need. Below is our code. We use line items so you will have to edit this code to your needs.

    <table border="0" style="width: 900px;">
    <tbody>
        <tr>
            <td width="30%"><img height="auto" src="https://secure.radiusinternational.org/sites/default/files/images/Receipt%20Logo%20wAddress.png" width="275" /></td>
        </tr>
        <tr>
            <td style="text-align:left; font-weight: bold; padding-top:60px;" width="50%">{contact.addressee}</td>
            <th style="padding-top:60px; text-align:center; color:#70551F;padding-left:100px; ">2021 Contribution Statement</th>
        </tr>
        <tr>
            <td style="text-align:left; " width="40%">{contact.street_address}</td>
            <td style="text-align:center; font-style: italic; color:#281c1d;padding-left:100px;  ">January 1, 2021 - December 31, 2021</td>
        </tr>
        <tr>
            <td width="40%">{contact.city}, {contact.state_province} {contact.postal_code}</td>
            <td style="text-align:center; font-style: italic; color:#281c1d; padding-left:100px; ">Federal Id # 27-4638772</td>
        </tr>
    </tbody>
</table>

<p style="font-size:18px; font-weight: bold;font-style: italic; color:#70551F;">Thank you for your support of XYZ Foundation in 2021</p>

<p>No goods or services were received for these Tax Deductible contributions</p>

<table align="left" cellpadding="4" cellspacing="0" class="table" style="width: 875px;border: 1px solid #fff;">
    <tbody>
        <tr style="padding: 8px; border: 1px solid #fff;color:white; background-color: #70551F;">
            <th style="padding: 8px;">Date</th>
            <th style="padding: 8px;">Cont ID</th>
            <th style="padding: 8px;">Contribution Designation</th>
            <th style="padding: 8px;">Amount</th>
        </tr>
        <!--

    {foreach from=$contributions item=contribution} {assign
    var="date" value=$contribution.receive_date|date_format:"%B %d %Y"}
{crmAPI var='result' entity='LineItem' action='get' contribution_id=$contribution.id} 
  {foreach from=$result.values item=lineitem} 
    
  -->
        <tr style="padding: 4px; border: 1px solid #281c1d;">
            <td style="font-size:.8em; padding: 1px; border: 1px solid #fff;">{$date}</td>
            <td style="font-size:.8em; padding: 1px; border: 1px solid #fff;">{$contribution.id}</td>
            <td style="font-size:.8em; padding: 1px; border: 1px solid #fff;">{$lineitem.label}</td>
            <td style="font-size:.8em; text-align:right;padding: 1px; border: 1px solid #fff;">$ {$lineitem.line_total}</td>
        </tr>
        <!--
    {/foreach}{/foreach}

 -->
        <tr style="padding: 3px; border: 1px solid #281c1d;text-align:right;padding-top:10px;">
            <th colspan="3" style="padding: 3px; border: 1px solid #fff;text-align:right;padding-top:10px;padding-right:20px;">2021 Total Contributions</th>
            <td style="padding-right: 4px; border: 1px solid #fff;padding-top:10px;text-align:right;">$ {$contribution_aggregate}</td>
        </tr>
    </tbody>
</table>

FYI,

  1. We have some donors (foundations) that do not not need/want year-end receipts. We make them as do not SMS. Since we use Line Items, we pull a line item report check Is Not SMS and whatever other filters we need. We add those contacts to a group. Then in the Find Contribution step we filter by Group "XYZ".
  2. We have over 700 receipts to create. Our server cannot process the thnak you letters. We have to ask our webhost to boost our processing timeout and memory so we can do this. They bump it up and back down once we finish.
4
  • Does this only work if you have define('CIVICRM_MAIL_SMARTY', 1); in civicrm.settings.php?
    – Demerit
    Commented Jan 26, 2022 at 16:54
  • @Demerit I do not know the answer for sure. I would guess it depends if you are printing or emailing the receipts/thank-you letters. We print and mail our year-end receipts. But my civicrm.settings.php file does have that defined. But maybe that is for the online donation receipting which does email the receipt
    – Iowa Boy
    Commented Jan 26, 2022 at 19:04
  • 1
    I did have to set define('CIVICRM_MAIL_SMARTY', 1); in civicrm.settings.php to get it to work.
    – jsherk
    Commented May 13, 2022 at 22:06
  • I had some issues with getting the exact data I was looking for, and posted question (then answered it) here: civicrm.stackexchange.com/questions/41921/… so this other question may be relevevant to others because this other question is based on Iowa Boy template from this question.
    – jsherk
    Commented May 14, 2022 at 3:23
1

You may want to have a the Donation receipts extension. It was primarily build for German tax receipts but may be a good starting point for what you have in mind.

Unfortunately documentation is a bit outdated and it has quite some features not described yet but you should get the hang of it.

1

So I picked Iowa Boy's answer as correct because it helped me figure out the basics of what I wanted to do.

However I modified it to better suit our needs. We did not need line items, but just the full amount of each contribution. I also wanted to be able to show either Tax Deductible contributions or Non tax deductible contributions or both.

The template I have provided below has a couple variables you can set, depending on what you want for the output:

show_which_contribs

  • set this to 1 if you want to show both Tax-Deductible and Non-Tax Deductible contributions.

  • set this to 2 if you want to show only Tax-Deductible contributions.

  • set this to 3 if you want to show only Non-Tax Deductible contributions.

group_contribs_by

  • set this to 1 if you want to list all individual contributions seperately.

  • set this to 2 if you want to show only a summary/total of Tax-Deductible and/or Non-Tax Deductible contributions.

So go ahead and use FIND CONTRIBUTIONS to narrow down your results to whatever you want (date range and/or specific contacts). Then from the results, select ALL RECORDS and then choose THANK YOU LETTER-PRINT OR EMAIL. For GROUP CONTRIBUTIONS BY choose CONTACT. Then for the template you can use the following:

<!-- ** TEMPLATE TO CREATE A USA TAX RECEIPT by JEFF SHERK https://civicrm.stackexchange.com/questions/41120/how-to-print-usa-tax-receipt-to-individuals **
  ** CHOOSE SOME OPTIONS HERE:

  ** show_which_contribs :: 1=show both tax-deductible and non-tax-deductible contributions (default)  2=only show Tax-Deductible  3=only show Non-tax-deductible
  {assign var="show_which_contribs" value=1}

  ** group_contribs_by :: 1=no grouping, just show all individual contributions (default)  2=show summary of total only of Tax-Deductible and Non-tax-deductible (no individual contributions shown)
  {assign var="group_contribs_by" value=1}

-->

<p><span style="font-size:150%;">My Company Name</span><br />
123 Some Street, City, State 12345<br />
Phone: +1 555 555-5555&nbsp;&nbsp;&nbsp;&nbsp;Federal EIN: 12-3456789<br />
<br />
<!--
  ** CHECK IF OUR OPTIONS ABOVE ARE VALID. DEFAULT THEM TO 1 IF THEY ARE NOT. **
  {if $show_which_contribs != 1 AND $show_which_contribs != 2 AND $show_which_contribs != 3}
    {assign var="show_which_contribs" value=1}
  {/if}
  {if $group_contribs_by != 1 AND $group_contribs_by != 2}
    {assign var="group_contribs_by" value=1}
  {/if}
  ** NEED TO LOOP THRU ALL CONTRIBUTIONS TO FIND THE FIRST/EARLIEST CONTRIBUTION DATE AND THE LAST/LASTEST CONTRIBUTION DATE **
  {assign var="date_from" value="2099-12-31"|date_format:"%Y/%m/%d"}
  {assign var="date_to" value="1999-01-01"|date_format:"%Y/%m/%d"}
  {foreach from=$contributions item=contribution}
    {assign var="contribution_date" value=$contribution.receive_date|date_format:"%Y/%m/%d"}
    {if $contribution_date < $date_from }
      {assign var="date_from" value=$contribution.receive_date|date_format:"%b %e, %Y"}
    {/if}
    {if $contribution_date > $date_to }
      {assign var="date_to" value=$contribution.receive_date|date_format:"%b %e, %Y"}
    {/if}
  {/foreach}
  ** SHOW THE DATE RANGE ON THE RECEIPT. IF BOTH DATES ARE THE SAME, THEN ONLY SHOW ONE DATE **
--></p>

<p><b>Contributions Summary</b> - <!-- {if $date_to eq $date_from} --> {$date_from}<br />
<!-- {else} --> {$date_from} to {$date_to}<br />
<!-- {/if} --></p>

<hr />
<p>For:<br />
<span style="font-size:110%;"><b>{contact.addressee}</b></span><br />
{contact.street_address}&nbsp;&nbsp;&nbsp;{contact.city}&nbsp;&nbsp;&nbsp;{contact.state_province}&nbsp;&nbsp;&nbsp;{contact.country}&nbsp;&nbsp;&nbsp;{contact.postal_code}</p>

<table align="left" cellpadding="1" cellspacing="1" style="width:100%; border: 2px solid black; font-size:90%;">
    <thead>
        <tr align="left" style="font-size:80%;">
            <th style="border: 1px solid black;">Date</th>
            <th style="border: 1px solid black;">Type</th>
            <th style="border: 1px solid black;">Source</th>
            <th style="border: 1px solid black;">Tax Deductible</th>
            <th style="border: 1px solid black;">Amount</th>
        </tr>
    </thead>
    <tbody><!--
    {assign var='total_contrib_non_tax' value=0}
    {assign var='total_contrib_tax' value=0}
    {assign var='total_contribs' value=0}
    {foreach from=$contributions item=contribution}
      {assign var="date" value=$contribution.receive_date|date_format:"%b %e %Y"}
      {assign var="financial_type_id" value=$contribution.financial_type_id}
      {assign var="financial_type_name" value=$contribution.financial_type}
      {assign var="contribution_source" value=$contribution.contribution_source}
      {assign var="contribution_total_amount" value=$contribution.total_amount}
      {$contribution_total_amount|string_format:"%.2f"}
      {crmAPI var='resultFinancialType' entity='FinancialType' action='get' id=$financial_type_id}
      {assign var="financial_type_is_deductible" value=$resultFinancialType.values[0].is_deductible}
      {if $financial_type_is_deductible eq '1'}
         {assign var="financial_type_is_deductible" value="Tax-Deductible"}
         {if $show_which_contribs == 1 OR $show_which_contribs == 2}
            {assign var='total_contrib_tax' value=$total_contrib_tax+$contribution_total_amount}
            {assign var='total_contribs' value=$total_contribs+$contribution_total_amount}
         {/if}
      {else}
         {assign var="financial_type_is_deductible" value="Non tax deductible"}
         {if $show_which_contribs == 1 OR $show_which_contribs == 3}
            {assign var='total_contrib_non_tax' value=$total_contrib_non_tax+$contribution_total_amount}
            {assign var='total_contribs' value=$total_contribs+$contribution_total_amount}
         {/if}
      {/if}
      {$total_contrib_non_tax|string_format:"%.2f"}
      {$total_contrib_tax|string_format:"%.2f"}
      {$total_contribs|string_format:"%.2f"}
       {if $group_contribs_by == 1 AND ($show_which_contribs == 1 OR ($financial_type_is_deductible == "Tax-Deductible" AND $show_which_contribs == 2) OR ($financial_type_is_deductible == "Non tax deductible" AND $show_which_contribs == 3)) }
  -->
        <tr style="font-size:80%;">
            <td>{$date}</td>
            <td>{$financial_type_name}</td>
            <td>{$contribution_source}</td>
            <td>{$financial_type_is_deductible}</td>
            <td>${$contribution_total_amount}</td>
        </tr>
        <!--
       {/if}
    {/foreach}
      {if $group_contribs_by == 2}
       {if $show_which_contribs == 1 OR $show_which_contribs == 2}
-->
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>Total Tax-Deductible</td>
            <td>${$total_contrib_tax}</td>
        </tr>
        <!--
       {/if}
       {if $show_which_contribs == 1 OR $show_which_contribs == 3}
-->
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>Total Non tax deductible</td>
            <td>${$total_contrib_non_tax}</td>
        </tr>
        <!--
       {/if}
      {/if}
 -->
    </tbody>
</table>

<p><span style="font-size:110%;">Total Non-Tax Deductible: ${$total_contrib_non_tax}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total Tax-Deductible: ${$total_contrib_tax}<br />
<span style="font-size:120%;"><b>Total: ${$total_contribs}</b> </span></span></p>

<p><span style="font-size:75%;"><i>No goods or services were provided in return for the Tax Deductible contributions listed.</i></span></p>

Hope this helps somebody!

0

Can you update the invoicing message template to print the tax receipt?

1
  • I will have to investigate and play around to see if it can do what we need. Thanks
    – jsherk
    Commented Jan 25, 2022 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.