<style type="text/css">
/* DOCUMENT CSS */
{% include 'css_document' %}
</style>
{{ # AGREEMENT }}
{% if estimate.requires_agreement? && estimate.agreed_to == false %}
<div class="system_notice">
<h3>
<i>{{ account.company.name }}</i> has specified that this estimate requires agreement by you before work may continue.
</h3>
<div class="content_pad">
<p>
Please read through the terms of agreement and indicate your choice at the bottom of this page.
</p>
</div>
</div>
{% endif %}
<div class="clear"></div>
<h1 id="doc_title" class="left_aligned">
{{ account.company.name }}
</h1>
<div id="company_info" class="right_aligned">
<p>
{% include 'company' for account.company %}
</p>
</div>
<div class="clear"></div>
{{ # DETAILS }}
<div class="document_details">
{{ # LEFT DETAILS }}
<div class="left_aligned">
<table class="formContent">
<tr>
<td style="vertical-align:top;">{{ 'Client' | make_label }}</td>
<td>
{% include 'company' for estimate.company %}
</td>
</tr>
<tr>
<td>{{ 'Project' | make_label }}</td>
<td>{{ estimate.project.name }}</td>
</tr>
<tr>
{{ # INVOICE DATE }}
<td>{{ 'Estimate Date' | make_label }}</td>
<td style="padding-right:10px;">
{{ estimate.created_on | format_date }}
<span class="info noprint">
({{ estimate.created_on | format_date_in_english }})
</span>
</td>
</tr>
</table>
</div>
{{ # RIGHT DETAILS }}
<div class="right_aligned">
<span class="bigger">{{ 'Estimated Cost' | make_label }}</span>
<br/>
<div id="total_amount">
{% if estimate.has_worst_case_items %}
{{ estimate.price_best | format_money }} - {{ estimate.price_worst | format_money }}
{% else %}
{{ estimate.price_best | format_money }}
{% endif %}
</div>
</div>
<div class="clear"></div>
</div>
{{ # INTRO }}
{% if estimate.intro_text != blank %}
<h2>Introduction</h2>
<div class="contentPad">
{{ estimate.intro_text | format_text }}
</div>
{% endif %}
{{ # LINE ITEMS FOR ESTIMATE }}
<table class="list" cellpadding="0" cellspacing="0" id="item_list">
<colgroup>
<col />
<col style="width:250px" />
<col style="width:80px" />
<col style="width:180px" />
</colgroup>
<tr>
<th class="first">Item Description</th>
<th class="numeric">Estimate</th>
<th class="numeric">Tax</th>
<th class="numeric last">Final Price</th>
</tr>
<tbody id="item_list_body">
{% if estimate.line_items == null %}
<tr>
<td colspan="5" class="first last info">No items have been created yet.</td>
</tr>
{% else %}
{{ # LINE ITEM LOOP }}
{% for item in estimate.line_items %}
<tr class="{% cycle 'parent_row': 'even', 'odd' %}">
<td class="first">
{{ item.title }}
{% if item.description != blank %}
<div class="line"></div>
<div class="smaller">
{{ item.description | format_text }}
</div>
{% endif %}
</td>
{{ # ESTIMATES }}
<td class="numeric">
{{ # GENERIC ITEM }}
{% if item.type == 'Generic' %}
{% if item.has_worst_case %}
{{ item.quantity_low }} -
{% endif %}
{{ item.quantity_estimate }} {{ item.unit_label }} @ {{ item.rate | format_money }} ea
{{ % TASK ITEM }}
{% elsif item.type == 'Task' %}
{% if item.has_worst_case %}
{{ item.time_best | format_hours }} -
{% endif %}
{{ item.estimate_time | format_hours }} hours @ {{ item.rate | format_money }} ea
{{ # PRODUCT ITEM }}
{% elsif item.type == 'Product' %}
{{ item.quantity_estimate }} {{ item.unit_label }} @ {{ item.rate | format_money }} ea
{% endif %}
{{ # FLAT FEE }}
{% if item.flat_fee_in_cents > 0 %}
<br/>
{{ item.flat_fee | format_money }} flat fee
{% endif %}
</td>
{{ # TAX }}
<td class="numeric">
{% if item.is_taxable %}
*
{% else %}
{% endif %}
</td>
{{ # TOTAL PRICES }}
{% if item.has_worst_case %}
<td class="money_gain last">
<table cellpadding="0" cellspacing="0" class="inner">
<tr>
<td class="info">Low</td>
<td class="numeric money_gain">
{{ item.price_best | format_money }}
</td>
</tr>
<tr>
<td class="info">High</td>
<td class="numeric money_gain">
{{ item.price_worst | format_money }}
</td>
</tr>
</table>
</td>
{% else %}
<td class="numeric money_gain last">
{{ item.price_best | format_money }}
</td>
{% endif %}
</tr>
{% endfor %}
{% endif %}
</tbody>
{{ # TABLE FOOTER }}
<tbody id="item_list_footer">
{{ # SALES TAX }}
{% if estimate.sales_tax != null %}
<tr class="summary">
<td colspan="4" class="first last numeric">
<b>Tax 1</b> - {{ estimate.sales_tax }}%
</td>
</tr>
{% endif %}
{% if estimate.sales_tax_2 != null %}
<tr class="summary">
<td colspan="4" class="first last numeric">
<b>Tax 2</b> - {{ estimate.sales_tax_2 }}%
</td>
</tr>
{% endif %}
<tr class="footer">
<td class="first numeric">
{% if estimate.has_worst_case_items %}Low<br/>{% endif %}
{% if estimate.has_worst_case_items %}High {% endif %}
</td>
{{ # ESTIMATES }}
<td class="numeric">
Hours -
{% if estimate.has_worst_case_items %}
{{ estimate.time_best | format_hours }}<br/>
{% endif %}
{{ estimate.time_worst | format_hours }}
</td>
{{ # TAXES }}
<td class="numeric">
{% if estimate.has_worst_case_items %}
{{ estimate.tax_cost_total_low | format_money }}<br/>
{% endif %}
{{ estimate.tax_cost_total_high | format_money }}<br/>
</td>
{{ # COSTS }}
<td class="last numeric">
{% if estimate.has_worst_case_items %}
{{ estimate.price_best | format_money }}<br/>
{% endif %}
{{ estimate.price_worst | format_money }}<br/>
</td>
</tr>
</tbody>
</table>
<br/>
{{ # TERMS }}
<h2>Terms of Agreement</h2>
<div class="contentPad">
{% if estimate.agreement_text != blank %}
{{ estimate.agreement_text | format_text }}
{% else %}
<p>
No agreement terms have been set for this estimate.
</p>
{% endif %}
</div>