{% extends "base.html" %} {% from "_macros.html" import state_badge, attachments_card with context %} {% block title %}{{ lc.number }}{% endblock %} {% block content %} {% set cur = branch.currency %}
{{ t('Landed Costs') }}

{{ lc.number }} {{ state_badge('posted' if lc.state == 'done' else 'draft') }}

{% if lc.move_id %}{{ t('Journal Entry') }}{% endif %} {% if can_write and lc.state == 'draft' %} {{ t('Edit') }}
{% endif %}
{{ t('Branch') }}
{{ branch.code }} — {{ nm(branch) }}
{{ t('Date') }}
{{ lc.date }}
{{ t('Split by') }}
{{ t('Value') if lc.method == 'value' else t('Quantity') }}
{{ t('Amount') }}
{{ lc.amount|money(cur) }}
{{ t('Receipts') }}
{% for r in receipts %}{{ r.number }}{{ ', ' if not loop.last }}{% endfor %}
{% if lc.notes %}
{{ t('Notes') }}
{{ lc.notes }}
{% endif %}

{{ t('Charges') }}

{% for c in charges %}{% endfor %}
{{ t('Description') }}{{ t('Account') }}{{ t('Amount') }} ({{ cur }})
{{ c.description or '' }}{{ c.code }} {{ nm(c) }}{{ c.amount|money(cur) }}
{% if lines %}

{{ t('Allocation') }}

{% for l in lines %} {% endfor %}
{{ t('Receipt') }}{{ t('Product') }}{{ t('Quantity') }}{{ t('Receipt value') }} {{ t('Landed cost') }}{{ t('Added to stock') }}{{ t('To cost of goods sold') }}
{{ l.number }}{{ l.code or '' }} {{ nm(l) }}{{ '%g' % l.quantity }} {{ l.uom or '' }} {{ l.base_value|money(cur) }}{{ l.amount|money(cur) }} {{ l.to_stock|money(cur) }}{{ (l.amount - l.to_stock)|money(cur) }}
{% endif %} {{ attachments_card('landed_cost', lc.id) }} {% endblock %}