Hushåll familj/enskild 7160

Swedish setup for printing address labels on Avery 7160.

Preview

Report Preview


<!-- Quick Customization

To print a label with the household name, set to true
To print labels with the last name of the primary contact, set to false
{% assign print_household_name = false %}

To only print labels for people who have an address, set the below to true
To print labels for every household in the list, set to false
{% assign address_present = true %}

-->
<html>
  <head>
    <title>Avery Labels</title>
     <style>
      @page {
        margin-top: 15.15mm;
        margin-bottom: 0mm;
        margin-left: 7.25mm;
        margin-right: 0mm;
        size: A4;
      }
      ul { margin: 0; padding: 0; }
      ul.labels li {
        margin: 0;
        margin-right: 2.5mm;
        padding: 0;
        float: left;
        width: 6.35cm;
        height: 3.81cm;
        display: block;
      }
      ul.labels li div.address {
        margin-top: 5mm;
        margin-left: 5mm;
      }  
    </style>
  </head>
  <body>
    <ul class="labels">
      {% for household in households %}
        {% if household.primary_address or address_present == false %}
          {% if print_household_name == true %}
            <li>
              <div class="address">
                Familjen {{ household.name }}<br>
                {{ household.primary_address.postal_address }}
              </div>
            </li>
          {% else %}
            <li>
              <div class="address">
                 {% if household.member_count > 1 %} 
									  		 Familjen {{ household.primary_contact.last_name }} <br>
                         {{ household.primary_address.street_line_1 }} <br>
                				{{ household.primary_address.street_line_2 }} <br>
                {{ household.primary_address.zip }} {{ household.primary_address.city }}
                {% else %}
                         {{ household.primary_contact.first_name }} {{ household.primary_contact.last_name }} <br>
                        {{ household.primary_address.street_line_1 }} <br>
                				{{ household.primary_address.street_line_2 }} <br>
                {{ household.primary_address.zip }} {{ household.primary_address.city }}
                {% endif %}
              </div>
            </li>      			
          {% endif %}
        {% endif %}
      {% endfor %}
    </ul>
  </body>
</html>