{% load typogrify_tags %}

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
    <title>Invoice for {{object.title}}</title>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" 
          content="">
<style>
    @page {
        @bottom-left {
            content: "";
        }
    }
</style>
</head>
  {% load static %}
<body id="quote">
    <div class="row">
        <div class="print-box" id="bill-from">
            <h5>Bill From:</h5>
            <p>Scott Gilbertson <br />
            1806 Dover Dr. <br />
            Newport Beach, CA 92660<br />
            706-438-4297</p>
        </div>
        <div class="print-box" id="bill">
            <h4>Invoice {{invoice_number}}</h4>
            <h5>Invoice For: {{object.title}}</h5>
            <h5>Amount Due: ${{total_billed}}</h5>
            <h5>Sent on: {% now "M j, Y"%}</h5>
        </div>
    </div>
    <div class="row">
        <div class="print-box" id="bill-to">
            <h5>Bill To:</h5>
            <p>Enterprise Data Resources, Inc.<br />
            1089 Culpepper Drive <br />
            Conyers, GA 30094 <br />
            707-973-2862</p>
        </div>
    </div>
    </div>
<table class="quote-table" id="items_list">
<thead>
 <caption>Items</caption>
<tr>
<th scope="col"  class="sortable column-status">
   <div class="text">Date</div>
</th>
<th scope="col"  class="sortable column-created_at sorted descending">
   <div class="text">Time</div>
</th>
<th scope="col"  class="sortable column-repair_state">
   <div class="text">Hours</div>
</th>
<th scope="col"  class="sortable column-order_id">
   <div class="text">Tasks</div>
</th>
</tr>
</thead>
<tbody>
    {% for obj in object_list %}
    <tr class="row{{forloop.counter}} {% cycle 'odd' 'even' %}">
        <td class="smfield" data-label="">{{obj.time_start|date:"m/d/y"}}</td>
        <td class="smfield" data-label="Serial" >{{obj.time_start|date:"g:i"}} - {{obj.time_end|date:"g:i"}}</td>
        <td class="smfield" data-label="Serial" >{{obj.rounded_total}}</td>
        <td class="field" data-label="Issue" >{{obj.work_done|capfirst}}</td>
    </tr>
    {%endfor%}
    <tr class="row gap">
    </tr>
    <tr class="row2">
        <td class="field-payment_status"></td>
        <td class="field-pub_date nowrap"></td>
        <th class="field-title">Total Hours:</th>
        <td class="field-status">{{total_hours}}</td>
    </tr> 
    <tr class="row2">
        <td class="field-payment_status"></td>
        <td class="field-pub_date nowrap"></td>
        <th class="field-title">Rate:</th>
        <td class="field-status">$100/hr</td>
    </tr>
    <tr class="row2">
        <td class="field-payment_status"></td>
        <td class="field-pub_date nowrap"></td>
        <th class="field-title total">Total for Invoice:</th>
        <td class="field-status total"><b>${{total_billed}}</b></td>
    </tr>
</tbody>
</table>
<p class="thanks">Thank you for your prompt payment</p>
</body>