blob: bdb7a018369f612751d44447977c5ab72012df8e [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>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +053073 <td style="width: 5%; text-align: right;">{{ row.qty }}</td>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +053074 <td style="width: 5%;">{{ row.stock_uom }}</td>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +053075 <td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.export_rate, currency=doc.currency) }}</td>
76 <td style="width: 15%; text-align: right;">{{ utils.fmt_money(row.export_amount, currency=doc.currency) }}</td>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +053077 </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>
Rushabh Mehtada512ba2013-03-22 12:45:44 +0530101 <table cellspacing=0 width=100%>
102 <tbody>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530103 <tr>
104 <td>Net Total</td>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +0530105 <td width=40% style="text-align: right;">{{
Anand Doshi535d8332013-07-19 13:51:07 +0530106 utils.fmt_money(doc.net_total_export, currency=doc.currency)
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530107 }}</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>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +0530113 <td style="text-align: right;">{{ utils.fmt_money(charge.tax_amount / doc.conversion_rate, currency=doc.currency) }}</td>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530114 </tr>
115 {%- endif -%}
116 {%- endfor -%}
117 <tr>
118 <td>Grand Total</td>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +0530119 <td style="text-align: right;">{{ utils.fmt_money(doc.grand_total_export, currency=doc.currency) }}</td>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530120 </tr>
121 <tr style='font-weight: bold'>
122 <td>Rounded Total</td>
Rushabh Mehtaaf578d72013-03-21 17:40:08 +0530123 <td style="text-align: right;">{{ utils.fmt_money(doc.rounded_total_export, currency=doc.currency) }}</td>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530124 </tr>
Rushabh Mehtada512ba2013-03-22 12:45:44 +0530125 </tbody>
126 </table>
Rushabh Mehtabed19ac2013-03-21 17:12:25 +0530127 <br /><b>In Words</b><br />
128 <i>{{ doc.in_words_export }}</i>
129 </td>
130 </tr>
131 </tbody>
132 <tfoot>
133 </tfoot>
134 </table>
135</div>