Extended Giving Statement
Imports: 22

For churches that want to record and report certain types of giving, which cannot be recorded directly in PCO Giving (e.g. gifts in kind, third-party distributions, etc.). It generates statements per household, including all notes with a specified prefix, within the specified dates. To use, create note categories with specified prefix (default is "Extended Giving - "). Each note created in these categories will appear on the statement, including the date, the name of the category (after the prefix) and the description.

Preview

Report Preview


  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
<!--

What note category prefixes should be included? (each with a semi-colon with no space after)
{% capture notePrefix %}Extended Giving - {% endcapture %}

What is the start date for the statment?
{% capture startDate %}
{{- 'now' | date: '%Y' -}}-01-01
{% endcapture %}

What is the end date for the statment?
{% capture endDate %}
{{- 'now' | date: '%Y' -}}-12-31
{% endcapture %}

Header text for table
{% capture tableHeader %}
Donations for {{ startDate | date: '%Y' }} (as of {{ 'now' | date: '%B %Y' -}})
{% endcapture%}

Paragraph content
{% capture messageContent %}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phasellus tristique ultricies urna, ac scelerisque nunc accumsan ut.
Nulla ullamcorper mi erat, quis viverra ex facilisis fermentum.
Vestibulum lacinia fermentum felis quis fringilla.
{% endcapture%}

-->

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <style>
    html, * {font-family: lato, sans-serif; line-height:1.4em;}
    @page {margin: .5in 0;}   /*-- PDF margin reset --*/
    body {margin: 0; font-size: 10.5pt;}
    
    /*-- Baseline Fonts --*/
    h1 {font-size: 14.5pt; font-weight: bold;}
    h2 {font-size: 13.5pt;}
    h3 {font-size: 10.5pt; font-weight:normal;}
    li {font-size: 9pt;}
    
    /*-- Layout --*/
    .header h1 {margin: 0 0 1em;} /*-- Report Title --*/
    .main h2 {margin: 0 1em 0 0;} /*-- Household Name --*/
    .main h3 {margin: 0;} /*-- Household Address --*/
    
    .household-item {display: block; margin-bottom: 1em;}
    .household-item {page-break-before: always;}
    .main div:first-child {page-break-before: auto;}
    .addressee {padding: 5em 0 4em 4em;}
 
    table {border-collapse: collapse; font-size: 10.5pt; width: 100%;}
    thead {text-align: left; border-bottom: 2pt solid #888;}
    th {text-align: left;}
    td, th {padding-right: .25em; padding-left: .25em;}
    tr:nth-child(even) {background: #E9E9E9;}
    tr:nth-child(odd) {background: #FFF;}

    

    
    /*----- Font size equivalents for screen. This provides a more accurate preview of print sizes on a monitor ----*/
    @media screen {
      h1 {font-size: 20px; font-weight: bold; margin-top:0;}
      h2 {font-size: 18px;}
      h3 {font-size: 14px; font-weight:normal;}
      h4 {font-size: 14px font-weight: bold;}
      li {font-size: 12px;}
      li.name	{font-size: 14px; font-weight: bold; margin-bottom: 4px;}
      .btn {font-size: 12px;}
      
      /*----- The wrapper class controls the preview frame in the HTML generated report. ----*/
      /*----- Please note that PDFs are generated in portrait orientation. To print in landscape, generate the report in HTML and print from your browser -----*/ 
      /*----- Portrait view = max-width: 720px; Landscape view = max-width: 1000px ----*/
      .wrapper 	{padding: 1.5em; border: 1px solid rgb(204,204,204); margin:1.5em auto; max-width:720px;}
      
    }
    
    @media print {
      .no-print {display: none;} /*----- Apply this class to any element you do not want on the print view ----*/
      body {margin: .5in .5in 1in .5in;} /*----- Adjust this to change the page margins for printing ----*/
    }
  </style>
</head>

<body>

  <div class="wrapper">
    <div class="main">
      
      {% for household in households %}
      
        {% assign householdNotes = '' | split: '##' %}
        {% assign householdNotesFiltered = '' | split: '##' %}
      
      
        {% for person in household.people %}
          {% assign householdNotes = householdNotes | concat: person.notes %}
        {% endfor %}
      
        {% assign householdNotes = householdNotes | sort: 'date' %}
      
        {% for note in householdNotes %}
          {% if note.date >= startDate and note.date <= endDate and note.category contains notePrefix %}
            {% capture householdNotesAdd %}{{ note.date | date: "%-m/%-d/%Y" }}@@{{ note.category }}@@{{ note.message | replace: "&quot;","”" | replace: "&amp;#39;","’" | replace: " ’"," ‘" | replace: " ”"," “" }}{% endcapture %}
            {% assign householdNotesAdd = householdNotesAdd | split: '##' %}
            {% assign householdNotesFiltered = householdNotesFiltered | concat: householdNotesAdd %}
          {% endif %}
        {% endfor %}
        
        {% unless householdNotesFiltered.size == 0 %}
          
          <div class="household-item">
            <div class="logo">
              <div>
                Header Content Here
              </div>
            </div>
            
            <div class="addressee">
            {% if household.people.size > 1 %}
              {{ household.name }}
              {% else %}
              {{ household.primary_contact.name }}
                {% endif %}<br />
            {{ household.primary_address.postal_address }}
            </div>
            
            <p>{{notePrefixLength}}Dear {% if household.people.size > 1 %}{{ household.name }}{% else %}{{ household.primary_contact.name }}{% endif %},</p>
            <p>{{ messageContent }}</p>
            
            <h1>{{ tableHeader }}</h1>
            <table>
              <thead>
                <tr>
                  <th>Date</th>
                  <th>Type</th>
                  <th>Description</th>
                </tr>
              </thead>
              <tbody>
                {% for note in householdNotesFiltered %}
                  {% assign noteArray = note | split: '@@' %}
                  {% assign shortCategory = noteArray[1] | slice: notePrefix.size,100 %}
                    <tr>
                      <td style="width: 6em; padding-right: 1em;">{{ noteArray[0] }}</td>
                      <td style="width: 10em; padding-right: 1em;">{{ shortCategory }}</td>
                      <td>{{ noteArray[2] | replace: '::',' — ' }}</td>
                    </tr>
                {% endfor %}
              </tbody>
            </table>

          </div>
        
        {% endunless %}
        
      {% endfor %}
    </div>      
  </div>  
</body>
</html>