{% extends "base.html" %} {% from "_macros.html" import wf_badge, export_links with context %} {% block title %}{{ p.code }}{% endblock %} {% block content %} {% set cur = p.currency %} {% set stcls = {'active': 'posted', 'on_hold': 'warn', 'closed': 'cancelled'} %} {% macro meter(pct) %}{% if pct is not none %}
| {{ t('Account') }} | {{ t('Description') }} | {{ t('Budget') }} | {{ t('Committed') }} | {{ t('Actual cost') }} | {{ t('Remaining') }} | {{ t('Used') }} |
|---|---|---|---|---|---|---|
| {% if r.unbudgeted %}{{ t(r.name_en) }}{% else %}{{ r.code }} {{ nm(r) }}{% endif %} | {{ r.description or '' }} | {{ r.budget|money(cur, True) }} | {{ r.committed|money(cur, True) }} | {{ r.actual|money(cur, True) }} | {{ r.remaining|money(cur) }} | {{ meter(r.used_pct) }}{% if r.used_pct is not none %}{{ r.used_pct }}%{% endif %} |
| {{ t('No budget yet.') }} {% if can_write %}{{ t('Add budget lines') }}{% endif %} | ||||||
| {{ t('Total') }} | {{ rep.total.budget|money(cur) }} | {{ rep.total.committed|money(cur) }} | {{ rep.total.actual|money(cur) }} | {{ rep.total.remaining|money(cur) }} | {{ meter(rep.total.used_pct) }}{% if rep.total.used_pct is not none %}{{ rep.total.used_pct }}%{% endif %} | |
{{ t('Committed = confirmed purchase orders not yet billed. Actual = costs posted to the project’s cost centre. Remaining = Budget − Committed − Actual.') }} {{ t('Budget control') }}: {{ t(controls[p.budget_control]) }}.
| {{ t('Milestone') }} | {{ t('Due date') }} | {{ t('Amount') }} | {{ t('Retention') }} | {{ t('Status') }} | |
|---|---|---|---|---|---|
| {{ m.name }} | {{ m.due_date or '' }}{% if m.due_date and m.due_date < today and not m.billed %} {{ t('Due') }}{% endif %} | {{ m.amount|money(cur) }} | {{ ((m.amount * (p.retention_pct or 0) / 100)|round|int)|money(cur, True) }} | {% if m.billed %}{{ t('Invoiced') }} {{ m.inv.number or t('Draft') }} {% elif m.state in ('done', 'invoiced') %}{{ t('Completed — to bill') }}{% else %}{{ t('Planned') }}{% endif %} | {% if can_write and not m.billed and p.state != 'closed' %} {% if m.state == 'planned' %}{% endif %} {% endif %} |
| {{ t('No milestones yet.') }} | |||||
| {{ t('Material Request') }} | {{ d.number }} | {{ d.date }} | {{ wf_badge(d.state) }} | |
| {{ t('Purchase Requisition') }} | {{ d.number }} | {{ d.date }} | {{ wf_badge(d.state) }} | |
| RFQ | {{ d.number }} | {{ d.date }} | {{ wf_badge(d.state) }} | |
| {{ t('Purchase Order') if d.kind == 'purchase' else t('Sales Order') }} | {{ d.number }} {{ nm({'name_en': d.name_en, 'name_ar': d.name_ar}) }} | {{ d.date }} | {{ t(d.state.replace('_', ' ').capitalize()) }} | {{ d.amount_untaxed|money(cur) }} |
| {{ t('Nothing yet.') }} |
| {{ t({'out_invoice': 'Customer Invoice', 'out_refund': 'Customer Credit Note', 'in_invoice': 'Vendor Bill', 'in_refund': 'Vendor Refund'}[d.kind]) }}{% if d.project_billing %} {{ t('Progress invoice') if d.project_billing == 'progress' else t('Retention release') }}{% endif %} |
{{ d.number or t('Draft') }} {{ nm({'name_en': d.name_en, 'name_ar': d.name_ar}) }} | {{ d.date }} | {{ t(d.state.capitalize()) }} | {{ d.amount_total|money(cur) }} |
| {{ t('Nothing yet.') }} |
{{ t('Site address') }}: {{ p.site_address }}
{% endif %} {% if p.notes %}{{ p.notes }}
{% endif %}| {{ t('Production order') }} | {{ t('Product') }} | {{ t('Quantity') }} | {{ t('Status') }} |
|---|---|---|---|
| {{ m.number }} | {{ nm(m) }} | {{ '%g' % (m.qty_produced if m.state == 'done' else m.quantity) }} | {{ t(m.state|replace('_', ' ')|capitalize) }} |