<commit_before>{% extends 'print-base.html' %}
{% set body_class = "person-detail" %}
{% set page_content = "Donor Letter" %}

{% macro print_field(label, value) -%}
    <div class="field-label">{{ label }}</div>
    <div class="field-value">{{ value or 'N/A' }}</div>
{%- endmacro %}


{% block page_content %}
<style>
    .align-right { text-align: right; }
    .align-center { text-align: center; }
    .invoice-header {
        margin-bottom: .5em;
    }
    .heading {
        font-size: 2.1em;
    }
    .uppercase {
        text-transform: uppercase;
    }
    .title {
        text-transform: uppercase;
        font-size: 4em;
        border-bottom: 1px solid #000;
        padding-top: .5em;
        padding-bottom: .5em;
    }
    .itg-stamp {
        float: right;
        right: 0;
        width: 380px;
        text-align: center;
        font-size: .85em;
    }
    .itg-stamp .box {
        padding: .5em;
        border: 1px solid #000;
        margin-bottom: .5em;
    }
    .founder-acarya {
        margin-bottom: .8em;
    }
    .temporary-receipt {
        margin-top: -.3em;
        font-size: 1.5em;
    }
    .item {
        margin-bottom: .4em;
    }
    .item-name, .item-value {
        font-size: 1.4em;
        margin-bottom: .4em;
    }
    .item-name {
        font-size: 1.3em;
    }
    .item-name {
        color: #888;
    }
    .item-value {
        /* font-weight: 700; */
        font-family: 'PT Sans', sans-serif;
    }
    .col-custom-2-5 {
        width:20%
    }
    .footer {
        position: absolute;
        top: 36.8em;
        width:100%;
    }
    .footer-line {
        margin-top: 1em;
        border-top: 1px solid #000;
        padding-top: 1em;
    }
    .footer-title {
        width: 600px;
        font-size: 2em;
        border-bottom: 1px solid #000;
        padding-bottom: .3em;
        margin: 0 auto .3em;
    }
</style>

<div class="row">
    <div class="col-xs-12 invoice-header align-center title">
        Donor Letter

{% markdown %}
{% endmarkdown %}
    </div>

    <div class="col-xs-12" style="margin-top: 1em;margin-bottom: 1em;">
        <div class="row">
            <div class="col-xs-8 item-name">To,<br/>ISK<NAME><br/>NADIA, WB</div>
            <div class="col-xs-4 align-right item">
                <span class="item-name">Date: </span>
                <span class="item-value">{{ now() }}</span>
            </div>
            <div class="col-xs-12 align-center uppercase">To whom it may concern</div>
        </div>
    </div>
    <div class="col-xs-12 item">
        <span class="item-name">This is to declare that the amount </span>
        <span class="item-value">
            {{ object.amount }} {{ object.currency }}
        </span>
    </div>
    <div class="col-xs-12 item">
        <span class="item-name">In words: </span>
        <span class="item-value">
            {{ object.amount|num2words }} {{ object.currency_words}}
        </span>
    </div>

    <div class="col-xs-12 item item-name">
        <p>is a Donation for International Society for Krishna Consciousness (ISKCON) Mayapur, Nadia.</p>
        <p>We wish you continued success in your charitable work.</p>
        <p>Sincerely yours,</p>
        <p><br/>Donor Signature<br/><br/></p>
    </div>

    <div class="col-xs-3 item-name">Donor Name:</div>
    <div class="col-xs-9 item-value">
        {% if object.overwrite_address %}
            {% if object.overwrite_name %}
                {{ object.overwrite_name }}
            {% elif object.person.initiated_name %}
                {{ object.person.initiated_name }}
            {% else %}
                {{ object.person.name }}
            {% endif %}
        {% else %}
            {{ object.person.name }}
        {% endif %}
    </div>

    <div class="col-xs-3 item-name">Address:</div>
    <div class="col-xs-9 item-value">
        {% if object.overwrite_address %}
            {{ object.overwrite_address }}
        {% else %}
            {% for line in object.person.full_address() %}
            {{ line }}{% if not loop.last %}, {% endif %}
            {% endfor %}
        {% endif %}
    </div>

    {% if object.person.email %}
    <div class="col-xs-3 item-name">Email:</div>
    <div class="col-xs-9 item-value">{{ object.person.email }}</div>
    {% endif %}

<div class="row">
    <div class="col-xs-12">
        {% if object.person.pan_card_number %}
        <div class="col-xs-3 item-name">Pan Card No.:</div>
        <div class="col-xs-3 item-value">{{ object.person.pan_card_number }}</div>
        {% endif %}
    </div>
</div>
        {% if object.person.phone_number %}
        <div class="col-xs-3 item-name">Phone Number:</div>
        <div class="col-xs-9 item-value">{{ object.person.phone_number }}</div>
        {% endif %}
    <div class="col-xs-3 item-name">Payment Method:</div>
    <div class="col-xs-9 item-value">
        {{ object.get_payment_method_display() }}
    </div><commit_msg>Getting person from associated pledge.<commit_after>{% extends 'print-base.html' %}
{% set body_class = "person-detail" %}
{% set page_content = "Donor Letter" %}

{% macro print_field(label, value) -%}
    <div class="field-label">{{ label }}</div>
    <div class="field-value">{{ value or 'N/A' }}</div>
{%- endmacro %}


{% block page_content %}
<style>
    .align-right { text-align: right; }
    .align-center { text-align: center; }
    .invoice-header {
        margin-bottom: .5em;
    }
    .heading {
        font-size: 2.1em;
    }
    .uppercase {
        text-transform: uppercase;
    }
    .title {
        text-transform: uppercase;
        font-size: 4em;
        border-bottom: 1px solid #000;
        padding-top: .5em;
        padding-bottom: .5em;
    }
    .itg-stamp {
        float: right;
        right: 0;
        width: 380px;
        text-align: center;
        font-size: .85em;
    }
    .itg-stamp .box {
        padding: .5em;
        border: 1px solid #000;
        margin-bottom: .5em;
    }
    .founder-acarya {
        margin-bottom: .8em;
    }
    .temporary-receipt {
        margin-top: -.3em;
        font-size: 1.5em;
    }
    .item {
        margin-bottom: .4em;
    }
    .item-name, .item-value {
        font-size: 1.4em;
        margin-bottom: .4em;
    }
    .item-name {
        font-size: 1.3em;
    }
    .item-name {
        color: #888;
    }
    .item-value {
        /* font-weight: 700; */
        font-family: 'PT Sans', sans-serif;
    }
    .col-custom-2-5 {
        width:20%
    }
    .footer {
        position: absolute;
        top: 36.8em;
        width:100%;
    }
    .footer-line {
        margin-top: 1em;
        border-top: 1px solid #000;
        padding-top: 1em;
    }
    .footer-title {
        width: 600px;
        font-size: 2em;
        border-bottom: 1px solid #000;
        padding-bottom: .3em;
        margin: 0 auto .3em;
    }
</style>

<div class="row">
    <div class="col-xs-12 invoice-header align-center title">
        Donor Letter

{% markdown %}
{% endmarkdown %}
    </div>

    <div class="col-xs-12" style="margin-top: 1em;margin-bottom: 1em;">
        <div class="row">
            <div class="col-xs-8 item-name">To,<br/>ISKCON MAYAPUR<br/>NADIA, WB</div>
            <div class="col-xs-4 align-right item">
                <span class="item-name">Date: </span>
                <span class="item-value">{{ now() }}</span>
            </div>
            <div class="col-xs-12 align-center uppercase">To whom it may concern</div>
        </div>
    </div>
    <div class="col-xs-12 item">
        <span class="item-name">This is to declare that the amount </span>
        <span class="item-value">
            {{ object.amount }} {{ object.currency }}
        </span>
    </div>
    <div class="col-xs-12 item">
        <span class="item-name">In words: </span>
        <span class="item-value">
            {{ object.amount|num2words }} {{ object.currency_words}}
        </span>
    </div>

    <div class="col-xs-12 item item-name">
        <p>is a Donation for International Society for Krishna Consciousness (ISKCON) Mayapur, Nadia.</p>
        <p>We wish you continued success in your charitable work.</p>
        <p>Sincerely yours,</p>
        <p><br/>Donor Signature<br/><br/></p>
    </div>

    <div class="col-xs-3 item-name">Donor Name:</div>
    <div class="col-xs-9 item-value">
        {% if object.overwrite_address %}
            {% if object.overwrite_name %}
                {{ object.overwrite_name }}
            {% elif object.pledge.person.initiated_name %}
                {{ object.pledge.person.initiated_name }}
            {% else %}
                {{ object.pledge.person.name }}
            {% endif %}
        {% else %}
            {{ object.pledge.person.name }}
        {% endif %}
    </div>

    <div class="col-xs-3 item-name">Address:</div>
    <div class="col-xs-9 item-value">
        {% if object.overwrite_address %}
            {{ object.overwrite_address }}
        {% else %}
            {% for line in object.pledge.person.full_address() %}
            {{ line }}{% if not loop.last %}, {% endif %}
            {% endfor %}
        {% endif %}
    </div>

    {% if object.pledge.person.email %}
    <div class="col-xs-3 item-name">Email:</div>
    <div class="col-xs-9 item-value">{{ object.pledge.person.email }}</div>
    {% endif %}

<div class="row">
    <div class="col-xs-12">
        {% if object.pledge.person.pan_card_number %}
        <div class="col-xs-3 item-name">Pan Card No.:</div>
        <div class="col-xs-3 item-value">{{ object.pledge.person.pan_card_number }}</div>
        {% endif %}
    </div>
</div>
        {% if object.pledge.person.phone_number %}
        <div class="col-xs-3 item-name">Phone Number:</div>
        <div class="col-xs-9 item-value">{{ object.pledge.person.phone_number }}</div>
        {% endif %}
    <div class="col-xs-3 item-name">Payment Method:</div>
    <div class="col-xs-9 item-value">
        {{ object.get_payment_method_display() }}
    </div>
{'fraction_non_alphanumeric': 0.17102232902773606, 'fraction_numerical': 0.01922499249023731, 'mean_word_length': 1.8439635535307517, 'pattern_counts': {'":': 0, '<': 160, '<?xml version=': 0, '>': 160, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4230433', 'n_tokens_mistral': 3592, 'n_tokens_neox': 3320, 'n_words': 684}