{% extends 'timepiece/invoice/base.html' %}
{% load timepiece_tags %}

{% block title %}Invoice Detail{% endblock title %}

{% block crumbs %}
    {{ block.super }}
    <li><span class="divider">/</span> <a href="{% url 'view_invoice' invoice.pk %}">Invoice Detail</a></li>
{% endblock crumbs %}

{% block content %}
    <div class="row-fluid">
        <div class="span12">
            {% include "timepiece/invoice/_subnav.html" with invoice=invoice current="detail" %}
        </div>
    </div>

    <div class="row-fluid">
        <div class="span6">
            {% include 'timepiece/invoice/_invoice.html' %}
        </div>

        <div class="span6">
            {% if billable_totals %}
                <h3>Billable Totals</h3>
                {% with totals=billable_totals %}
                    {% include 'timepiece/invoice/_totals.html' %}
                {% endwith %}
            {% endif %}
            {% if nonbillable_totals %}
                <h3>Non-billable Totals</h3>
                {% with totals=nonbillable_totals %}
                    {% include 'timepiece/invoice/_totals.html' %}
                {% endwith %}
            {% endif %}
        </div>
    </div>
{% endblock content %}
