-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathdespatch.html.twig
More file actions
220 lines (220 loc) · 11.4 KB
/
despatch.html.twig
File metadata and controls
220 lines (220 loc) · 11.4 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
{% include 'assets/style.css' %}td{padding: 3px;}
</style>
</head>
<body class="white-bg">
{% set cp = doc.company %}
{% set name = doc.tipoDoc|catalog('01') %}
<table width="100%">
<tbody><tr>
<td style="padding:30px; !important">
<table width="100%" height="200px" border="0" aling="center" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="50%" height="90" align="center">
<span><img src="{{ params.system.logo|image_b64 }}" height="80" style="text-align:center" border="0"></span>
</td>
<td width="5%" height="40" align="center"></td>
<td width="45%" rowspan="2" valign="bottom" style="padding-left:0">
<div class="tabla_borde">
<table width="100%" border="0" height="200" cellpadding="6" cellspacing="0">
<tbody><tr>
<td align="center">
<span style="font-family:Tahoma, Geneva, sans-serif; font-size:29px" text-align="center">{{ name }}</span>
<br>
<span style="font-family:Tahoma, Geneva, sans-serif; font-size:19px" text-align="center">E L E C T R Ó N I C A</span>
</td>
</tr>
<tr>
<td align="center">
<span style="font-size:15px" text-align="center">R.U.C.: {{ cp.ruc }}</span>
</td>
</tr>
<tr>
<td align="center">
<span style="font-size:24px">{{ doc.serie }}-{{ doc.correlativo }}</span>
</td>
</tr>
</tbody></table>
</div>
</td>
</tr>
<tr>
<td valign="bottom" style="padding-left:0">
<div class="tabla_borde">
<table width="96%" height="100%" border="0" border-radius="" cellpadding="9" cellspacing="0">
<tbody><tr>
<td align="center">
<strong><span style="font-size:15px">{{ cp.razonSocial }}</span></strong>
</td>
</tr>
<tr>
<td align="left">
<strong>Dirección: </strong>{{ cp.address.direccion }}
</td>
</tr>
<tr>
<td align="left">
{{ params.user.header|raw }}
</td>
</tr>
</tbody></table>
</div>
</td>
</tr>
</tbody></table>
<br>
<div class="tabla_borde">
{% set cl = doc.destinatario %}
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td colspan="2">DESTINATARIO</td>
</tr>
<tr class="border_top">
<td width="60%" align="left"><strong>Razón Social:</strong> {{ cl.rznSocial }}</td>
<td width="40%" align="left"><strong>{{ cl.tipoDoc|catalog('06') }}:</strong> {{ cl.numDoc }}</td>
</tr>
<tr>
<td width="40%" align="left" colspan="2"><strong>Dirección:</strong> {% if cl.address %}{{ cl.address.direccion }}{% endif %}</td>
</tr>
</tbody></table>
</div><br>
<div class="tabla_borde">
{% set cl = doc.destinatario %}
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td colspan="2">ENVIO</td>
</tr>
<tr class="border_top">
<td width="60%" align="left">
<strong>Fecha Emisión:</strong> {{ doc.fechaEmision|date('d/m/Y') }}
</td>
<td width="40%" align="left"><strong>Fecha Inicio de Traslado:</strong> {{ doc.envio.fecTraslado|date('d/m/Y') }} </td>
</tr>
<tr>
<td width="60%" align="left"><strong>Motivo Traslado:</strong> {{ doc.envio.codTraslado|catalog('20') }} </td>
<td width="40%" align="left"><strong>Modalidad de Transporte:</strong> {{ doc.envio.modTraslado|catalog('18') }} </td>
</tr>
<tr>
<td width="60%" align="left"><strong>Peso Bruto Total ({{ doc.envio.undPesoTotal }}):</strong> {{ doc.envio.pesoTotal }} </td>
<td width="40%">{% if doc.envio.numBultos %}<strong>Número de Bultos:</strong> {{ doc.envio.numBultos }}{% endif %}</td>
</tr>
<tr>
<td width="60%" align="left"><strong>P. Partida:</strong> {{ doc.envio.partida.ubigueo }} - {{ doc.envio.partida.direccion }}</td>
<td width="40%" align="left"><strong>P. Llegada: </strong> {{ doc.envio.llegada.ubigueo }} - {{ doc.envio.llegada.direccion }}</td>
</tr>
</tbody></table>
</div><br>
{% set transportista = doc.envio.transportista %}
{% set vehiculo = doc.envio.vehiculo %}
{% set choferes = doc.envio.choferes %}
{% set indicadores = doc.envio.indicadores %}
<div class="tabla_borde">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td colspan="2">TRANSPORTE</td>
</tr>
{% if transportista %}
<tr class="border_top">
<td width="60%" align="left"><strong>Razón Social:</strong> {{ transportista.rznSocial }}</td>
<td width="40%" align="left"><strong>{{ transportista.tipoDoc|catalog('06') }}:</strong> {{ transportista.numDoc }}</td>
</tr>
{% endif %}
{% if vehiculo or choferes %}
<tr>
<td width="60%" align="left">
<strong>Vehículo principal:</strong> {{ vehiculo.placa }}
{% for secundario in vehiculo.secundarios %}
<br>
<strong>Vehículo secundario:</strong> {{ secundario.placa }}
{% endfor %}
</td>
<td width="40%" align="left">
{% for chofer in choferes %}
<strong>Conductor {{chofer.tipo}}:</strong> {{ chofer.tipoDoc|catalog('06') }} {{ chofer.nroDoc }} - {{ chofer.nombres }} {{ chofer.apellidos }}
{% if not loop.last %}
<br>
{% endif %}
{% endfor %}
</td>
</tr>
{% endif %}
</tbody></table>
</div><br>
<div class="tabla_borde">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td align="center" class="bold">Item</td>
<td align="center" class="bold">Código</td>
<td align="center" class="bold" width="300px">Descripción</td>
<td align="center" class="bold">Unidad</td>
<td align="center" class="bold">Cantidad</td>
</tr>
{% for det in doc.details %}
<tr class="border_top">
<td align="center">{{ loop.index }}</td>
<td align="center">{{ det.codigo }}</td>
<td align="center">{{ det.descripcion }}</td>
<td align="center">{{ det.unidad }}</td>
<td align="center">{{ det.cantidad }}</td>
</tr>
{% endfor %}
</tbody>
</table></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="50%" valign="top">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td colspan="4">
{% if doc.observacion %}
<br><br>
<span style="font-family:Tahoma, Geneva, sans-serif; font-size:12px" text-align="center"><strong>Observaciones</strong></span>
<br>
<p>{{ doc.observacion }}</p>
{% endif %}
</td>
</tr>
</tbody>
</table>
</td>
<td width="50%" valign="top"></td>
</tr>
</tbody></table>
{% if max_items is defined and doc.details|length > max_items %}
<div style="page-break-after:always;"></div>
{% endif %}
<div>
<table>
<tbody>
<tr>
<td width="85%">
<blockquote>
{% if params.user.footer is defined %}
{{ params.user.footer|raw }}
{% endif %}
{% if params.system.hash is defined and params.system.hash%}
<strong>Resumen:</strong> {{ params.system.hash }}<br>
{% endif %}
<span>Representación Impresa de la {{ name }} ELECTRÓNICA.</span>
</blockquote>
</td>
<td width="15%" align="right">
{% if params.system.qr is defined %}
<img src="{{ qrUrl(params.system.qr)|image_b64('svg+xml') }}" alt="Qr Image">
{% endif %}
</td>
</tr>
</tbody></table>
</div>
</td>
</tr>
</tbody></table>
</body></html>