blob: 3e24a50f3046ef1ccf91a2ecca9b880a2a95a59d [file] [log] [blame]
Rushabh Mehtabed19ac2013-03-21 17:12:25 +05301{%- if doc.letter_head -%}
2 {{ webnotes.conn.get_value("Letter Head", doc.letter_head, "content") }}
3{%- endif -%}
4<!-- Page Layout Settings -->
5<div class='common page-header'>
6 <table class='header-table' cellspacing=0>
7 <thead>
8 <tr><td colspan="2"><h1>{{ doc.select_print_heading or 'Invoice' }}</h1></td></tr>
9 <tr><td colspan="2"><h3>{{ doc.name }}</h3></td></tr>
10 </thead>
11 <tbody>
12 <tr>
13 <td width=60%><table width=100% cellspacing=0><tbody>
14 <tr>
15 <td width=39%><b>Name</b></td>
16 <td>{{ doc.customer_name }}</td>
17 </tr>
18 <tr>
19 <td><b>Address</b></td>
20 <td>{{ doc.address_display.replace("\n", "<br>") }}</td>
21 </tr>
22 <tr>
23 <td><b>Contact</b></td>
24 <td>{{ doc.contact_display }}</td>
25 </tr>
26 </tbody></table></td>
27 <td><table width=100% cellspacing=0><tbody>
28 <tr>
29 <td width=40%><b>Invoice Date</b></td>
30 <td>{{ utils.formatdate(doc.posting_date) }}</td>
31 <tr>
32 {%- if doc.convert_into_recurring_invoice and doc.recurring_id -%}
33 <tr>
34 <td width=40%><b>Invoice Period</b></td>
35 <td>{{ (utils.formatdate(doc.invoice_period_from_date)) +
36 ' to ' + utils.formatdate(doc.invoice_period_to_date) }}</td>
37 <tr>
38 {%- endif -%}
39 <tr>
40 <td><b>Due Date</b></td>
41 <td>{{ utils.formatdate(doc.due_date) }}</td>
42 <tr>
43 </tbody></table></td>
44 </tr>
45 </tbody>
46 <tfoot>
47
48 </tfoot>
49 </table>
50</div>
51<div class='common page-body'>
52 <!--
53 Page Body will contain
54 + table 2
55 - Sales Invoice Data
56 -->
57 <table class="table table-bordered">
58 <tbody>
59 <tr>
60 <th>Sr</th>
61 <th>Item Name</th>
62 <th>Description</th>
63 <th>Qty</th>
64 <th>UoM</th>
65 <th>Basic Rate</th>
66 <th>Amount</th>
67 </tr>
68 {%- for row in doclist.get({"doctype":"Sales Invoice Item"}) %}
69 <tr>
70 <td style="width: 3%;">{{ row.idx }}</td>
71 <td style="width: 20%;">{{ row.item_name }}</td>
72 <td style="width: 37%;">{{ row.description }}</td>
73 <td style="width: 5%;">{{ row.qty }}</td>
74 <td style="width: 5%;">{{ row.stock_uom }}</td>
75 <td style="width: 15%;">{{ utils.fmt_money(row.export_rate) }}</td>
76 <td style="width: 15%;">{{ utils.fmt_money(row.export_amount) }}</td>
77 </tr>
78 {% endfor -%}
79 </tbody>
80 </table>
81</div>
82<div class='common page-footer'>
83 <!--
84 Page Footer will contain
85 + table 3
86 - Terms and Conditions
87 - Total Rounded Amount Calculation
88 - Total Rounded Amount in Words
89 -->
90 <table class='footer-table' width=100% cellspacing=0>
91 <thead>
92
93 </thead>
94 <tbody>
95 <tr>
96 <td width=60% style='padding-right: 10px;'>
97 <b>Terms, Conditions &amp; Other Information:</b><br />
98 {{ doc.terms }}
99 </td>
100 <td>
101 <table cellspacing=0 width=100%><tbody>
102 <tr>
103 <td>Net Total</td>
104 <td></td>
105 <td width=38%>{{
106 utils.fmt_money(doc.net_total/doc.conversion_rate)
107 }}</td>
108 </tr>
109 {%- for charge in doclist.get({"doctype":"Sales Taxes and Charges"}) -%}
110 {%- if not charge.included_in_print_rate -%}
111 <tr>
112 <td>{{ charge.description }}</td>
113 <td></td>
114 <td>{{ utils.fmt_money(charge.tax_amount / doc.conversion_rate) }}</td>
115 </tr>
116 {%- endif -%}
117 {%- endfor -%}
118 <tr>
119 <td>Grand Total</td>
120 <td></td>
121 <td>{{ utils.fmt_money(doc.grand_total_export) }}</td>
122 </tr>
123 <tr style='font-weight: bold'>
124 <td>Rounded Total</td>
125 <td>{{ doc.currency }}</td>
126 <td>{{ utils.fmt_money(doc.rounded_total_export) }}</td>
127 </tr>
128 </tbody></table>
129 <br /><b>In Words</b><br />
130 <i>{{ doc.in_words_export }}</i>
131 </td>
132 </tr>
133 </tbody>
134 <tfoot>
135 </tfoot>
136 </table>
137</div>