{% extends 'pdf/base.html.twig' %}

{% block body %}
    <table class="purchase" width="100%" cellpadding="0" cellspacing="0" role="presentation">
        <tr>
            <td>
                <h1>{{ text.receipt }}: {{ id }}</h1>
                <h3 >{{ text.date }}: {{date | date('d/m/y')}}</h3>
            </td>
        </tr>
        <tr>
            <td style="vertical-align: top;">
                <p>{{ text.from }}:</p>
                <h2 style="margin-bottom:0">{{ company_name | raw }}</h2>
                <p>{{ company_address | nl2br}}</p>
            </td>
            <td style="vertical-align: top;"  class="align-right">
                <p>{{ text.to }}:</p>
                <h2 style="margin-bottom:0">{{ donor_name }}</h2>
                <p>
                    {{ donor_business }}
                    {{ donor_street }}<br/>
                    {{ donor_postcode }} {{ donor_city }}<br/>
                    {{ donor_country }}
                </p>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table class="purchase_content" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <th class="purchase_heading" align="left">
                            <p class="f-fallback">{{ text.description }}</p>
                        </th>
                        <th class="purchase_heading" align="right">
                            <p class="f-fallback">{{ text.amount }}</p>
                        </th>
                    </tr>
                    {% for description, value in items %}
                        <tr>
                            <td width="80%" class="purchase_item"><span class="f-fallback">{{description}}</span></td>
                            <td class="purchase_item align-right" width="20%"><span class="f-fallback">{{ currency_symbol }}{{value}}</span></td>
                        </tr>
                    {% endfor %}
                    <tr>
                        <td width="80%" class="purchase_footer" valign="middle">
                            <p class="f-fallback purchase_total purchase_total--label">{{ text.total }}</p>
                        </td>
                        <td width="20%" class="purchase_footer" valign="middle">
                            <p class="f-fallback purchase_total">{{ currency_symbol }}{{total}}</p>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
{% endblock body %}
