{% load creme_core_tags persons_tags %}
{% with currency=object.currency source=object.source %}
{{object.entity_type}}
{% block title %}{{object.entity_type}}{% endblock %}
{% block address_from %}
{{object.source}}
{% with source_address=source.billing_address %}{% if source_address %}{{source_address|persons_pretty_address|linebreaksbr}}{% if source_address.country %} {{source_address.country}}{% endif %}{% endif %}{% endwith %}
{% endblock %}
{% block address_to %}
{{object.target}}
{% with billing_address=object.billing_address %}{% if billing_address %}{{billing_address|persons_pretty_address|linebreaksbr}}{% if billing_address.country %} {{billing_address.country}}{% endif %}{% endif %}{% endwith %}
{% endblock %}
{% block information %}
Numéro
{{object.number|default:'Numéro non généré'}}
Date
{{object.issuing_date|date:'d-m-Y'}}
Réglement
{{object.payment_type|default:'À 30 jours'}}
{% if object.buyers_order_number %}
Bon de commande acheteur
{{object.buyers_order_number}}
{% endif %}
{% if source.siret %}
SIRET
{{source.siret}}
{% endif %}
{% if source.naf %}
NAF
{{source.naf}}
{% endif %}
{% if source.rcs %}
RCS
{{source.rcs}}
{% endif %}
{% if source.tvaintra %}
N° TVA
{{source.tvaintra}}
{% endif %}
{% endblock %}
{% block lines_head %}
Description
Prix unitaire (HT)
Quantité
Montant HT
{% endblock %}
{% block lines_body %}
{% for line in object.iter_all_lines %}
{{line.related_item|default:line.on_the_fly_item}}
{{line.unit_price|format_amount:currency}}
{{line.quantity}}
{{line.get_raw_price|format_amount:currency}}
{% endfor %}
{% endblock %}
{% block total %}
{% block total_head %}
Total HT
TVA
TTC
{% endblock %}
{% block total_body %}
{{object.total_no_vat|format_amount:currency}}
{{object.total_vat|sub:object.total_no_vat|format_amount:currency}}
{{object.total_vat|format_amount:currency}}
{% endblock %}
{% endblock %}
{% block payment %}
{% with pinfo=object.payment_info %}
{% if pinfo %}
Vous pouvez régler par chéque ou par virement bancaire sur le compte suivant :
Banque {{pinfo.bank_code|default:'—'}}
Guichet {{pinfo.counter_code|default:'—'}}
N° de Compte {{pinfo.account_number|default:'—'}}
Clé RIB {{pinfo.rib_key|default:'—'}}
Domiciliation {{pinfo.banking_domiciliation|default:'—'}}
{% endif %}
{% endwith %}
{% endblock %}
{% endwith %}