-
Notifications
You must be signed in to change notification settings - Fork 19
/
delivery_note.html
151 lines (142 loc) · 5.02 KB
/
delivery_note.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<style>
.print-format {
margin-left: 0mm;
margin-right: 0mm;
margin-top: 10mm;
margin-bottom: 60mm;
font-size: 10pt;
}
</style>
{% set company_addresses = frappe.get_list("Dynamic Link", filters={"link_doctype": "Company", "link_name": doc.company, "parenttype": "Address"}, fields=["parent"]) %}
{% set cmp_addr = frappe.get_doc("Address", company_addresses[0]['parent']) %}
{% set company = frappe.get_doc("Company", doc.company) %}
{% set ship_addr = frappe.get_doc("Address", doc.shipping_address_name) %}
<!-- HEAD -->
<div id="header">
<div class="letter-head">
{{ letter_head }}
</div>
</div>
<div class="contact-row">
<div id="address">
<div id="sender">
<p>{{ cmp_addr.address_title }} · {{ cmp_addr.address_line1 }} ·
{% if cmp_addr.address_line2 %}{{ cmp_addr.address_line2 }} <br>{% endif %}
{{ cmp_addr.pincode }} {{ cmp_addr.city }}
{% if cmp_addr.country != ship_addr.country -%}
· {{ cmp_addr.country | upper }}
{%- endif %}
</p>
</div>
{{ doc.customer_name }}<br />
{{ doc.shipping_address }}
</div>
<div id="contact">
<table class="text-small">
<tr>
<td>{{ _("Phone") }}:</td>
<td class="text-right">{{ company.phone_no }}</td>
</tr>
<tr>
<td>{{ _("Email") }}:</td>
<td class="text-right">{{ company.email }}</td>
</tr>
<tr></tr>
<tr>
<td>{{ _("Date") }}:</td>
<td class="text-right">{{ frappe.utils.formatdate(doc.posting_date, "dd. MMMM yyyy") }}</td>
</tr>
{% if doc.po_no %}
<tr>
<td>Ihre Bestellnummer:</td>
<td class="text-right">{{ doc.po_no }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div id="faltmarke-1" class="din-mark"></div>
<div id="lochmarke" class="din-mark"></div>
<div id="faltmarke-2" class="din-mark"></div>
<!-- CONTENT -->
<div id="text">
<div id="subject">
<strong>Lieferschein {{ doc.name }}</strong>
</div>
<div class="salutation">
{% if frappe.form_dict.get("_lang", doc.language) == "de" %}
<p>Wir bedanken uns für die gute Zusammenarbeit und liefern Ihnen vereinbarungsgemäß folgende Waren:</p>
{% else %}
<p>We thank you for the good cooperation and deliver the following goods as agreed:</p>
{% endif %}
</div>
<br>
<br>
<table class="w-100 text-small">
<thead class="black-border">
<tr>
<th style="width: 10%">{{ _("Sr") }}</th>
<th style="width: 70%">
{{ _("Description") }}</th>
<th style="width: 10%">{{ _("Unit") if not print_settings.print_uom_after_quantity else ' '}}</th>
<th style="width: 10%">{{ _("Qty") }}</th>
</tr>
</thead>
<tbody>
{% for n in doc.items %}
<tr>
<td>{{ loop.index }}</td>
<td>
<b>{{ _(n.item_name) }}</b><br>
{{ n.description | striptags }}<br>
{% if n.against_sales_order %}
Auftrag: {{ n.against_sales_order }}<br>
{% endif %}
{% if n.against_sales_invoice %}
Rechnung: {{ n.against_sales_invoice }}<br>
{% endif %}
{% if n.batch_no %}
Charge: {{ n.batch_no }}<br>
{% endif %}
{% if n.serial_no %}
Seriennummern: {{ n.serial_no }}
{% endif %}
</td>
<td>{{ _(n.uom) if not print_settings.print_uom_after_quantity else ' '}}</td>
<td>
{{ n.get_formatted("qty") }}
{% if print_settings.print_uom_after_quantity %}
{{ _(n.uom) }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<br>
<div class="epilogue">
{% if doc.terms %}
<div class="terms">
{{ doc.terms }}
</div>
<br>
{% endif %}
<div class="salutation">
{% if frappe.form_dict.get("_lang", doc.language) == "de" -%}
<p>Dieses Formular wurde maschinell erstellt und ist ohne Unterschrift gültig.</p>
{% else %}
<p>This form was created automatically and is valid without a signature.</p>
{%- endif %}
</div>
</div>
<br>
</div>
<!-- FOOTER -->
<div id="footer-html" class="visible-pdf">
<p id="pagenum">
{{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}
</p>
<div class="print-format-footer">
{{ footer }}
</div>
</div>