@zentto/report-core 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1622 @@
1
+ // @zentto/report-core — Complete report template gallery
2
+ //
3
+ // Every template is a production-ready ReportLayout with realistic sample data.
4
+ // Portable across web designer and desktop (Electron / Tauri) without changes.
5
+ // =====================================================================
6
+ // 1. INVOICE — Factura de Venta
7
+ // =====================================================================
8
+ const INVOICE_LAYOUT = {
9
+ version: '1.0',
10
+ name: 'Factura de Venta',
11
+ description: 'Factura con detalle de productos, impuestos y totales',
12
+ pageSize: { width: 210, height: 297, unit: 'mm' },
13
+ margins: { top: 15, right: 10, bottom: 15, left: 10 },
14
+ orientation: 'portrait',
15
+ dataSources: [
16
+ {
17
+ id: 'header', name: 'Encabezado', type: 'object',
18
+ fields: [
19
+ { name: 'invoiceNumber', label: 'N# Factura', type: 'string' },
20
+ { name: 'date', label: 'Fecha', type: 'date' },
21
+ { name: 'dueDate', label: 'Fecha Vencimiento', type: 'date' },
22
+ { name: 'clientName', label: 'Cliente', type: 'string' },
23
+ { name: 'clientRif', label: 'RIF/NIT', type: 'string' },
24
+ { name: 'clientAddress', label: 'Direccion', type: 'string' },
25
+ { name: 'clientPhone', label: 'Telefono', type: 'string' },
26
+ { name: 'clientEmail', label: 'Email', type: 'string' },
27
+ { name: 'companyName', label: 'Empresa', type: 'string' },
28
+ { name: 'companyRif', label: 'RIF Empresa', type: 'string' },
29
+ { name: 'companyAddress', label: 'Direccion Empresa', type: 'string' },
30
+ { name: 'companyPhone', label: 'Telefono Empresa', type: 'string' },
31
+ { name: 'companyLogoUrl', label: 'Logo URL', type: 'string' },
32
+ { name: 'subtotal', label: 'Subtotal', type: 'currency' },
33
+ { name: 'taxRate', label: '% IVA', type: 'number' },
34
+ { name: 'taxAmount', label: 'Monto IVA', type: 'currency' },
35
+ { name: 'discount', label: 'Descuento', type: 'currency' },
36
+ { name: 'grandTotal', label: 'Total General', type: 'currency' },
37
+ { name: 'paymentMethod', label: 'Forma de Pago', type: 'string' },
38
+ { name: 'notes', label: 'Observaciones', type: 'string' },
39
+ ],
40
+ },
41
+ {
42
+ id: 'detail', name: 'Detalle', type: 'array',
43
+ fields: [
44
+ { name: 'code', label: 'Codigo', type: 'string' },
45
+ { name: 'description', label: 'Descripcion', type: 'string' },
46
+ { name: 'qty', label: 'Cantidad', type: 'number' },
47
+ { name: 'price', label: 'Precio', type: 'currency' },
48
+ { name: 'discount', label: 'Descuento', type: 'currency' },
49
+ { name: 'tax', label: 'IVA', type: 'currency' },
50
+ { name: 'total', label: 'Total', type: 'currency' },
51
+ ],
52
+ },
53
+ ],
54
+ bands: [
55
+ {
56
+ id: 'rh', type: 'reportHeader', height: 35,
57
+ elements: [
58
+ { id: 'title', type: 'text', content: 'FACTURA DE VENTA', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#1a1a2e' } },
59
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 16, width: 190, height: 8, style: { fontSize: 12, textAlign: 'center', color: '#666' } },
60
+ { id: 'line1', type: 'line', x: 0, y: 30, width: 190, height: 0, x2: 190, y2: 30, lineStyle: { color: '#1a1a2e', width: 2, style: 'solid' } },
61
+ ],
62
+ },
63
+ {
64
+ id: 'ph', type: 'pageHeader', height: 35,
65
+ elements: [
66
+ { id: 'invNum', type: 'text', content: 'Factura N#:', x: 0, y: 2, width: 25, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
67
+ { id: 'invNumVal', type: 'field', dataSource: 'header', field: 'invoiceNumber', x: 26, y: 2, width: 40, height: 6, style: { fontSize: 9 } },
68
+ { id: 'dateLabel', type: 'text', content: 'Fecha:', x: 110, y: 2, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
69
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy', x: 126, y: 2, width: 30, height: 6, style: { fontSize: 9 } },
70
+ { id: 'dueDateLabel', type: 'text', content: 'Vence:', x: 156, y: 2, width: 12, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
71
+ { id: 'dueDateVal', type: 'field', dataSource: 'header', field: 'dueDate', format: 'dd/MM/yyyy', x: 168, y: 2, width: 22, height: 6, style: { fontSize: 9 } },
72
+ { id: 'clientLabel', type: 'text', content: 'Cliente:', x: 0, y: 10, width: 18, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
73
+ { id: 'clientVal', type: 'field', dataSource: 'header', field: 'clientName', x: 19, y: 10, width: 80, height: 6, style: { fontSize: 9 } },
74
+ { id: 'rifVal', type: 'field', dataSource: 'header', field: 'clientRif', x: 140, y: 10, width: 50, height: 6, style: { fontSize: 9 } },
75
+ { id: 'addrVal', type: 'field', dataSource: 'header', field: 'clientAddress', x: 0, y: 18, width: 190, height: 6, style: { fontSize: 8, color: '#666' } },
76
+ { id: 'payLabel', type: 'text', content: 'Forma de Pago:', x: 0, y: 26, width: 30, height: 6, style: { fontSize: 8, fontWeight: 'bold' } },
77
+ { id: 'payVal', type: 'field', dataSource: 'header', field: 'paymentMethod', x: 31, y: 26, width: 60, height: 6, style: { fontSize: 8 } },
78
+ ],
79
+ },
80
+ {
81
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#1a1a2e',
82
+ elements: [
83
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
84
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 24, y: 1, width: 75, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
85
+ { id: 'hQty', type: 'text', content: 'Cant.', x: 101, y: 1, width: 15, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
86
+ { id: 'hPrice', type: 'text', content: 'Precio', x: 118, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
87
+ { id: 'hDisc', type: 'text', content: 'Desc.', x: 142, y: 1, width: 18, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
88
+ { id: 'hTotal', type: 'text', content: 'Total', x: 163, y: 1, width: 27, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
89
+ ],
90
+ },
91
+ {
92
+ id: 'det', type: 'detail', height: 7, dataSource: 'detail',
93
+ elements: [
94
+ { id: 'dCode', type: 'field', dataSource: 'detail', field: 'code', x: 0, y: 1, width: 22, height: 5, style: { fontSize: 8 } },
95
+ { id: 'dDesc', type: 'field', dataSource: 'detail', field: 'description', x: 24, y: 1, width: 75, height: 5, style: { fontSize: 8 } },
96
+ { id: 'dQty', type: 'field', dataSource: 'detail', field: 'qty', x: 101, y: 1, width: 15, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
97
+ { id: 'dPrice', type: 'field', dataSource: 'detail', field: 'price', x: 118, y: 1, width: 22, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
98
+ { id: 'dDisc', type: 'field', dataSource: 'detail', field: 'discount', x: 142, y: 1, width: 18, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
99
+ { id: 'dTotal', type: 'field', dataSource: 'detail', field: 'total', x: 163, y: 1, width: 27, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
100
+ ],
101
+ },
102
+ {
103
+ id: 'rf', type: 'reportFooter', height: 40,
104
+ elements: [
105
+ { id: 'lineBottom', type: 'line', x: 110, y: 2, width: 80, height: 0, x2: 190, y2: 2, lineStyle: { color: '#333', width: 1, style: 'solid' } },
106
+ { id: 'subtotalLabel', type: 'text', content: 'Subtotal:', x: 110, y: 5, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
107
+ { id: 'subtotalVal', type: 'field', dataSource: 'header', field: 'subtotal', x: 163, y: 5, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
108
+ { id: 'discountLabel', type: 'text', content: 'Descuento:', x: 110, y: 12, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
109
+ { id: 'discountVal', type: 'field', dataSource: 'header', field: 'discount', x: 163, y: 12, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right', color: '#d32f2f' } },
110
+ { id: 'taxLabel', type: 'text', content: 'IVA (16%):', x: 110, y: 19, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
111
+ { id: 'taxVal', type: 'field', dataSource: 'header', field: 'taxAmount', x: 163, y: 19, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
112
+ { id: 'line2', type: 'line', x: 140, y: 27, width: 50, height: 0, x2: 190, y2: 27, lineStyle: { color: '#1a1a2e', width: 2, style: 'solid' } },
113
+ { id: 'totalLabel', type: 'text', content: 'TOTAL:', x: 110, y: 30, width: 50, height: 8, style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right' } },
114
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 160, y: 30, width: 30, height: 8, format: '$#,##0.00', style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right', color: '#1a1a2e' } },
115
+ { id: 'notesLabel', type: 'text', content: 'Observaciones:', x: 0, y: 5, width: 30, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#666' } },
116
+ { id: 'notesVal', type: 'field', dataSource: 'header', field: 'notes', x: 0, y: 12, width: 100, height: 12, style: { fontSize: 8, color: '#666' } },
117
+ ],
118
+ },
119
+ {
120
+ id: 'pf', type: 'pageFooter', height: 10,
121
+ elements: [
122
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 2, width: 50, height: 6, style: { fontSize: 8, textAlign: 'center', color: '#888' } },
123
+ { id: 'genDate', type: 'currentDate', format: 'dd/MM/yyyy HH:mm', x: 150, y: 2, width: 40, height: 6, style: { fontSize: 7, textAlign: 'right', color: '#aaa' } },
124
+ ],
125
+ },
126
+ ],
127
+ };
128
+ const INVOICE_DATA = {
129
+ header: {
130
+ invoiceNumber: 'FAC-2026-001547',
131
+ date: '2026-03-27T10:30:00Z',
132
+ dueDate: '2026-04-27T10:30:00Z',
133
+ clientName: 'Distribuidora La Esperanza C.A.',
134
+ clientRif: 'J-12345678-9',
135
+ clientAddress: 'Av. Libertador, Edf. Centro, Piso 3, Oficina 3A, Caracas 1010',
136
+ clientPhone: '+58 212-555-1234',
137
+ clientEmail: 'compras@laesperanza.com',
138
+ companyName: 'Zentto Solutions C.A.',
139
+ companyRif: 'J-50123456-7',
140
+ companyAddress: 'Av. Francisco de Miranda, Torre Zentto, Piso 8, Caracas',
141
+ companyPhone: '+58 212-999-8888',
142
+ companyLogoUrl: 'https://zentto.net/logo.png',
143
+ subtotal: 8247.00,
144
+ taxRate: 16,
145
+ taxAmount: 1319.52,
146
+ discount: 150.00,
147
+ grandTotal: 9416.52,
148
+ paymentMethod: 'Transferencia Bancaria - 30 dias',
149
+ notes: 'Precios expresados en USD. Valido por 15 dias. Garantia de 12 meses en equipos.',
150
+ },
151
+ detail: [
152
+ { code: 'ART-001', description: 'Laptop HP ProBook 450 G10 i7/16GB/512GB', qty: 2, price: 850.00, discount: 0, tax: 272.00, total: 1700.00 },
153
+ { code: 'ART-002', description: 'Monitor Dell 27" 4K USB-C P2723QE', qty: 4, price: 420.00, discount: 0, tax: 268.80, total: 1680.00 },
154
+ { code: 'ART-003', description: 'Teclado Logitech MX Keys Wireless', qty: 6, price: 95.00, discount: 0, tax: 91.20, total: 570.00 },
155
+ { code: 'ART-004', description: 'Mouse Logitech MX Master 3S Ergonomico', qty: 6, price: 85.00, discount: 0, tax: 81.60, total: 510.00 },
156
+ { code: 'ART-005', description: 'Docking Station Thunderbolt 4 10-in-1', qty: 2, price: 145.00, discount: 0, tax: 46.40, total: 290.00 },
157
+ { code: 'ART-006', description: 'Cable HDMI 2.1 Ultra HD Premium 2m', qty: 10, price: 18.50, discount: 0, tax: 29.60, total: 185.00 },
158
+ { code: 'ART-007', description: 'SSD NVMe M.2 1TB Samsung 990 Pro', qty: 3, price: 129.00, discount: 0, tax: 61.92, total: 387.00 },
159
+ { code: 'ART-008', description: 'Memoria RAM DDR5 32GB (2x16) 5600MHz', qty: 2, price: 165.00, discount: 0, tax: 52.80, total: 330.00 },
160
+ { code: 'ART-009', description: 'Webcam Logitech Brio 4K Ultra HD', qty: 4, price: 175.00, discount: 50.00, tax: 108.00, total: 650.00 },
161
+ { code: 'ART-010', description: 'Headset Jabra Evolve2 75 UC Stereo', qty: 3, price: 280.00, discount: 100.00, tax: 121.60, total: 740.00 },
162
+ { code: 'ART-011', description: 'Soporte Monitor Ergotron LX Dual Arm', qty: 4, price: 195.00, discount: 0, tax: 124.80, total: 780.00 },
163
+ { code: 'ART-012', description: 'Hub USB-C 7 puertos con PD 100W', qty: 5, price: 55.00, discount: 0, tax: 44.00, total: 275.00 },
164
+ ],
165
+ };
166
+ // =====================================================================
167
+ // 2. PRICE LIST — Lista de Precios
168
+ // =====================================================================
169
+ const PRICELIST_LAYOUT = {
170
+ version: '1.0',
171
+ name: 'Lista de Precios',
172
+ description: 'Catalogo de productos con precios por categoria',
173
+ pageSize: { width: 210, height: 297, unit: 'mm' },
174
+ margins: { top: 12, right: 10, bottom: 12, left: 10 },
175
+ orientation: 'portrait',
176
+ dataSources: [
177
+ {
178
+ id: 'header', name: 'Encabezado', type: 'object',
179
+ fields: [
180
+ { name: 'companyName', label: 'Empresa', type: 'string' },
181
+ { name: 'listName', label: 'Nombre Lista', type: 'string' },
182
+ { name: 'validFrom', label: 'Vigente Desde', type: 'date' },
183
+ { name: 'validTo', label: 'Vigente Hasta', type: 'date' },
184
+ { name: 'currency', label: 'Moneda', type: 'string' },
185
+ { name: 'notes', label: 'Notas', type: 'string' },
186
+ ],
187
+ },
188
+ {
189
+ id: 'items', name: 'Productos', type: 'array',
190
+ fields: [
191
+ { name: 'code', label: 'Codigo', type: 'string' },
192
+ { name: 'description', label: 'Descripcion', type: 'string' },
193
+ { name: 'category', label: 'Categoria', type: 'string' },
194
+ { name: 'unit', label: 'Unidad', type: 'string' },
195
+ { name: 'price', label: 'Precio', type: 'currency' },
196
+ { name: 'taxIncluded', label: 'IVA Incluido', type: 'boolean' },
197
+ ],
198
+ },
199
+ ],
200
+ bands: [
201
+ {
202
+ id: 'rh', type: 'reportHeader', height: 30,
203
+ elements: [
204
+ { id: 'title', type: 'field', dataSource: 'header', field: 'listName', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 18, fontWeight: 'bold', textAlign: 'center', color: '#0d47a1' } },
205
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 15, width: 190, height: 7, style: { fontSize: 11, textAlign: 'center', color: '#666' } },
206
+ { id: 'validity', type: 'text', content: 'Vigencia:', x: 60, y: 23, width: 20, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
207
+ { id: 'validFrom', type: 'field', dataSource: 'header', field: 'validFrom', format: 'dd/MM/yyyy', x: 81, y: 23, width: 25, height: 5, style: { fontSize: 8 } },
208
+ { id: 'validTo', type: 'field', dataSource: 'header', field: 'validTo', format: 'dd/MM/yyyy', x: 110, y: 23, width: 25, height: 5, style: { fontSize: 8 } },
209
+ ],
210
+ },
211
+ {
212
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#0d47a1',
213
+ elements: [
214
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
215
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 27, y: 1, width: 70, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
216
+ { id: 'hCat', type: 'text', content: 'Categoria', x: 99, y: 1, width: 35, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
217
+ { id: 'hUnit', type: 'text', content: 'Und', x: 136, y: 1, width: 15, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'center' } },
218
+ { id: 'hPrice', type: 'text', content: 'Precio', x: 155, y: 1, width: 35, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
219
+ ],
220
+ },
221
+ {
222
+ id: 'det', type: 'detail', height: 6, dataSource: 'items',
223
+ elements: [
224
+ { id: 'dCode', type: 'field', dataSource: 'items', field: 'code', x: 0, y: 0.5, width: 25, height: 5, style: { fontSize: 7.5 } },
225
+ { id: 'dDesc', type: 'field', dataSource: 'items', field: 'description', x: 27, y: 0.5, width: 70, height: 5, style: { fontSize: 7.5 } },
226
+ { id: 'dCat', type: 'field', dataSource: 'items', field: 'category', x: 99, y: 0.5, width: 35, height: 5, style: { fontSize: 7.5, color: '#555' } },
227
+ { id: 'dUnit', type: 'field', dataSource: 'items', field: 'unit', x: 136, y: 0.5, width: 15, height: 5, style: { fontSize: 7.5, textAlign: 'center' } },
228
+ { id: 'dPrice', type: 'field', dataSource: 'items', field: 'price', x: 155, y: 0.5, width: 35, height: 5, format: '$#,##0.00', style: { fontSize: 7.5, fontWeight: 'bold', textAlign: 'right' } },
229
+ ],
230
+ },
231
+ {
232
+ id: 'rf', type: 'reportFooter', height: 15,
233
+ elements: [
234
+ { id: 'count', type: 'field', dataSource: 'items', field: 'code', aggregate: 'count', x: 0, y: 3, width: 50, height: 6, format: '#,##0 productos', style: { fontSize: 8, color: '#888' } },
235
+ { id: 'notesVal', type: 'field', dataSource: 'header', field: 'notes', x: 55, y: 3, width: 135, height: 6, style: { fontSize: 7, color: '#999' } },
236
+ ],
237
+ },
238
+ {
239
+ id: 'pf', type: 'pageFooter', height: 8,
240
+ elements: [
241
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 1, width: 50, height: 5, style: { fontSize: 7, textAlign: 'center', color: '#aaa' } },
242
+ { id: 'genDate', type: 'currentDate', format: 'dd/MM/yyyy HH:mm', x: 150, y: 1, width: 40, height: 5, style: { fontSize: 7, textAlign: 'right', color: '#aaa' } },
243
+ ],
244
+ },
245
+ ],
246
+ };
247
+ const PRICELIST_DATA = {
248
+ header: {
249
+ companyName: 'Zentto Solutions C.A.',
250
+ listName: 'LISTA DE PRECIOS - TECNOLOGIA 2026',
251
+ validFrom: '2026-01-01T00:00:00Z',
252
+ validTo: '2026-06-30T23:59:59Z',
253
+ currency: 'USD',
254
+ notes: 'Precios en USD sin IVA. Sujetos a disponibilidad de inventario. Descuentos por volumen disponibles.',
255
+ },
256
+ items: [
257
+ { code: 'LAP-001', description: 'Laptop HP ProBook 450 G10 i5/8GB/256GB', category: 'Laptops', unit: 'Und', price: 650.00, taxIncluded: false },
258
+ { code: 'LAP-002', description: 'Laptop HP ProBook 450 G10 i7/16GB/512GB', category: 'Laptops', unit: 'Und', price: 850.00, taxIncluded: false },
259
+ { code: 'LAP-003', description: 'Laptop Dell Latitude 5540 i5/16GB/512GB', category: 'Laptops', unit: 'Und', price: 920.00, taxIncluded: false },
260
+ { code: 'LAP-004', description: 'Laptop Lenovo ThinkPad T14s Gen4 AMD', category: 'Laptops', unit: 'Und', price: 1050.00, taxIncluded: false },
261
+ { code: 'MON-001', description: 'Monitor Dell 24" FHD IPS P2422H', category: 'Monitores', unit: 'Und', price: 245.00, taxIncluded: false },
262
+ { code: 'MON-002', description: 'Monitor Dell 27" 4K USB-C P2723QE', category: 'Monitores', unit: 'Und', price: 420.00, taxIncluded: false },
263
+ { code: 'MON-003', description: 'Monitor LG 34" UltraWide QHD 34WP65C', category: 'Monitores', unit: 'Und', price: 380.00, taxIncluded: false },
264
+ { code: 'PER-001', description: 'Teclado Logitech MX Keys Wireless', category: 'Perifericos', unit: 'Und', price: 95.00, taxIncluded: false },
265
+ { code: 'PER-002', description: 'Mouse Logitech MX Master 3S', category: 'Perifericos', unit: 'Und', price: 85.00, taxIncluded: false },
266
+ { code: 'PER-003', description: 'Webcam Logitech Brio 4K Ultra HD', category: 'Perifericos', unit: 'Und', price: 175.00, taxIncluded: false },
267
+ { code: 'PER-004', description: 'Headset Jabra Evolve2 75 UC Stereo', category: 'Perifericos', unit: 'Und', price: 280.00, taxIncluded: false },
268
+ { code: 'PER-005', description: 'Soporte Monitor Ergotron LX Single Arm', category: 'Perifericos', unit: 'Und', price: 145.00, taxIncluded: false },
269
+ { code: 'PER-006', description: 'Soporte Monitor Ergotron LX Dual Arm', category: 'Perifericos', unit: 'Und', price: 195.00, taxIncluded: false },
270
+ { code: 'RED-001', description: 'Switch TP-Link 8 Puertos Gigabit', category: 'Redes', unit: 'Und', price: 35.00, taxIncluded: false },
271
+ { code: 'RED-002', description: 'Router Ubiquiti UniFi Dream Machine', category: 'Redes', unit: 'Und', price: 310.00, taxIncluded: false },
272
+ { code: 'RED-003', description: 'Access Point Ubiquiti U6 Pro WiFi 6', category: 'Redes', unit: 'Und', price: 150.00, taxIncluded: false },
273
+ { code: 'ALM-001', description: 'SSD NVMe M.2 512GB Samsung 980 Pro', category: 'Almacenamiento', unit: 'Und', price: 75.00, taxIncluded: false },
274
+ { code: 'ALM-002', description: 'SSD NVMe M.2 1TB Samsung 990 Pro', category: 'Almacenamiento', unit: 'Und', price: 129.00, taxIncluded: false },
275
+ { code: 'ALM-003', description: 'Disco Externo WD Elements 2TB USB 3.0', category: 'Almacenamiento', unit: 'Und', price: 65.00, taxIncluded: false },
276
+ { code: 'ALM-004', description: 'Memoria USB SanDisk Ultra 128GB', category: 'Almacenamiento', unit: 'Und', price: 12.00, taxIncluded: false },
277
+ { code: 'ACC-001', description: 'Docking Station Thunderbolt 4 10-in-1', category: 'Accesorios', unit: 'Und', price: 145.00, taxIncluded: false },
278
+ { code: 'ACC-002', description: 'Hub USB-C 7 puertos con PD 100W', category: 'Accesorios', unit: 'Und', price: 55.00, taxIncluded: false },
279
+ { code: 'ACC-003', description: 'Cable HDMI 2.1 Ultra HD 2m', category: 'Accesorios', unit: 'Und', price: 18.50, taxIncluded: false },
280
+ { code: 'ACC-004', description: 'Cable USB-C a USB-C 100W 1.5m', category: 'Accesorios', unit: 'Und', price: 15.00, taxIncluded: false },
281
+ { code: 'MEM-001', description: 'Memoria RAM DDR5 16GB (1x16) 5600MHz', category: 'Memoria', unit: 'Und', price: 85.00, taxIncluded: false },
282
+ { code: 'MEM-002', description: 'Memoria RAM DDR5 32GB (2x16) 5600MHz', category: 'Memoria', unit: 'Und', price: 165.00, taxIncluded: false },
283
+ ],
284
+ };
285
+ // =====================================================================
286
+ // 3. DELIVERY NOTE — Nota de Entrega
287
+ // =====================================================================
288
+ const DELIVERY_LAYOUT = {
289
+ version: '1.0',
290
+ name: 'Nota de Entrega',
291
+ description: 'Nota de entrega con datos de despacho y transporte',
292
+ pageSize: { width: 210, height: 297, unit: 'mm' },
293
+ margins: { top: 12, right: 10, bottom: 12, left: 10 },
294
+ orientation: 'portrait',
295
+ dataSources: [
296
+ {
297
+ id: 'header', name: 'Encabezado', type: 'object',
298
+ fields: [
299
+ { name: 'deliveryNumber', label: 'N# Nota', type: 'string' },
300
+ { name: 'date', label: 'Fecha Emision', type: 'date' },
301
+ { name: 'deliveryDate', label: 'Fecha Entrega', type: 'date' },
302
+ { name: 'invoiceRef', label: 'Ref. Factura', type: 'string' },
303
+ { name: 'clientName', label: 'Cliente', type: 'string' },
304
+ { name: 'clientRif', label: 'RIF', type: 'string' },
305
+ { name: 'deliveryAddress', label: 'Direccion Entrega', type: 'string' },
306
+ { name: 'contactName', label: 'Persona Contacto', type: 'string' },
307
+ { name: 'contactPhone', label: 'Telefono Contacto', type: 'string' },
308
+ { name: 'companyName', label: 'Empresa', type: 'string' },
309
+ { name: 'warehouseName', label: 'Almacen Origen', type: 'string' },
310
+ { name: 'warehouseCode', label: 'Cod. Almacen', type: 'string' },
311
+ { name: 'warehouseAddress', label: 'Dir. Almacen', type: 'string' },
312
+ { name: 'driverName', label: 'Conductor', type: 'string' },
313
+ { name: 'driverCI', label: 'CI Conductor', type: 'string' },
314
+ { name: 'vehiclePlate', label: 'Placa Vehiculo', type: 'string' },
315
+ { name: 'vehicleType', label: 'Tipo Vehiculo', type: 'string' },
316
+ { name: 'totalPackages', label: 'Total Bultos', type: 'number' },
317
+ { name: 'totalWeight', label: 'Peso Total (kg)', type: 'number' },
318
+ { name: 'observations', label: 'Observaciones', type: 'string' },
319
+ ],
320
+ },
321
+ {
322
+ id: 'items', name: 'Items', type: 'array',
323
+ fields: [
324
+ { name: 'code', label: 'Codigo', type: 'string' },
325
+ { name: 'description', label: 'Descripcion', type: 'string' },
326
+ { name: 'qtyOrdered', label: 'Cant. Pedida', type: 'number' },
327
+ { name: 'qtyDelivered', label: 'Cant. Entregada', type: 'number' },
328
+ { name: 'unit', label: 'Unidad', type: 'string' },
329
+ { name: 'lot', label: 'Lote', type: 'string' },
330
+ { name: 'packages', label: 'Bultos', type: 'number' },
331
+ ],
332
+ },
333
+ ],
334
+ bands: [
335
+ {
336
+ id: 'rh', type: 'reportHeader', height: 28,
337
+ elements: [
338
+ { id: 'title', type: 'text', content: 'NOTA DE ENTREGA', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#2e7d32' } },
339
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 15, width: 190, height: 7, style: { fontSize: 11, textAlign: 'center', color: '#666' } },
340
+ { id: 'line1', type: 'line', x: 0, y: 25, width: 190, height: 0, x2: 190, y2: 25, lineStyle: { color: '#2e7d32', width: 2, style: 'solid' } },
341
+ ],
342
+ },
343
+ {
344
+ id: 'ph', type: 'pageHeader', height: 52,
345
+ elements: [
346
+ { id: 'delNum', type: 'text', content: 'Nota N#:', x: 0, y: 1, width: 20, height: 5, style: { fontSize: 9, fontWeight: 'bold' } },
347
+ { id: 'delNumVal', type: 'field', dataSource: 'header', field: 'deliveryNumber', x: 21, y: 1, width: 40, height: 5, style: { fontSize: 9 } },
348
+ { id: 'dateLabel', type: 'text', content: 'Emision:', x: 100, y: 1, width: 18, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
349
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy', x: 119, y: 1, width: 28, height: 5, style: { fontSize: 8 } },
350
+ { id: 'delDateLabel', type: 'text', content: 'Entrega:', x: 150, y: 1, width: 17, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
351
+ { id: 'delDateVal', type: 'field', dataSource: 'header', field: 'deliveryDate', format: 'dd/MM/yyyy', x: 168, y: 1, width: 22, height: 5, style: { fontSize: 8 } },
352
+ { id: 'invRefLabel', type: 'text', content: 'Ref. Factura:', x: 0, y: 7, width: 25, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
353
+ { id: 'invRefVal', type: 'field', dataSource: 'header', field: 'invoiceRef', x: 26, y: 7, width: 40, height: 5, style: { fontSize: 8 } },
354
+ { id: 'clientLabel', type: 'text', content: 'Cliente:', x: 0, y: 14, width: 15, height: 5, style: { fontSize: 9, fontWeight: 'bold' } },
355
+ { id: 'clientVal', type: 'field', dataSource: 'header', field: 'clientName', x: 16, y: 14, width: 100, height: 5, style: { fontSize: 9 } },
356
+ { id: 'rifVal', type: 'field', dataSource: 'header', field: 'clientRif', x: 150, y: 14, width: 40, height: 5, style: { fontSize: 8 } },
357
+ { id: 'delAddrLabel', type: 'text', content: 'Dir. Entrega:', x: 0, y: 20, width: 25, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
358
+ { id: 'delAddrVal', type: 'field', dataSource: 'header', field: 'deliveryAddress', x: 26, y: 20, width: 164, height: 5, style: { fontSize: 8, color: '#555' } },
359
+ { id: 'whLabel', type: 'text', content: 'Almacen:', x: 0, y: 27, width: 18, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#2e7d32' } },
360
+ { id: 'whVal', type: 'field', dataSource: 'header', field: 'warehouseName', x: 19, y: 27, width: 60, height: 5, style: { fontSize: 8 } },
361
+ { id: 'whCodeVal', type: 'field', dataSource: 'header', field: 'warehouseCode', x: 80, y: 27, width: 20, height: 5, style: { fontSize: 8, color: '#888' } },
362
+ { id: 'driverLabel', type: 'text', content: 'Conductor:', x: 0, y: 34, width: 22, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#2e7d32' } },
363
+ { id: 'driverVal', type: 'field', dataSource: 'header', field: 'driverName', x: 23, y: 34, width: 50, height: 5, style: { fontSize: 8 } },
364
+ { id: 'driverCIVal', type: 'field', dataSource: 'header', field: 'driverCI', x: 75, y: 34, width: 30, height: 5, style: { fontSize: 8, color: '#888' } },
365
+ { id: 'plateLabel', type: 'text', content: 'Placa:', x: 110, y: 34, width: 14, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
366
+ { id: 'plateVal', type: 'field', dataSource: 'header', field: 'vehiclePlate', x: 125, y: 34, width: 25, height: 5, style: { fontSize: 9, fontWeight: 'bold' } },
367
+ { id: 'vehicleVal', type: 'field', dataSource: 'header', field: 'vehicleType', x: 152, y: 34, width: 38, height: 5, style: { fontSize: 8, color: '#888' } },
368
+ { id: 'pkgLabel', type: 'text', content: 'Total Bultos:', x: 0, y: 42, width: 26, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
369
+ { id: 'pkgVal', type: 'field', dataSource: 'header', field: 'totalPackages', x: 27, y: 42, width: 15, height: 5, format: '#,##0', style: { fontSize: 8 } },
370
+ { id: 'weightLabel', type: 'text', content: 'Peso Total:', x: 50, y: 42, width: 22, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
371
+ { id: 'weightVal', type: 'field', dataSource: 'header', field: 'totalWeight', x: 73, y: 42, width: 20, height: 5, format: '#,##0.0 kg', style: { fontSize: 8 } },
372
+ ],
373
+ },
374
+ {
375
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#2e7d32',
376
+ elements: [
377
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
378
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 24, y: 1, width: 70, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
379
+ { id: 'hOrd', type: 'text', content: 'Pedido', x: 96, y: 1, width: 18, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
380
+ { id: 'hDel', type: 'text', content: 'Entregado', x: 116, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
381
+ { id: 'hUnit', type: 'text', content: 'Und', x: 140, y: 1, width: 12, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'center' } },
382
+ { id: 'hLot', type: 'text', content: 'Lote', x: 154, y: 1, width: 20, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
383
+ { id: 'hPkg', type: 'text', content: 'Bultos', x: 176, y: 1, width: 14, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
384
+ ],
385
+ },
386
+ {
387
+ id: 'det', type: 'detail', height: 7, dataSource: 'items',
388
+ elements: [
389
+ { id: 'dCode', type: 'field', dataSource: 'items', field: 'code', x: 0, y: 1, width: 22, height: 5, style: { fontSize: 8 } },
390
+ { id: 'dDesc', type: 'field', dataSource: 'items', field: 'description', x: 24, y: 1, width: 70, height: 5, style: { fontSize: 8 } },
391
+ { id: 'dOrd', type: 'field', dataSource: 'items', field: 'qtyOrdered', x: 96, y: 1, width: 18, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
392
+ { id: 'dDel', type: 'field', dataSource: 'items', field: 'qtyDelivered', x: 116, y: 1, width: 22, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right', fontWeight: 'bold' } },
393
+ { id: 'dUnit', type: 'field', dataSource: 'items', field: 'unit', x: 140, y: 1, width: 12, height: 5, style: { fontSize: 8, textAlign: 'center' } },
394
+ { id: 'dLot', type: 'field', dataSource: 'items', field: 'lot', x: 154, y: 1, width: 20, height: 5, style: { fontSize: 7.5, color: '#888' } },
395
+ { id: 'dPkg', type: 'field', dataSource: 'items', field: 'packages', x: 176, y: 1, width: 14, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
396
+ ],
397
+ },
398
+ {
399
+ id: 'rf', type: 'reportFooter', height: 30,
400
+ elements: [
401
+ { id: 'obsLabel', type: 'text', content: 'Observaciones:', x: 0, y: 3, width: 30, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#555' } },
402
+ { id: 'obsVal', type: 'field', dataSource: 'header', field: 'observations', x: 0, y: 9, width: 120, height: 10, style: { fontSize: 8, color: '#666' } },
403
+ { id: 'signLabel1', type: 'text', content: 'Entregado por:', x: 0, y: 22, width: 30, height: 5, style: { fontSize: 7, color: '#888' } },
404
+ { id: 'signLine1', type: 'line', x: 0, y: 27, width: 60, height: 0, x2: 60, y2: 27, lineStyle: { color: '#ccc', width: 1, style: 'dashed' } },
405
+ { id: 'signLabel2', type: 'text', content: 'Recibido por:', x: 70, y: 22, width: 30, height: 5, style: { fontSize: 7, color: '#888' } },
406
+ { id: 'signLine2', type: 'line', x: 70, y: 27, width: 60, height: 0, x2: 130, y2: 27, lineStyle: { color: '#ccc', width: 1, style: 'dashed' } },
407
+ ],
408
+ },
409
+ {
410
+ id: 'pf', type: 'pageFooter', height: 8,
411
+ elements: [
412
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 1, width: 50, height: 5, style: { fontSize: 7, textAlign: 'center', color: '#aaa' } },
413
+ ],
414
+ },
415
+ ],
416
+ };
417
+ const DELIVERY_DATA = {
418
+ header: {
419
+ deliveryNumber: 'NE-2026-003218',
420
+ date: '2026-03-27T08:00:00Z',
421
+ deliveryDate: '2026-03-28T14:00:00Z',
422
+ invoiceRef: 'FAC-2026-001547',
423
+ clientName: 'Distribuidora La Esperanza C.A.',
424
+ clientRif: 'J-12345678-9',
425
+ deliveryAddress: 'Zona Industrial Los Cortijos, Galpon 15-A, Caracas 1071',
426
+ contactName: 'Carlos Mendoza',
427
+ contactPhone: '+58 412-555-7890',
428
+ companyName: 'Zentto Solutions C.A.',
429
+ warehouseName: 'Almacen Principal - Caracas',
430
+ warehouseCode: 'ALM-001',
431
+ warehouseAddress: 'Av. Romulo Gallegos, Galpon Z-12, Caracas 1060',
432
+ driverName: 'Jose Ramirez Hernandez',
433
+ driverCI: 'V-18.456.789',
434
+ vehiclePlate: 'AB123CD',
435
+ vehicleType: 'Camion 350 - Carga Seca',
436
+ totalPackages: 18,
437
+ totalWeight: 245.5,
438
+ observations: 'Entregar en horario de 8am a 5pm. Solicitar firma del responsable de almacen. Productos fragiles: manipular con cuidado.',
439
+ },
440
+ items: [
441
+ { code: 'ART-001', description: 'Laptop HP ProBook 450 G10 i7/16GB/512GB', qtyOrdered: 2, qtyDelivered: 2, unit: 'Und', lot: 'LT-2026-0312', packages: 2 },
442
+ { code: 'ART-002', description: 'Monitor Dell 27" 4K USB-C P2723QE', qtyOrdered: 4, qtyDelivered: 4, unit: 'Und', lot: 'LT-2026-0315', packages: 4 },
443
+ { code: 'ART-003', description: 'Teclado Logitech MX Keys Wireless', qtyOrdered: 6, qtyDelivered: 6, unit: 'Und', lot: 'LT-2026-0280', packages: 2 },
444
+ { code: 'ART-004', description: 'Mouse Logitech MX Master 3S Ergonomico', qtyOrdered: 6, qtyDelivered: 6, unit: 'Und', lot: 'LT-2026-0280', packages: 2 },
445
+ { code: 'ART-005', description: 'Docking Station Thunderbolt 4 10-in-1', qtyOrdered: 2, qtyDelivered: 2, unit: 'Und', lot: 'LT-2026-0299', packages: 1 },
446
+ { code: 'ART-006', description: 'Cable HDMI 2.1 Ultra HD Premium 2m', qtyOrdered: 10, qtyDelivered: 10, unit: 'Und', lot: 'LT-2026-0250', packages: 1 },
447
+ { code: 'ART-007', description: 'SSD NVMe M.2 1TB Samsung 990 Pro', qtyOrdered: 3, qtyDelivered: 3, unit: 'Und', lot: 'LT-2026-0305', packages: 1 },
448
+ { code: 'ART-008', description: 'Memoria RAM DDR5 32GB Kit', qtyOrdered: 2, qtyDelivered: 2, unit: 'Und', lot: 'LT-2026-0305', packages: 1 },
449
+ { code: 'ART-009', description: 'Webcam Logitech Brio 4K Ultra HD', qtyOrdered: 4, qtyDelivered: 3, unit: 'Und', lot: 'LT-2026-0288', packages: 1 },
450
+ { code: 'ART-010', description: 'Headset Jabra Evolve2 75 UC Stereo', qtyOrdered: 3, qtyDelivered: 3, unit: 'Und', lot: 'LT-2026-0310', packages: 1 },
451
+ { code: 'ART-011', description: 'Soporte Monitor Ergotron LX Dual Arm', qtyOrdered: 4, qtyDelivered: 4, unit: 'Und', lot: 'LT-2026-0292', packages: 2 },
452
+ ],
453
+ };
454
+ // =====================================================================
455
+ // 4. PURCHASE ORDER — Orden de Compra
456
+ // =====================================================================
457
+ const PURCHASE_ORDER_LAYOUT = {
458
+ version: '1.0',
459
+ name: 'Orden de Compra',
460
+ description: 'Orden de compra a proveedor con items, condiciones y totales',
461
+ pageSize: { width: 210, height: 297, unit: 'mm' },
462
+ margins: { top: 15, right: 10, bottom: 15, left: 10 },
463
+ orientation: 'portrait',
464
+ dataSources: [
465
+ {
466
+ id: 'header', name: 'Encabezado', type: 'object',
467
+ fields: [
468
+ { name: 'orderNumber', label: 'N# Orden', type: 'string' },
469
+ { name: 'date', label: 'Fecha', type: 'date' },
470
+ { name: 'expectedDate', label: 'Fecha Estimada', type: 'date' },
471
+ { name: 'supplierName', label: 'Proveedor', type: 'string' },
472
+ { name: 'supplierRif', label: 'RIF Proveedor', type: 'string' },
473
+ { name: 'supplierAddress', label: 'Direccion Proveedor', type: 'string' },
474
+ { name: 'supplierContact', label: 'Contacto', type: 'string' },
475
+ { name: 'supplierPhone', label: 'Telefono', type: 'string' },
476
+ { name: 'supplierEmail', label: 'Email', type: 'string' },
477
+ { name: 'companyName', label: 'Empresa', type: 'string' },
478
+ { name: 'companyRif', label: 'RIF Empresa', type: 'string' },
479
+ { name: 'companyAddress', label: 'Dir. Empresa', type: 'string' },
480
+ { name: 'deliveryAddress', label: 'Dir. Entrega', type: 'string' },
481
+ { name: 'paymentTerms', label: 'Condiciones de Pago', type: 'string' },
482
+ { name: 'currency', label: 'Moneda', type: 'string' },
483
+ { name: 'subtotal', label: 'Subtotal', type: 'currency' },
484
+ { name: 'taxAmount', label: 'IVA', type: 'currency' },
485
+ { name: 'grandTotal', label: 'Total', type: 'currency' },
486
+ { name: 'notes', label: 'Notas', type: 'string' },
487
+ { name: 'authorizedBy', label: 'Autorizado por', type: 'string' },
488
+ ],
489
+ },
490
+ {
491
+ id: 'items', name: 'Items', type: 'array',
492
+ fields: [
493
+ { name: 'code', label: 'Codigo', type: 'string' },
494
+ { name: 'description', label: 'Descripcion', type: 'string' },
495
+ { name: 'qty', label: 'Cantidad', type: 'number' },
496
+ { name: 'unit', label: 'Unidad', type: 'string' },
497
+ { name: 'unitPrice', label: 'Precio Unit.', type: 'currency' },
498
+ { name: 'total', label: 'Total', type: 'currency' },
499
+ ],
500
+ },
501
+ ],
502
+ bands: [
503
+ {
504
+ id: 'rh', type: 'reportHeader', height: 35,
505
+ elements: [
506
+ { id: 'title', type: 'text', content: 'ORDEN DE COMPRA', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#e65100' } },
507
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 16, width: 190, height: 8, style: { fontSize: 12, textAlign: 'center', color: '#666' } },
508
+ { id: 'line1', type: 'line', x: 0, y: 30, width: 190, height: 0, x2: 190, y2: 30, lineStyle: { color: '#e65100', width: 2, style: 'solid' } },
509
+ ],
510
+ },
511
+ {
512
+ id: 'ph', type: 'pageHeader', height: 40,
513
+ elements: [
514
+ { id: 'orderLabel', type: 'text', content: 'Orden N#:', x: 0, y: 2, width: 22, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
515
+ { id: 'orderVal', type: 'field', dataSource: 'header', field: 'orderNumber', x: 23, y: 2, width: 40, height: 6, style: { fontSize: 9 } },
516
+ { id: 'dateLabel', type: 'text', content: 'Fecha:', x: 110, y: 2, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
517
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy', x: 126, y: 2, width: 30, height: 6, style: { fontSize: 9 } },
518
+ { id: 'expectedLabel', type: 'text', content: 'Entrega est.:', x: 156, y: 2, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold' } },
519
+ { id: 'expectedVal', type: 'field', dataSource: 'header', field: 'expectedDate', format: 'dd/MM/yyyy', x: 168, y: 2, width: 22, height: 6, style: { fontSize: 8 } },
520
+ { id: 'suppLabel', type: 'text', content: 'Proveedor:', x: 0, y: 10, width: 22, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
521
+ { id: 'suppVal', type: 'field', dataSource: 'header', field: 'supplierName', x: 23, y: 10, width: 80, height: 6, style: { fontSize: 9 } },
522
+ { id: 'suppRifVal', type: 'field', dataSource: 'header', field: 'supplierRif', x: 140, y: 10, width: 50, height: 6, style: { fontSize: 9 } },
523
+ { id: 'suppAddrVal', type: 'field', dataSource: 'header', field: 'supplierAddress', x: 0, y: 18, width: 190, height: 5, style: { fontSize: 8, color: '#666' } },
524
+ { id: 'contactLabel', type: 'text', content: 'Contacto:', x: 0, y: 24, width: 20, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
525
+ { id: 'contactVal', type: 'field', dataSource: 'header', field: 'supplierContact', x: 21, y: 24, width: 50, height: 5, style: { fontSize: 8 } },
526
+ { id: 'suppPhoneVal', type: 'field', dataSource: 'header', field: 'supplierPhone', x: 75, y: 24, width: 40, height: 5, style: { fontSize: 8 } },
527
+ { id: 'payTermsLabel', type: 'text', content: 'Pago:', x: 0, y: 31, width: 12, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
528
+ { id: 'payTermsVal', type: 'field', dataSource: 'header', field: 'paymentTerms', x: 13, y: 31, width: 80, height: 5, style: { fontSize: 8 } },
529
+ { id: 'delAddrLabel', type: 'text', content: 'Dir. Entrega:', x: 100, y: 31, width: 25, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
530
+ { id: 'delAddrVal', type: 'field', dataSource: 'header', field: 'deliveryAddress', x: 126, y: 31, width: 64, height: 5, style: { fontSize: 8, color: '#555' } },
531
+ ],
532
+ },
533
+ {
534
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#e65100',
535
+ elements: [
536
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
537
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 24, y: 1, width: 80, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
538
+ { id: 'hQty', type: 'text', content: 'Cant.', x: 106, y: 1, width: 15, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
539
+ { id: 'hUnit', type: 'text', content: 'Und', x: 123, y: 1, width: 12, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'center' } },
540
+ { id: 'hPrice', type: 'text', content: 'P. Unit.', x: 137, y: 1, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
541
+ { id: 'hTotal', type: 'text', content: 'Total', x: 163, y: 1, width: 27, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
542
+ ],
543
+ },
544
+ {
545
+ id: 'det', type: 'detail', height: 7, dataSource: 'items',
546
+ elements: [
547
+ { id: 'dCode', type: 'field', dataSource: 'items', field: 'code', x: 0, y: 1, width: 22, height: 5, style: { fontSize: 8 } },
548
+ { id: 'dDesc', type: 'field', dataSource: 'items', field: 'description', x: 24, y: 1, width: 80, height: 5, style: { fontSize: 8 } },
549
+ { id: 'dQty', type: 'field', dataSource: 'items', field: 'qty', x: 106, y: 1, width: 15, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
550
+ { id: 'dUnit', type: 'field', dataSource: 'items', field: 'unit', x: 123, y: 1, width: 12, height: 5, style: { fontSize: 8, textAlign: 'center' } },
551
+ { id: 'dPrice', type: 'field', dataSource: 'items', field: 'unitPrice', x: 137, y: 1, width: 25, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
552
+ { id: 'dTotal', type: 'field', dataSource: 'items', field: 'total', x: 163, y: 1, width: 27, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
553
+ ],
554
+ },
555
+ {
556
+ id: 'rf', type: 'reportFooter', height: 45,
557
+ elements: [
558
+ { id: 'lineTop', type: 'line', x: 110, y: 2, width: 80, height: 0, x2: 190, y2: 2, lineStyle: { color: '#333', width: 1, style: 'solid' } },
559
+ { id: 'subtotalLabel', type: 'text', content: 'Subtotal:', x: 110, y: 5, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
560
+ { id: 'subtotalVal', type: 'field', dataSource: 'header', field: 'subtotal', x: 163, y: 5, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
561
+ { id: 'taxLabel', type: 'text', content: 'IVA (16%):', x: 110, y: 12, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
562
+ { id: 'taxVal', type: 'field', dataSource: 'header', field: 'taxAmount', x: 163, y: 12, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
563
+ { id: 'line2', type: 'line', x: 140, y: 20, width: 50, height: 0, x2: 190, y2: 20, lineStyle: { color: '#e65100', width: 2, style: 'solid' } },
564
+ { id: 'totalLabel', type: 'text', content: 'TOTAL:', x: 110, y: 23, width: 50, height: 8, style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right' } },
565
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 160, y: 23, width: 30, height: 8, format: '$#,##0.00', style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right', color: '#e65100' } },
566
+ { id: 'notesLabel', type: 'text', content: 'Notas:', x: 0, y: 5, width: 15, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#666' } },
567
+ { id: 'notesVal', type: 'field', dataSource: 'header', field: 'notes', x: 0, y: 11, width: 100, height: 10, style: { fontSize: 8, color: '#666' } },
568
+ { id: 'authLabel', type: 'text', content: 'Autorizado por:', x: 0, y: 35, width: 30, height: 5, style: { fontSize: 7, color: '#888' } },
569
+ { id: 'authLine', type: 'line', x: 0, y: 40, width: 60, height: 0, x2: 60, y2: 40, lineStyle: { color: '#ccc', width: 1, style: 'dashed' } },
570
+ { id: 'authVal', type: 'field', dataSource: 'header', field: 'authorizedBy', x: 0, y: 41, width: 60, height: 4, style: { fontSize: 7, textAlign: 'center', color: '#888' } },
571
+ ],
572
+ },
573
+ {
574
+ id: 'pf', type: 'pageFooter', height: 10,
575
+ elements: [
576
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 2, width: 50, height: 6, style: { fontSize: 8, textAlign: 'center', color: '#888' } },
577
+ { id: 'genDate', type: 'currentDate', format: 'dd/MM/yyyy HH:mm', x: 150, y: 2, width: 40, height: 6, style: { fontSize: 7, textAlign: 'right', color: '#aaa' } },
578
+ ],
579
+ },
580
+ ],
581
+ };
582
+ const PURCHASE_ORDER_DATA = {
583
+ header: {
584
+ orderNumber: 'OC-2026-000482',
585
+ date: '2026-03-25T09:00:00Z',
586
+ expectedDate: '2026-04-10T09:00:00Z',
587
+ supplierName: 'TechDistribucion Global C.A.',
588
+ supplierRif: 'J-30987654-1',
589
+ supplierAddress: 'Av. Principal de La Urbina, Centro Empresarial Lido, Torre A, P5, Caracas 1070',
590
+ supplierContact: 'Ing. Patricia Rojas',
591
+ supplierPhone: '+58 212-333-4455',
592
+ supplierEmail: 'ventas@techdist.com',
593
+ companyName: 'Zentto Solutions C.A.',
594
+ companyRif: 'J-50123456-7',
595
+ companyAddress: 'Av. Francisco de Miranda, Torre Zentto, Piso 8, Caracas',
596
+ deliveryAddress: 'Almacen Principal, Av. Romulo Gallegos, Galpon Z-12, Caracas 1060',
597
+ paymentTerms: 'Credito 30 dias - Transferencia bancaria',
598
+ currency: 'USD',
599
+ subtotal: 12850.00,
600
+ taxAmount: 2056.00,
601
+ grandTotal: 14906.00,
602
+ notes: 'Requiere certificado de garantia por cada equipo. Entrega parcial aceptada. Contactar 24h antes de despacho.',
603
+ authorizedBy: 'Raul Gonzalez - Gerente de Compras',
604
+ },
605
+ items: [
606
+ { code: 'LAP-002', description: 'Laptop HP ProBook 450 G10 i7/16GB/512GB', qty: 5, unit: 'Und', unitPrice: 780.00, total: 3900.00 },
607
+ { code: 'MON-002', description: 'Monitor Dell 27" 4K USB-C P2723QE', qty: 10, unit: 'Und', unitPrice: 385.00, total: 3850.00 },
608
+ { code: 'PER-001', description: 'Teclado Logitech MX Keys Wireless', qty: 10, unit: 'Und', unitPrice: 82.00, total: 820.00 },
609
+ { code: 'PER-002', description: 'Mouse Logitech MX Master 3S', qty: 10, unit: 'Und', unitPrice: 73.00, total: 730.00 },
610
+ { code: 'ACC-001', description: 'Docking Station Thunderbolt 4 10-in-1', qty: 5, unit: 'Und', unitPrice: 125.00, total: 625.00 },
611
+ { code: 'ALM-002', description: 'SSD NVMe M.2 1TB Samsung 990 Pro', qty: 10, unit: 'Und', unitPrice: 110.00, total: 1100.00 },
612
+ { code: 'MEM-002', description: 'Memoria RAM DDR5 32GB (2x16) 5600MHz', qty: 5, unit: 'Und', unitPrice: 145.00, total: 725.00 },
613
+ { code: 'PER-004', description: 'Headset Jabra Evolve2 75 UC Stereo', qty: 5, unit: 'Und', unitPrice: 220.00, total: 1100.00 },
614
+ ],
615
+ };
616
+ // =====================================================================
617
+ // 5. QUOTE / ESTIMATE — Presupuesto / Cotizacion
618
+ // =====================================================================
619
+ const QUOTE_LAYOUT = {
620
+ version: '1.0',
621
+ name: 'Presupuesto / Cotizacion',
622
+ description: 'Cotizacion para cliente con items, validez y condiciones',
623
+ pageSize: { width: 210, height: 297, unit: 'mm' },
624
+ margins: { top: 15, right: 10, bottom: 15, left: 10 },
625
+ orientation: 'portrait',
626
+ dataSources: [
627
+ {
628
+ id: 'header', name: 'Encabezado', type: 'object',
629
+ fields: [
630
+ { name: 'quoteNumber', label: 'N# Cotizacion', type: 'string' },
631
+ { name: 'date', label: 'Fecha', type: 'date' },
632
+ { name: 'validUntil', label: 'Valido Hasta', type: 'date' },
633
+ { name: 'clientName', label: 'Cliente', type: 'string' },
634
+ { name: 'clientRif', label: 'RIF', type: 'string' },
635
+ { name: 'clientAddress', label: 'Direccion', type: 'string' },
636
+ { name: 'clientContact', label: 'Contacto', type: 'string' },
637
+ { name: 'clientPhone', label: 'Telefono', type: 'string' },
638
+ { name: 'clientEmail', label: 'Email', type: 'string' },
639
+ { name: 'companyName', label: 'Empresa', type: 'string' },
640
+ { name: 'companyRif', label: 'RIF', type: 'string' },
641
+ { name: 'companyAddress', label: 'Direccion', type: 'string' },
642
+ { name: 'companyPhone', label: 'Telefono', type: 'string' },
643
+ { name: 'sellerName', label: 'Vendedor', type: 'string' },
644
+ { name: 'sellerEmail', label: 'Email Vendedor', type: 'string' },
645
+ { name: 'subtotal', label: 'Subtotal', type: 'currency' },
646
+ { name: 'taxAmount', label: 'IVA', type: 'currency' },
647
+ { name: 'grandTotal', label: 'Total', type: 'currency' },
648
+ { name: 'conditions', label: 'Condiciones', type: 'string' },
649
+ { name: 'warranty', label: 'Garantia', type: 'string' },
650
+ { name: 'deliveryTime', label: 'Tiempo de Entrega', type: 'string' },
651
+ ],
652
+ },
653
+ {
654
+ id: 'items', name: 'Items', type: 'array',
655
+ fields: [
656
+ { name: 'code', label: 'Codigo', type: 'string' },
657
+ { name: 'description', label: 'Descripcion', type: 'string' },
658
+ { name: 'qty', label: 'Cantidad', type: 'number' },
659
+ { name: 'unit', label: 'Unidad', type: 'string' },
660
+ { name: 'unitPrice', label: 'Precio Unit.', type: 'currency' },
661
+ { name: 'total', label: 'Total', type: 'currency' },
662
+ ],
663
+ },
664
+ ],
665
+ bands: [
666
+ {
667
+ id: 'rh', type: 'reportHeader', height: 35,
668
+ elements: [
669
+ { id: 'title', type: 'text', content: 'PRESUPUESTO', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#6a1b9a' } },
670
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 16, width: 190, height: 8, style: { fontSize: 12, textAlign: 'center', color: '#666' } },
671
+ { id: 'line1', type: 'line', x: 0, y: 30, width: 190, height: 0, x2: 190, y2: 30, lineStyle: { color: '#6a1b9a', width: 2, style: 'solid' } },
672
+ ],
673
+ },
674
+ {
675
+ id: 'ph', type: 'pageHeader', height: 38,
676
+ elements: [
677
+ { id: 'quoteLabel', type: 'text', content: 'Cotizacion N#:', x: 0, y: 2, width: 30, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
678
+ { id: 'quoteVal', type: 'field', dataSource: 'header', field: 'quoteNumber', x: 31, y: 2, width: 40, height: 6, style: { fontSize: 9 } },
679
+ { id: 'dateLabel', type: 'text', content: 'Fecha:', x: 110, y: 2, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
680
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy', x: 126, y: 2, width: 30, height: 6, style: { fontSize: 9 } },
681
+ { id: 'validLabel', type: 'text', content: 'Valido hasta:', x: 0, y: 9, width: 28, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#d32f2f' } },
682
+ { id: 'validVal', type: 'field', dataSource: 'header', field: 'validUntil', format: 'dd/MM/yyyy', x: 29, y: 9, width: 30, height: 5, style: { fontSize: 8, color: '#d32f2f' } },
683
+ { id: 'clientLabel', type: 'text', content: 'Cliente:', x: 0, y: 16, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
684
+ { id: 'clientVal', type: 'field', dataSource: 'header', field: 'clientName', x: 16, y: 16, width: 90, height: 6, style: { fontSize: 9 } },
685
+ { id: 'rifVal', type: 'field', dataSource: 'header', field: 'clientRif', x: 140, y: 16, width: 50, height: 6, style: { fontSize: 9 } },
686
+ { id: 'addrVal', type: 'field', dataSource: 'header', field: 'clientAddress', x: 0, y: 23, width: 190, height: 5, style: { fontSize: 8, color: '#666' } },
687
+ { id: 'sellerLabel', type: 'text', content: 'Vendedor:', x: 0, y: 30, width: 20, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
688
+ { id: 'sellerVal', type: 'field', dataSource: 'header', field: 'sellerName', x: 21, y: 30, width: 50, height: 5, style: { fontSize: 8 } },
689
+ { id: 'sellerEmailVal', type: 'field', dataSource: 'header', field: 'sellerEmail', x: 75, y: 30, width: 60, height: 5, style: { fontSize: 8, color: '#1976d2' } },
690
+ ],
691
+ },
692
+ {
693
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#6a1b9a',
694
+ elements: [
695
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 22, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
696
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 24, y: 1, width: 80, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
697
+ { id: 'hQty', type: 'text', content: 'Cant.', x: 106, y: 1, width: 15, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
698
+ { id: 'hUnit', type: 'text', content: 'Und', x: 123, y: 1, width: 12, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'center' } },
699
+ { id: 'hPrice', type: 'text', content: 'P. Unit.', x: 137, y: 1, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
700
+ { id: 'hTotal', type: 'text', content: 'Total', x: 163, y: 1, width: 27, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
701
+ ],
702
+ },
703
+ {
704
+ id: 'det', type: 'detail', height: 7, dataSource: 'items',
705
+ elements: [
706
+ { id: 'dCode', type: 'field', dataSource: 'items', field: 'code', x: 0, y: 1, width: 22, height: 5, style: { fontSize: 8 } },
707
+ { id: 'dDesc', type: 'field', dataSource: 'items', field: 'description', x: 24, y: 1, width: 80, height: 5, style: { fontSize: 8 } },
708
+ { id: 'dQty', type: 'field', dataSource: 'items', field: 'qty', x: 106, y: 1, width: 15, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
709
+ { id: 'dUnit', type: 'field', dataSource: 'items', field: 'unit', x: 123, y: 1, width: 12, height: 5, style: { fontSize: 8, textAlign: 'center' } },
710
+ { id: 'dPrice', type: 'field', dataSource: 'items', field: 'unitPrice', x: 137, y: 1, width: 25, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
711
+ { id: 'dTotal', type: 'field', dataSource: 'items', field: 'total', x: 163, y: 1, width: 27, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
712
+ ],
713
+ },
714
+ {
715
+ id: 'rf', type: 'reportFooter', height: 55,
716
+ elements: [
717
+ { id: 'lineTop', type: 'line', x: 110, y: 2, width: 80, height: 0, x2: 190, y2: 2, lineStyle: { color: '#333', width: 1, style: 'solid' } },
718
+ { id: 'subtotalLabel', type: 'text', content: 'Subtotal:', x: 110, y: 5, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
719
+ { id: 'subtotalVal', type: 'field', dataSource: 'header', field: 'subtotal', x: 163, y: 5, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
720
+ { id: 'taxLabel', type: 'text', content: 'IVA (16%):', x: 110, y: 12, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
721
+ { id: 'taxVal', type: 'field', dataSource: 'header', field: 'taxAmount', x: 163, y: 12, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
722
+ { id: 'line2', type: 'line', x: 140, y: 20, width: 50, height: 0, x2: 190, y2: 20, lineStyle: { color: '#6a1b9a', width: 2, style: 'solid' } },
723
+ { id: 'totalLabel', type: 'text', content: 'TOTAL:', x: 110, y: 23, width: 50, height: 8, style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right' } },
724
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 160, y: 23, width: 30, height: 8, format: '$#,##0.00', style: { fontSize: 13, fontWeight: 'bold', textAlign: 'right', color: '#6a1b9a' } },
725
+ { id: 'condLabel', type: 'text', content: 'Condiciones:', x: 0, y: 5, width: 25, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#555' } },
726
+ { id: 'condVal', type: 'field', dataSource: 'header', field: 'conditions', x: 0, y: 11, width: 100, height: 8, style: { fontSize: 8, color: '#666' } },
727
+ { id: 'warrantyLabel', type: 'text', content: 'Garantia:', x: 0, y: 21, width: 20, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#555' } },
728
+ { id: 'warrantyVal', type: 'field', dataSource: 'header', field: 'warranty', x: 21, y: 21, width: 80, height: 5, style: { fontSize: 8, color: '#666' } },
729
+ { id: 'deliveryLabel', type: 'text', content: 'Entrega:', x: 0, y: 27, width: 18, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#555' } },
730
+ { id: 'deliveryVal', type: 'field', dataSource: 'header', field: 'deliveryTime', x: 19, y: 27, width: 80, height: 5, style: { fontSize: 8, color: '#666' } },
731
+ { id: 'acceptLabel', type: 'text', content: 'Aceptado por:', x: 0, y: 42, width: 30, height: 5, style: { fontSize: 7, color: '#888' } },
732
+ { id: 'acceptLine', type: 'line', x: 0, y: 48, width: 70, height: 0, x2: 70, y2: 48, lineStyle: { color: '#ccc', width: 1, style: 'dashed' } },
733
+ { id: 'dateAcceptLabel', type: 'text', content: 'Fecha:', x: 80, y: 42, width: 15, height: 5, style: { fontSize: 7, color: '#888' } },
734
+ { id: 'dateAcceptLine', type: 'line', x: 80, y: 48, width: 40, height: 0, x2: 120, y2: 48, lineStyle: { color: '#ccc', width: 1, style: 'dashed' } },
735
+ ],
736
+ },
737
+ {
738
+ id: 'pf', type: 'pageFooter', height: 10,
739
+ elements: [
740
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 2, width: 50, height: 6, style: { fontSize: 8, textAlign: 'center', color: '#888' } },
741
+ { id: 'genDate', type: 'currentDate', format: 'dd/MM/yyyy HH:mm', x: 150, y: 2, width: 40, height: 6, style: { fontSize: 7, textAlign: 'right', color: '#aaa' } },
742
+ ],
743
+ },
744
+ ],
745
+ };
746
+ const QUOTE_DATA = {
747
+ header: {
748
+ quoteNumber: 'COT-2026-001203',
749
+ date: '2026-03-26T11:00:00Z',
750
+ validUntil: '2026-04-10T23:59:59Z',
751
+ clientName: 'Constructora Meridiano C.A.',
752
+ clientRif: 'J-40567890-3',
753
+ clientAddress: 'Av. Urdaneta, Edf. La Candelaria, P7, Of. 7B, Caracas 1010',
754
+ clientContact: 'Arq. Laura Fernandez',
755
+ clientPhone: '+58 412-888-2233',
756
+ clientEmail: 'lfernandez@meridiano.com',
757
+ companyName: 'Zentto Solutions C.A.',
758
+ companyRif: 'J-50123456-7',
759
+ companyAddress: 'Av. Francisco de Miranda, Torre Zentto, Piso 8, Caracas',
760
+ companyPhone: '+58 212-999-8888',
761
+ sellerName: 'Miguel Torres',
762
+ sellerEmail: 'mtorres@zentto.net',
763
+ subtotal: 7620.00,
764
+ taxAmount: 1219.20,
765
+ grandTotal: 8839.20,
766
+ conditions: 'Precios en USD. Pago 50% anticipo, 50% contra entrega. Sujeto a disponibilidad.',
767
+ warranty: '12 meses en equipos, 6 meses en accesorios. Garantia directa del fabricante.',
768
+ deliveryTime: '5-7 dias habiles luego de confirmacion de pago.',
769
+ },
770
+ items: [
771
+ { code: 'LAP-003', description: 'Laptop Dell Latitude 5540 i5/16GB/512GB', qty: 3, unit: 'Und', unitPrice: 920.00, total: 2760.00 },
772
+ { code: 'MON-002', description: 'Monitor Dell 27" 4K USB-C P2723QE', qty: 3, unit: 'Und', unitPrice: 420.00, total: 1260.00 },
773
+ { code: 'PER-001', description: 'Teclado Logitech MX Keys Wireless', qty: 3, unit: 'Und', unitPrice: 95.00, total: 285.00 },
774
+ { code: 'PER-002', description: 'Mouse Logitech MX Master 3S', qty: 3, unit: 'Und', unitPrice: 85.00, total: 255.00 },
775
+ { code: 'ACC-001', description: 'Docking Station Thunderbolt 4 10-in-1', qty: 3, unit: 'Und', unitPrice: 145.00, total: 435.00 },
776
+ { code: 'PER-006', description: 'Soporte Monitor Ergotron LX Dual Arm', qty: 3, unit: 'Und', unitPrice: 195.00, total: 585.00 },
777
+ { code: 'PER-004', description: 'Headset Jabra Evolve2 75 UC Stereo', qty: 3, unit: 'Und', unitPrice: 280.00, total: 840.00 },
778
+ { code: 'RED-003', description: 'Access Point Ubiquiti U6 Pro WiFi 6', qty: 2, unit: 'Und', unitPrice: 150.00, total: 300.00 },
779
+ { code: 'RED-001', description: 'Switch TP-Link 8 Puertos Gigabit', qty: 2, unit: 'Und', unitPrice: 35.00, total: 70.00 },
780
+ { code: 'ACC-003', description: 'Cable HDMI 2.1 Ultra HD 2m', qty: 10, unit: 'Und', unitPrice: 18.50, total: 185.00 },
781
+ { code: 'ACC-004', description: 'Cable USB-C a USB-C 100W 1.5m', qty: 10, unit: 'Und', unitPrice: 15.00, total: 150.00 },
782
+ { code: 'ALM-004', description: 'Memoria USB SanDisk Ultra 128GB', qty: 10, unit: 'Und', unitPrice: 12.00, total: 120.00 },
783
+ ],
784
+ };
785
+ // =====================================================================
786
+ // 6. CREDIT NOTE — Nota de Credito
787
+ // =====================================================================
788
+ const CREDIT_NOTE_LAYOUT = {
789
+ version: '1.0',
790
+ name: 'Nota de Credito',
791
+ description: 'Nota de credito referenciada a factura original',
792
+ pageSize: { width: 210, height: 297, unit: 'mm' },
793
+ margins: { top: 15, right: 10, bottom: 15, left: 10 },
794
+ orientation: 'portrait',
795
+ dataSources: [
796
+ {
797
+ id: 'header', name: 'Encabezado', type: 'object',
798
+ fields: [
799
+ { name: 'creditNumber', label: 'N# Nota Credito', type: 'string' },
800
+ { name: 'date', label: 'Fecha', type: 'date' },
801
+ { name: 'originalInvoice', label: 'Factura Original', type: 'string' },
802
+ { name: 'originalDate', label: 'Fecha Factura', type: 'date' },
803
+ { name: 'clientName', label: 'Cliente', type: 'string' },
804
+ { name: 'clientRif', label: 'RIF', type: 'string' },
805
+ { name: 'clientAddress', label: 'Direccion', type: 'string' },
806
+ { name: 'companyName', label: 'Empresa', type: 'string' },
807
+ { name: 'companyRif', label: 'RIF Empresa', type: 'string' },
808
+ { name: 'reason', label: 'Motivo', type: 'string' },
809
+ { name: 'subtotal', label: 'Subtotal', type: 'currency' },
810
+ { name: 'taxAmount', label: 'IVA', type: 'currency' },
811
+ { name: 'grandTotal', label: 'Total Credito', type: 'currency' },
812
+ { name: 'notes', label: 'Observaciones', type: 'string' },
813
+ ],
814
+ },
815
+ {
816
+ id: 'items', name: 'Items', type: 'array',
817
+ fields: [
818
+ { name: 'code', label: 'Codigo', type: 'string' },
819
+ { name: 'description', label: 'Descripcion', type: 'string' },
820
+ { name: 'qty', label: 'Cantidad', type: 'number' },
821
+ { name: 'unitPrice', label: 'Precio Unit.', type: 'currency' },
822
+ { name: 'total', label: 'Total', type: 'currency' },
823
+ ],
824
+ },
825
+ ],
826
+ bands: [
827
+ {
828
+ id: 'rh', type: 'reportHeader', height: 35,
829
+ elements: [
830
+ { id: 'title', type: 'text', content: 'NOTA DE CREDITO', x: 0, y: 2, width: 190, height: 12, style: { fontSize: 20, fontWeight: 'bold', textAlign: 'center', color: '#c62828' } },
831
+ { id: 'company', type: 'field', dataSource: 'header', field: 'companyName', x: 0, y: 16, width: 190, height: 8, style: { fontSize: 12, textAlign: 'center', color: '#666' } },
832
+ { id: 'line1', type: 'line', x: 0, y: 30, width: 190, height: 0, x2: 190, y2: 30, lineStyle: { color: '#c62828', width: 2, style: 'solid' } },
833
+ ],
834
+ },
835
+ {
836
+ id: 'ph', type: 'pageHeader', height: 35,
837
+ elements: [
838
+ { id: 'cnLabel', type: 'text', content: 'Nota N#:', x: 0, y: 2, width: 20, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
839
+ { id: 'cnVal', type: 'field', dataSource: 'header', field: 'creditNumber', x: 21, y: 2, width: 45, height: 6, style: { fontSize: 9 } },
840
+ { id: 'dateLabel', type: 'text', content: 'Fecha:', x: 120, y: 2, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
841
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy', x: 136, y: 2, width: 54, height: 6, style: { fontSize: 9 } },
842
+ { id: 'refLabel', type: 'text', content: 'Factura Ref.:', x: 0, y: 9, width: 28, height: 6, style: { fontSize: 9, fontWeight: 'bold', color: '#c62828' } },
843
+ { id: 'refVal', type: 'field', dataSource: 'header', field: 'originalInvoice', x: 29, y: 9, width: 40, height: 6, style: { fontSize: 9, color: '#c62828' } },
844
+ { id: 'refDateLabel', type: 'text', content: 'del', x: 71, y: 9, width: 8, height: 6, style: { fontSize: 8 } },
845
+ { id: 'refDateVal', type: 'field', dataSource: 'header', field: 'originalDate', format: 'dd/MM/yyyy', x: 80, y: 9, width: 30, height: 6, style: { fontSize: 8 } },
846
+ { id: 'clientLabel', type: 'text', content: 'Cliente:', x: 0, y: 17, width: 15, height: 6, style: { fontSize: 9, fontWeight: 'bold' } },
847
+ { id: 'clientVal', type: 'field', dataSource: 'header', field: 'clientName', x: 16, y: 17, width: 90, height: 6, style: { fontSize: 9 } },
848
+ { id: 'rifVal', type: 'field', dataSource: 'header', field: 'clientRif', x: 140, y: 17, width: 50, height: 6, style: { fontSize: 9 } },
849
+ { id: 'reasonLabel', type: 'text', content: 'Motivo:', x: 0, y: 25, width: 16, height: 6, style: { fontSize: 9, fontWeight: 'bold', color: '#c62828' } },
850
+ { id: 'reasonVal', type: 'field', dataSource: 'header', field: 'reason', x: 17, y: 25, width: 173, height: 6, style: { fontSize: 9 } },
851
+ ],
852
+ },
853
+ {
854
+ id: 'ch', type: 'columnHeader', height: 8, repeatOnEveryPage: true, backgroundColor: '#c62828',
855
+ elements: [
856
+ { id: 'hCode', type: 'text', content: 'Codigo', x: 0, y: 1, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
857
+ { id: 'hDesc', type: 'text', content: 'Descripcion', x: 27, y: 1, width: 90, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff' } },
858
+ { id: 'hQty', type: 'text', content: 'Cant.', x: 119, y: 1, width: 15, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
859
+ { id: 'hPrice', type: 'text', content: 'P. Unit.', x: 137, y: 1, width: 25, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
860
+ { id: 'hTotal', type: 'text', content: 'Total', x: 163, y: 1, width: 27, height: 6, style: { fontSize: 8, fontWeight: 'bold', color: '#fff', textAlign: 'right' } },
861
+ ],
862
+ },
863
+ {
864
+ id: 'det', type: 'detail', height: 7, dataSource: 'items',
865
+ elements: [
866
+ { id: 'dCode', type: 'field', dataSource: 'items', field: 'code', x: 0, y: 1, width: 25, height: 5, style: { fontSize: 8 } },
867
+ { id: 'dDesc', type: 'field', dataSource: 'items', field: 'description', x: 27, y: 1, width: 90, height: 5, style: { fontSize: 8 } },
868
+ { id: 'dQty', type: 'field', dataSource: 'items', field: 'qty', x: 119, y: 1, width: 15, height: 5, format: '#,##0', style: { fontSize: 8, textAlign: 'right' } },
869
+ { id: 'dPrice', type: 'field', dataSource: 'items', field: 'unitPrice', x: 137, y: 1, width: 25, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
870
+ { id: 'dTotal', type: 'field', dataSource: 'items', field: 'total', x: 163, y: 1, width: 27, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
871
+ ],
872
+ },
873
+ {
874
+ id: 'rf', type: 'reportFooter', height: 35,
875
+ elements: [
876
+ { id: 'lineTop', type: 'line', x: 110, y: 2, width: 80, height: 0, x2: 190, y2: 2, lineStyle: { color: '#333', width: 1, style: 'solid' } },
877
+ { id: 'subtotalLabel', type: 'text', content: 'Subtotal:', x: 110, y: 5, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
878
+ { id: 'subtotalVal', type: 'field', dataSource: 'header', field: 'subtotal', x: 163, y: 5, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
879
+ { id: 'taxLabel', type: 'text', content: 'IVA (16%):', x: 110, y: 12, width: 50, height: 6, style: { fontSize: 9, textAlign: 'right' } },
880
+ { id: 'taxVal', type: 'field', dataSource: 'header', field: 'taxAmount', x: 163, y: 12, width: 27, height: 6, format: '$#,##0.00', style: { fontSize: 9, textAlign: 'right' } },
881
+ { id: 'line2', type: 'line', x: 140, y: 20, width: 50, height: 0, x2: 190, y2: 20, lineStyle: { color: '#c62828', width: 2, style: 'solid' } },
882
+ { id: 'totalLabel', type: 'text', content: 'TOTAL CREDITO:', x: 100, y: 23, width: 60, height: 8, style: { fontSize: 12, fontWeight: 'bold', textAlign: 'right' } },
883
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 160, y: 23, width: 30, height: 8, format: '$#,##0.00', style: { fontSize: 12, fontWeight: 'bold', textAlign: 'right', color: '#c62828' } },
884
+ { id: 'notesLabel', type: 'text', content: 'Observaciones:', x: 0, y: 5, width: 30, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#666' } },
885
+ { id: 'notesVal', type: 'field', dataSource: 'header', field: 'notes', x: 0, y: 11, width: 100, height: 10, style: { fontSize: 8, color: '#666' } },
886
+ ],
887
+ },
888
+ {
889
+ id: 'pf', type: 'pageFooter', height: 10,
890
+ elements: [
891
+ { id: 'pgNum', type: 'pageNumber', format: 'Pagina {page} de {pages}', x: 70, y: 2, width: 50, height: 6, style: { fontSize: 8, textAlign: 'center', color: '#888' } },
892
+ ],
893
+ },
894
+ ],
895
+ };
896
+ const CREDIT_NOTE_DATA = {
897
+ header: {
898
+ creditNumber: 'NC-2026-000318',
899
+ date: '2026-03-27T14:00:00Z',
900
+ originalInvoice: 'FAC-2026-001547',
901
+ originalDate: '2026-03-27T10:30:00Z',
902
+ clientName: 'Distribuidora La Esperanza C.A.',
903
+ clientRif: 'J-12345678-9',
904
+ clientAddress: 'Av. Libertador, Edf. Centro, Piso 3, Oficina 3A, Caracas 1010',
905
+ companyName: 'Zentto Solutions C.A.',
906
+ companyRif: 'J-50123456-7',
907
+ reason: 'Devolucion de mercancia por defecto de fabrica - Webcam Brio (1 unidad defectuosa)',
908
+ subtotal: 175.00,
909
+ taxAmount: 28.00,
910
+ grandTotal: 203.00,
911
+ notes: 'Credito aplicable a proxima factura. Producto devuelto al almacen para gestion de garantia.',
912
+ },
913
+ items: [
914
+ { code: 'ART-009', description: 'Webcam Logitech Brio 4K Ultra HD', qty: 1, unitPrice: 175.00, total: 175.00 },
915
+ ],
916
+ };
917
+ // =====================================================================
918
+ // 7. PRODUCT BARCODE LABEL — 50x30mm
919
+ // =====================================================================
920
+ const PRODUCT_BARCODE_LAYOUT = {
921
+ version: '1.0',
922
+ name: 'Etiqueta Codigo de Barras',
923
+ description: 'Etiqueta de producto 50x30mm con barcode, nombre y precio',
924
+ pageSize: { width: 50, height: 30, unit: 'mm' },
925
+ margins: { top: 2, right: 2, bottom: 2, left: 2 },
926
+ orientation: 'portrait',
927
+ dataSources: [
928
+ {
929
+ id: 'product', name: 'Producto', type: 'object',
930
+ fields: [
931
+ { name: 'code', label: 'SKU', type: 'string' },
932
+ { name: 'name', label: 'Nombre', type: 'string' },
933
+ { name: 'price', label: 'Precio', type: 'currency' },
934
+ { name: 'barcode', label: 'Codigo Barras', type: 'string' },
935
+ ],
936
+ },
937
+ ],
938
+ bands: [
939
+ {
940
+ id: 'detail', type: 'detail', height: 26, dataSource: 'product',
941
+ elements: [
942
+ { id: 'name', type: 'field', dataSource: 'product', field: 'name', x: 0, y: 0, width: 46, height: 6, style: { fontSize: 8, fontWeight: 'bold' } },
943
+ { id: 'sku', type: 'field', dataSource: 'product', field: 'code', x: 0, y: 6, width: 20, height: 4, style: { fontSize: 6, color: '#666' } },
944
+ { id: 'price', type: 'field', dataSource: 'product', field: 'price', format: '$#,##0.00', x: 20, y: 6, width: 26, height: 5, style: { fontSize: 10, fontWeight: 'bold', textAlign: 'right' } },
945
+ { id: 'bc', type: 'barcode', barcodeType: 'code128', value: '{{product.barcode}}', x: 0, y: 12, width: 46, height: 14 },
946
+ ],
947
+ },
948
+ ],
949
+ };
950
+ const PRODUCT_BARCODE_DATA = {
951
+ product: { code: 'ART-001', name: 'Laptop HP ProBook 450 G10', price: 850.00, barcode: '7501234567890' },
952
+ };
953
+ // =====================================================================
954
+ // 8. SHIPPING LABEL — 4x6"
955
+ // =====================================================================
956
+ const SHIPPING_LABEL_LAYOUT = {
957
+ version: '1.0',
958
+ name: 'Etiqueta de Envio 4x6',
959
+ description: 'Etiqueta de envio estandar con barcode de rastreo y QR',
960
+ pageSize: { width: 102, height: 152, unit: 'mm' },
961
+ margins: { top: 4, right: 4, bottom: 4, left: 4 },
962
+ orientation: 'portrait',
963
+ dataSources: [
964
+ {
965
+ id: 'shipment', name: 'Envio', type: 'object',
966
+ fields: [
967
+ { name: 'trackingNumber', label: 'N# Rastreo', type: 'string' },
968
+ { name: 'fromName', label: 'Remitente', type: 'string' },
969
+ { name: 'fromAddress', label: 'Dir. Remitente', type: 'string' },
970
+ { name: 'fromCity', label: 'Ciudad Remitente', type: 'string' },
971
+ { name: 'fromZip', label: 'Cod. Postal Rem.', type: 'string' },
972
+ { name: 'toName', label: 'Destinatario', type: 'string' },
973
+ { name: 'toAddress', label: 'Dir. Destinatario', type: 'string' },
974
+ { name: 'toCity', label: 'Ciudad Destinatario', type: 'string' },
975
+ { name: 'toZip', label: 'Cod. Postal Dest.', type: 'string' },
976
+ { name: 'weight', label: 'Peso', type: 'string' },
977
+ { name: 'service', label: 'Servicio', type: 'string' },
978
+ ],
979
+ },
980
+ ],
981
+ bands: [
982
+ {
983
+ id: 'label', type: 'detail', height: 144, dataSource: 'shipment',
984
+ elements: [
985
+ { id: 'fromLabel', type: 'text', content: 'REMITENTE:', x: 0, y: 0, width: 22, height: 5, style: { fontSize: 7, fontWeight: 'bold', color: '#666' } },
986
+ { id: 'fromName', type: 'field', dataSource: 'shipment', field: 'fromName', x: 0, y: 5, width: 50, height: 5, style: { fontSize: 8 } },
987
+ { id: 'fromAddr', type: 'field', dataSource: 'shipment', field: 'fromAddress', x: 0, y: 10, width: 50, height: 4, style: { fontSize: 7 } },
988
+ { id: 'fromCity', type: 'field', dataSource: 'shipment', field: 'fromCity', x: 0, y: 14, width: 35, height: 4, style: { fontSize: 7 } },
989
+ { id: 'fromZip', type: 'field', dataSource: 'shipment', field: 'fromZip', x: 36, y: 14, width: 14, height: 4, style: { fontSize: 7, fontWeight: 'bold' } },
990
+ { id: 'sep1', type: 'line', x: 0, y: 22, width: 94, height: 0, x2: 94, y2: 22, lineStyle: { color: '#000', width: 2, style: 'solid' } },
991
+ { id: 'toLabel', type: 'text', content: 'DESTINATARIO:', x: 0, y: 25, width: 30, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
992
+ { id: 'toName', type: 'field', dataSource: 'shipment', field: 'toName', x: 5, y: 32, width: 85, height: 10, style: { fontSize: 16, fontWeight: 'bold' } },
993
+ { id: 'toAddr', type: 'field', dataSource: 'shipment', field: 'toAddress', x: 5, y: 43, width: 85, height: 8, style: { fontSize: 12 } },
994
+ { id: 'toCity', type: 'field', dataSource: 'shipment', field: 'toCity', x: 5, y: 52, width: 60, height: 8, style: { fontSize: 12 } },
995
+ { id: 'toZip', type: 'field', dataSource: 'shipment', field: 'toZip', x: 60, y: 52, width: 30, height: 10, style: { fontSize: 18, fontWeight: 'bold', textAlign: 'right' } },
996
+ { id: 'sep2', type: 'line', x: 0, y: 68, width: 94, height: 0, x2: 94, y2: 68, lineStyle: { color: '#000', width: 1, style: 'solid' } },
997
+ { id: 'service', type: 'field', dataSource: 'shipment', field: 'service', x: 0, y: 70, width: 50, height: 8, style: { fontSize: 14, fontWeight: 'bold' } },
998
+ { id: 'weight', type: 'field', dataSource: 'shipment', field: 'weight', x: 55, y: 70, width: 39, height: 8, style: { fontSize: 12, textAlign: 'right' } },
999
+ { id: 'trackingBc', type: 'barcode', barcodeType: 'code128', value: '{{shipment.trackingNumber}}', x: 0, y: 82, width: 94, height: 25 },
1000
+ { id: 'trackingNum', type: 'field', dataSource: 'shipment', field: 'trackingNumber', x: 0, y: 108, width: 94, height: 6, style: { fontSize: 9, textAlign: 'center', fontFamily: 'Courier New' } },
1001
+ { id: 'qr', type: 'barcode', barcodeType: 'qr', value: '{{shipment.trackingNumber}}', x: 32, y: 117, width: 25, height: 25 },
1002
+ ],
1003
+ },
1004
+ ],
1005
+ };
1006
+ const SHIPPING_LABEL_DATA = {
1007
+ shipment: {
1008
+ trackingNumber: '1Z999AA10123456784',
1009
+ fromName: 'Zentto Solutions C.A.',
1010
+ fromAddress: 'Av. Francisco de Miranda, Torre Zentto, P8',
1011
+ fromCity: 'Caracas, VE',
1012
+ fromZip: '1060',
1013
+ toName: 'Distribuidora La Esperanza',
1014
+ toAddress: 'Calle 5, Zona Industrial Los Cortijos',
1015
+ toCity: 'Valencia, VE',
1016
+ toZip: '2001',
1017
+ weight: '12.5 kg',
1018
+ service: 'EXPRESS',
1019
+ },
1020
+ };
1021
+ // =====================================================================
1022
+ // 9. AVERY 5160 ADDRESS LABELS — 30 per sheet
1023
+ // =====================================================================
1024
+ const AVERY_5160_LAYOUT = {
1025
+ version: '1.0',
1026
+ name: 'Avery 5160 — Etiquetas de Direccion',
1027
+ description: '30 etiquetas de direccion por hoja Letter (3 columnas x 10 filas)',
1028
+ pageSize: { width: 216, height: 279, unit: 'mm' },
1029
+ margins: { top: 12.7, right: 4.8, bottom: 12.7, left: 4.8 },
1030
+ orientation: 'portrait',
1031
+ dataSources: [
1032
+ {
1033
+ id: 'contacts', name: 'Contactos', type: 'array',
1034
+ fields: [
1035
+ { name: 'name', label: 'Nombre', type: 'string' },
1036
+ { name: 'address', label: 'Direccion', type: 'string' },
1037
+ { name: 'city', label: 'Ciudad', type: 'string' },
1038
+ { name: 'state', label: 'Estado', type: 'string' },
1039
+ { name: 'zip', label: 'Cod. Postal', type: 'string' },
1040
+ ],
1041
+ },
1042
+ ],
1043
+ bands: [
1044
+ {
1045
+ id: 'detail', type: 'detail', height: 25.4, dataSource: 'contacts',
1046
+ elements: [
1047
+ { id: 'name', type: 'field', dataSource: 'contacts', field: 'name', x: 2, y: 3, width: 62, height: 6, style: { fontSize: 10, fontWeight: 'bold' } },
1048
+ { id: 'addr', type: 'field', dataSource: 'contacts', field: 'address', x: 2, y: 9, width: 62, height: 5, style: { fontSize: 9 } },
1049
+ { id: 'cityState', type: 'field', dataSource: 'contacts', field: 'city', x: 2, y: 15, width: 40, height: 5, style: { fontSize: 9 } },
1050
+ { id: 'zip', type: 'field', dataSource: 'contacts', field: 'zip', x: 43, y: 15, width: 21, height: 5, style: { fontSize: 9, fontWeight: 'bold' } },
1051
+ ],
1052
+ },
1053
+ ],
1054
+ };
1055
+ const AVERY_5160_DATA = {
1056
+ contacts: [
1057
+ { name: 'Maria Garcia Lopez', address: '123 Main Street, Apt 4B', city: 'Miami', state: 'FL', zip: '33101' },
1058
+ { name: 'Carlos Rodriguez Perez', address: '456 Oak Avenue', city: 'Houston', state: 'TX', zip: '77001' },
1059
+ { name: 'Ana Martinez Silva', address: '789 Pine Road, Suite 200', city: 'Los Angeles', state: 'CA', zip: '90001' },
1060
+ { name: 'Pedro Hernandez Diaz', address: '321 Elm Street', city: 'Chicago', state: 'IL', zip: '60601' },
1061
+ { name: 'Laura Fernandez Ruiz', address: '654 Cedar Blvd', city: 'New York', state: 'NY', zip: '10001' },
1062
+ { name: 'Jorge Morales Castro', address: '987 Walnut Drive', city: 'Phoenix', state: 'AZ', zip: '85001' },
1063
+ ],
1064
+ };
1065
+ // =====================================================================
1066
+ // 10. BUSINESS CARD — Avery 5371
1067
+ // =====================================================================
1068
+ const BUSINESS_CARD_LAYOUT = {
1069
+ version: '1.0',
1070
+ name: 'Tarjeta de Presentacion (Avery 5371)',
1071
+ description: '10 tarjetas de presentacion por hoja Letter (2 columnas x 5 filas)',
1072
+ pageSize: { width: 216, height: 279, unit: 'mm' },
1073
+ margins: { top: 19, right: 16.5, bottom: 19, left: 16.5 },
1074
+ orientation: 'portrait',
1075
+ dataSources: [
1076
+ {
1077
+ id: 'card', name: 'Tarjeta', type: 'object',
1078
+ fields: [
1079
+ { name: 'name', label: 'Nombre', type: 'string' },
1080
+ { name: 'title', label: 'Cargo', type: 'string' },
1081
+ { name: 'company', label: 'Empresa', type: 'string' },
1082
+ { name: 'phone', label: 'Telefono', type: 'string' },
1083
+ { name: 'email', label: 'Email', type: 'string' },
1084
+ { name: 'website', label: 'Website', type: 'string' },
1085
+ ],
1086
+ },
1087
+ ],
1088
+ bands: [
1089
+ {
1090
+ id: 'detail', type: 'detail', height: 51, dataSource: 'card',
1091
+ elements: [
1092
+ { id: 'company', type: 'field', dataSource: 'card', field: 'company', x: 3, y: 5, width: 83, height: 8, style: { fontSize: 12, fontWeight: 'bold', color: '#1a1a2e' } },
1093
+ { id: 'name', type: 'field', dataSource: 'card', field: 'name', x: 3, y: 15, width: 83, height: 7, style: { fontSize: 11 } },
1094
+ { id: 'title', type: 'field', dataSource: 'card', field: 'title', x: 3, y: 22, width: 83, height: 5, style: { fontSize: 8, color: '#666' } },
1095
+ { id: 'phone', type: 'field', dataSource: 'card', field: 'phone', x: 3, y: 32, width: 40, height: 5, style: { fontSize: 8 } },
1096
+ { id: 'email', type: 'field', dataSource: 'card', field: 'email', x: 3, y: 37, width: 60, height: 5, style: { fontSize: 8 } },
1097
+ { id: 'web', type: 'field', dataSource: 'card', field: 'website', x: 3, y: 42, width: 60, height: 5, style: { fontSize: 8, color: '#1976d2' } },
1098
+ ],
1099
+ },
1100
+ ],
1101
+ };
1102
+ const BUSINESS_CARD_DATA = {
1103
+ card: {
1104
+ name: 'Raul Gonzalez Quijada',
1105
+ title: 'CTO & Co-Founder',
1106
+ company: 'Zentto Solutions',
1107
+ phone: '+58 414-123-4567',
1108
+ email: 'raul@zentto.net',
1109
+ website: 'https://zentto.net',
1110
+ },
1111
+ };
1112
+ // =====================================================================
1113
+ // 11. INVENTORY QR TAG — 50x25mm
1114
+ // =====================================================================
1115
+ const INVENTORY_QR_LAYOUT = {
1116
+ version: '1.0',
1117
+ name: 'Etiqueta QR de Inventario',
1118
+ description: 'Etiqueta de almacen 50x25mm con QR, SKU, ubicacion y cantidad',
1119
+ pageSize: { width: 50, height: 25, unit: 'mm' },
1120
+ margins: { top: 1, right: 1, bottom: 1, left: 1 },
1121
+ orientation: 'landscape',
1122
+ dataSources: [
1123
+ {
1124
+ id: 'item', name: 'Item', type: 'object',
1125
+ fields: [
1126
+ { name: 'sku', label: 'SKU', type: 'string' },
1127
+ { name: 'name', label: 'Nombre', type: 'string' },
1128
+ { name: 'location', label: 'Ubicacion', type: 'string' },
1129
+ { name: 'qty', label: 'Cantidad', type: 'number' },
1130
+ ],
1131
+ },
1132
+ ],
1133
+ bands: [
1134
+ {
1135
+ id: 'detail', type: 'detail', height: 23, dataSource: 'item',
1136
+ elements: [
1137
+ { id: 'qr', type: 'barcode', barcodeType: 'qr', value: '{{item.sku}}', x: 0, y: 0, width: 21, height: 21 },
1138
+ { id: 'name', type: 'field', dataSource: 'item', field: 'name', x: 23, y: 0, width: 25, height: 5, style: { fontSize: 7, fontWeight: 'bold' } },
1139
+ { id: 'sku', type: 'field', dataSource: 'item', field: 'sku', x: 23, y: 5, width: 25, height: 4, style: { fontSize: 6, fontFamily: 'Courier New' } },
1140
+ { id: 'loc', type: 'field', dataSource: 'item', field: 'location', x: 23, y: 10, width: 15, height: 5, style: { fontSize: 8, fontWeight: 'bold', color: '#d32f2f' } },
1141
+ { id: 'qty', type: 'field', dataSource: 'item', field: 'qty', format: '#,##0', x: 38, y: 10, width: 10, height: 5, style: { fontSize: 8, textAlign: 'right' } },
1142
+ ],
1143
+ },
1144
+ ],
1145
+ };
1146
+ const INVENTORY_QR_DATA = {
1147
+ item: { sku: 'INV-2026-0045', name: 'SSD NVMe 1TB Samsung', location: 'A3-R2-S5', qty: 150 },
1148
+ };
1149
+ // =====================================================================
1150
+ // 12. PRICE TAG / SHELF LABEL
1151
+ // =====================================================================
1152
+ const PRICE_TAG_LAYOUT = {
1153
+ version: '1.0',
1154
+ name: 'Etiqueta de Precio (Gondola)',
1155
+ description: 'Etiqueta de precio para estanteria con nombre, precio grande y barcode',
1156
+ pageSize: { width: 60, height: 40, unit: 'mm' },
1157
+ margins: { top: 2, right: 2, bottom: 2, left: 2 },
1158
+ orientation: 'landscape',
1159
+ dataSources: [
1160
+ {
1161
+ id: 'product', name: 'Producto', type: 'object',
1162
+ fields: [
1163
+ { name: 'name', label: 'Nombre', type: 'string' },
1164
+ { name: 'code', label: 'Codigo', type: 'string' },
1165
+ { name: 'price', label: 'Precio', type: 'currency' },
1166
+ { name: 'unit', label: 'Unidad', type: 'string' },
1167
+ { name: 'barcode', label: 'Barcode', type: 'string' },
1168
+ ],
1169
+ },
1170
+ ],
1171
+ bands: [
1172
+ {
1173
+ id: 'detail', type: 'detail', height: 36, dataSource: 'product',
1174
+ elements: [
1175
+ { id: 'name', type: 'field', dataSource: 'product', field: 'name', x: 0, y: 0, width: 56, height: 7, style: { fontSize: 8, fontWeight: 'bold' } },
1176
+ { id: 'code', type: 'field', dataSource: 'product', field: 'code', x: 0, y: 7, width: 25, height: 4, style: { fontSize: 5.5, color: '#888', fontFamily: 'Courier New' } },
1177
+ { id: 'price', type: 'field', dataSource: 'product', field: 'price', format: '$#,##0.00', x: 0, y: 12, width: 56, height: 12, style: { fontSize: 18, fontWeight: 'bold', textAlign: 'center', color: '#c62828' } },
1178
+ { id: 'unit', type: 'field', dataSource: 'product', field: 'unit', x: 40, y: 7, width: 16, height: 4, style: { fontSize: 5.5, textAlign: 'right', color: '#666' } },
1179
+ { id: 'bc', type: 'barcode', barcodeType: 'code128', value: '{{product.barcode}}', x: 4, y: 26, width: 48, height: 10 },
1180
+ ],
1181
+ },
1182
+ ],
1183
+ };
1184
+ const PRICE_TAG_DATA = {
1185
+ product: { name: 'Teclado Logitech MX Keys', code: 'PER-001', price: 95.00, unit: 'c/u', barcode: '7501234500123' },
1186
+ };
1187
+ // =====================================================================
1188
+ // 13. POS RECEIPT 80mm
1189
+ // =====================================================================
1190
+ const POS_RECEIPT_80_LAYOUT = {
1191
+ version: '1.0',
1192
+ name: 'Recibo POS 80mm',
1193
+ description: 'Recibo punto de venta 80mm con items, total, metodo de pago y barcode',
1194
+ pageSize: { width: 80, height: 297, unit: 'mm' },
1195
+ margins: { top: 3, right: 3, bottom: 3, left: 3 },
1196
+ orientation: 'portrait',
1197
+ dataSources: [
1198
+ {
1199
+ id: 'header', name: 'Encabezado', type: 'object',
1200
+ fields: [
1201
+ { name: 'storeName', label: 'Tienda', type: 'string' },
1202
+ { name: 'storeRif', label: 'RIF', type: 'string' },
1203
+ { name: 'storeAddress', label: 'Direccion', type: 'string' },
1204
+ { name: 'storePhone', label: 'Telefono', type: 'string' },
1205
+ { name: 'receiptNumber', label: 'N# Recibo', type: 'string' },
1206
+ { name: 'date', label: 'Fecha', type: 'date' },
1207
+ { name: 'cashier', label: 'Cajero', type: 'string' },
1208
+ { name: 'terminal', label: 'Terminal', type: 'string' },
1209
+ { name: 'clientName', label: 'Cliente', type: 'string' },
1210
+ { name: 'subtotal', label: 'Subtotal', type: 'currency' },
1211
+ { name: 'taxAmount', label: 'IVA', type: 'currency' },
1212
+ { name: 'grandTotal', label: 'Total', type: 'currency' },
1213
+ { name: 'paymentMethod', label: 'Forma de Pago', type: 'string' },
1214
+ { name: 'amountPaid', label: 'Monto Pagado', type: 'currency' },
1215
+ { name: 'change', label: 'Cambio', type: 'currency' },
1216
+ { name: 'barcode', label: 'Barcode Recibo', type: 'string' },
1217
+ ],
1218
+ },
1219
+ {
1220
+ id: 'items', name: 'Items', type: 'array',
1221
+ fields: [
1222
+ { name: 'description', label: 'Descripcion', type: 'string' },
1223
+ { name: 'qty', label: 'Cant.', type: 'number' },
1224
+ { name: 'price', label: 'Precio', type: 'currency' },
1225
+ { name: 'total', label: 'Total', type: 'currency' },
1226
+ ],
1227
+ },
1228
+ ],
1229
+ bands: [
1230
+ {
1231
+ id: 'rh', type: 'reportHeader', height: 32,
1232
+ elements: [
1233
+ { id: 'store', type: 'field', dataSource: 'header', field: 'storeName', x: 0, y: 0, width: 74, height: 8, style: { fontSize: 14, fontWeight: 'bold', textAlign: 'center' } },
1234
+ { id: 'rif', type: 'field', dataSource: 'header', field: 'storeRif', x: 0, y: 9, width: 74, height: 5, style: { fontSize: 8, textAlign: 'center', color: '#555' } },
1235
+ { id: 'addr', type: 'field', dataSource: 'header', field: 'storeAddress', x: 0, y: 14, width: 74, height: 5, style: { fontSize: 7, textAlign: 'center', color: '#888' } },
1236
+ { id: 'phone', type: 'field', dataSource: 'header', field: 'storePhone', x: 0, y: 19, width: 74, height: 5, style: { fontSize: 7, textAlign: 'center', color: '#888' } },
1237
+ { id: 'sep', type: 'line', x: 0, y: 27, width: 74, height: 0, x2: 74, y2: 27, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1238
+ ],
1239
+ },
1240
+ {
1241
+ id: 'ph', type: 'pageHeader', height: 18,
1242
+ elements: [
1243
+ { id: 'recLabel', type: 'text', content: 'Recibo:', x: 0, y: 0, width: 14, height: 5, style: { fontSize: 8, fontWeight: 'bold' } },
1244
+ { id: 'recVal', type: 'field', dataSource: 'header', field: 'receiptNumber', x: 15, y: 0, width: 30, height: 5, style: { fontSize: 8 } },
1245
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM/yyyy HH:mm', x: 40, y: 0, width: 34, height: 5, style: { fontSize: 7, textAlign: 'right' } },
1246
+ { id: 'cashierLabel', type: 'text', content: 'Cajero:', x: 0, y: 6, width: 14, height: 5, style: { fontSize: 7 } },
1247
+ { id: 'cashierVal', type: 'field', dataSource: 'header', field: 'cashier', x: 15, y: 6, width: 30, height: 5, style: { fontSize: 7 } },
1248
+ { id: 'termVal', type: 'field', dataSource: 'header', field: 'terminal', x: 55, y: 6, width: 19, height: 5, style: { fontSize: 7, textAlign: 'right' } },
1249
+ { id: 'sep2', type: 'line', x: 0, y: 14, width: 74, height: 0, x2: 74, y2: 14, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1250
+ ],
1251
+ },
1252
+ {
1253
+ id: 'det', type: 'detail', height: 6, dataSource: 'items',
1254
+ elements: [
1255
+ { id: 'desc', type: 'field', dataSource: 'items', field: 'description', x: 0, y: 0, width: 40, height: 5, style: { fontSize: 7.5 } },
1256
+ { id: 'qty', type: 'field', dataSource: 'items', field: 'qty', x: 41, y: 0, width: 8, height: 5, format: '#,##0', style: { fontSize: 7.5, textAlign: 'right' } },
1257
+ { id: 'price', type: 'field', dataSource: 'items', field: 'price', x: 50, y: 0, width: 12, height: 5, format: '#,##0.00', style: { fontSize: 7, textAlign: 'right', color: '#666' } },
1258
+ { id: 'total', type: 'field', dataSource: 'items', field: 'total', x: 62, y: 0, width: 12, height: 5, format: '#,##0.00', style: { fontSize: 7.5, textAlign: 'right', fontWeight: 'bold' } },
1259
+ ],
1260
+ },
1261
+ {
1262
+ id: 'rf', type: 'reportFooter', height: 60,
1263
+ elements: [
1264
+ { id: 'sep3', type: 'line', x: 0, y: 1, width: 74, height: 0, x2: 74, y2: 1, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1265
+ { id: 'subtLabel', type: 'text', content: 'Subtotal:', x: 0, y: 4, width: 40, height: 5, style: { fontSize: 8 } },
1266
+ { id: 'subtVal', type: 'field', dataSource: 'header', field: 'subtotal', x: 50, y: 4, width: 24, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
1267
+ { id: 'taxLabel', type: 'text', content: 'IVA (16%):', x: 0, y: 10, width: 40, height: 5, style: { fontSize: 8 } },
1268
+ { id: 'taxVal', type: 'field', dataSource: 'header', field: 'taxAmount', x: 50, y: 10, width: 24, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
1269
+ { id: 'sep4', type: 'line', x: 0, y: 17, width: 74, height: 0, x2: 74, y2: 17, lineStyle: { color: '#000', width: 2, style: 'solid' } },
1270
+ { id: 'totalLabel', type: 'text', content: 'TOTAL:', x: 0, y: 19, width: 30, height: 8, style: { fontSize: 14, fontWeight: 'bold' } },
1271
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 30, y: 19, width: 44, height: 8, format: '$#,##0.00', style: { fontSize: 14, fontWeight: 'bold', textAlign: 'right' } },
1272
+ { id: 'payLabel', type: 'text', content: 'Pago:', x: 0, y: 29, width: 12, height: 5, style: { fontSize: 8 } },
1273
+ { id: 'payVal', type: 'field', dataSource: 'header', field: 'paymentMethod', x: 13, y: 29, width: 35, height: 5, style: { fontSize: 8 } },
1274
+ { id: 'paidVal', type: 'field', dataSource: 'header', field: 'amountPaid', x: 50, y: 29, width: 24, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
1275
+ { id: 'changeLabel', type: 'text', content: 'Cambio:', x: 0, y: 35, width: 18, height: 5, style: { fontSize: 8 } },
1276
+ { id: 'changeVal', type: 'field', dataSource: 'header', field: 'change', x: 50, y: 35, width: 24, height: 5, format: '$#,##0.00', style: { fontSize: 8, textAlign: 'right' } },
1277
+ { id: 'sep5', type: 'line', x: 0, y: 42, width: 74, height: 0, x2: 74, y2: 42, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1278
+ { id: 'thanks', type: 'text', content: 'Gracias por su compra!', x: 0, y: 44, width: 74, height: 6, style: { fontSize: 9, fontWeight: 'bold', textAlign: 'center' } },
1279
+ { id: 'bc', type: 'barcode', barcodeType: 'code128', value: '{{header.barcode}}', x: 7, y: 51, width: 60, height: 8 },
1280
+ ],
1281
+ },
1282
+ ],
1283
+ };
1284
+ const POS_RECEIPT_80_DATA = {
1285
+ header: {
1286
+ storeName: 'Zentto Store',
1287
+ storeRif: 'J-50123456-7',
1288
+ storeAddress: 'C.C. Sambil, Nivel Autopista, L-234, Caracas',
1289
+ storePhone: '+58 212-999-8888',
1290
+ receiptNumber: 'R-2026-045892',
1291
+ date: '2026-03-27T16:45:00Z',
1292
+ cashier: 'Maria Perez',
1293
+ terminal: 'POS-03',
1294
+ clientName: 'Cliente General',
1295
+ subtotal: 348.50,
1296
+ taxAmount: 55.76,
1297
+ grandTotal: 404.26,
1298
+ paymentMethod: 'Tarjeta Debito',
1299
+ amountPaid: 404.26,
1300
+ change: 0,
1301
+ barcode: 'R2026045892',
1302
+ },
1303
+ items: [
1304
+ { description: 'Teclado Logitech MX Keys', qty: 1, price: 95.00, total: 95.00 },
1305
+ { description: 'Mouse Logitech MX Master 3S', qty: 1, price: 85.00, total: 85.00 },
1306
+ { description: 'Hub USB-C 7 puertos PD 100W', qty: 1, price: 55.00, total: 55.00 },
1307
+ { description: 'Cable HDMI 2.1 Ultra HD 2m', qty: 2, price: 18.50, total: 37.00 },
1308
+ { description: 'Cable USB-C a USB-C 1.5m', qty: 2, price: 15.00, total: 30.00 },
1309
+ { description: 'Memoria USB SanDisk 128GB', qty: 3, price: 12.00, total: 36.00 },
1310
+ { description: 'Mousepad Ergonomico XL', qty: 1, price: 10.50, total: 10.50 },
1311
+ ],
1312
+ };
1313
+ // =====================================================================
1314
+ // 14. POS RECEIPT 58mm — Compact
1315
+ // =====================================================================
1316
+ const POS_RECEIPT_58_LAYOUT = {
1317
+ version: '1.0',
1318
+ name: 'Recibo POS 58mm',
1319
+ description: 'Recibo compacto para impresoras termicas de 58mm',
1320
+ pageSize: { width: 58, height: 297, unit: 'mm' },
1321
+ margins: { top: 2, right: 2, bottom: 2, left: 2 },
1322
+ orientation: 'portrait',
1323
+ dataSources: [
1324
+ {
1325
+ id: 'header', name: 'Encabezado', type: 'object',
1326
+ fields: [
1327
+ { name: 'storeName', label: 'Tienda', type: 'string' },
1328
+ { name: 'storeRif', label: 'RIF', type: 'string' },
1329
+ { name: 'receiptNumber', label: 'N# Recibo', type: 'string' },
1330
+ { name: 'date', label: 'Fecha', type: 'date' },
1331
+ { name: 'cashier', label: 'Cajero', type: 'string' },
1332
+ { name: 'grandTotal', label: 'Total', type: 'currency' },
1333
+ { name: 'paymentMethod', label: 'Forma de Pago', type: 'string' },
1334
+ { name: 'barcode', label: 'Barcode', type: 'string' },
1335
+ ],
1336
+ },
1337
+ {
1338
+ id: 'items', name: 'Items', type: 'array',
1339
+ fields: [
1340
+ { name: 'description', label: 'Descripcion', type: 'string' },
1341
+ { name: 'qty', label: 'Cant.', type: 'number' },
1342
+ { name: 'total', label: 'Total', type: 'currency' },
1343
+ ],
1344
+ },
1345
+ ],
1346
+ bands: [
1347
+ {
1348
+ id: 'rh', type: 'reportHeader', height: 22,
1349
+ elements: [
1350
+ { id: 'store', type: 'field', dataSource: 'header', field: 'storeName', x: 0, y: 0, width: 54, height: 7, style: { fontSize: 11, fontWeight: 'bold', textAlign: 'center' } },
1351
+ { id: 'rif', type: 'field', dataSource: 'header', field: 'storeRif', x: 0, y: 8, width: 54, height: 4, style: { fontSize: 7, textAlign: 'center', color: '#555' } },
1352
+ { id: 'recVal', type: 'field', dataSource: 'header', field: 'receiptNumber', x: 0, y: 13, width: 30, height: 4, style: { fontSize: 6.5 } },
1353
+ { id: 'dateVal', type: 'field', dataSource: 'header', field: 'date', format: 'dd/MM HH:mm', x: 30, y: 13, width: 24, height: 4, style: { fontSize: 6.5, textAlign: 'right' } },
1354
+ { id: 'sep', type: 'line', x: 0, y: 19, width: 54, height: 0, x2: 54, y2: 19, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1355
+ ],
1356
+ },
1357
+ {
1358
+ id: 'det', type: 'detail', height: 5, dataSource: 'items',
1359
+ elements: [
1360
+ { id: 'desc', type: 'field', dataSource: 'items', field: 'description', x: 0, y: 0, width: 30, height: 4, style: { fontSize: 6.5 } },
1361
+ { id: 'qty', type: 'field', dataSource: 'items', field: 'qty', x: 31, y: 0, width: 8, height: 4, format: 'x#,##0', style: { fontSize: 6.5, textAlign: 'right' } },
1362
+ { id: 'total', type: 'field', dataSource: 'items', field: 'total', x: 40, y: 0, width: 14, height: 4, format: '#,##0.00', style: { fontSize: 6.5, textAlign: 'right', fontWeight: 'bold' } },
1363
+ ],
1364
+ },
1365
+ {
1366
+ id: 'rf', type: 'reportFooter', height: 38,
1367
+ elements: [
1368
+ { id: 'sep2', type: 'line', x: 0, y: 1, width: 54, height: 0, x2: 54, y2: 1, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1369
+ { id: 'totalLabel', type: 'text', content: 'TOTAL:', x: 0, y: 3, width: 24, height: 7, style: { fontSize: 12, fontWeight: 'bold' } },
1370
+ { id: 'totalVal', type: 'field', dataSource: 'header', field: 'grandTotal', x: 24, y: 3, width: 30, height: 7, format: '$#,##0.00', style: { fontSize: 12, fontWeight: 'bold', textAlign: 'right' } },
1371
+ { id: 'payVal', type: 'field', dataSource: 'header', field: 'paymentMethod', x: 0, y: 12, width: 54, height: 5, style: { fontSize: 7, textAlign: 'center', color: '#666' } },
1372
+ { id: 'sep3', type: 'line', x: 0, y: 19, width: 54, height: 0, x2: 54, y2: 19, lineStyle: { color: '#000', width: 1, style: 'dashed' } },
1373
+ { id: 'thanks', type: 'text', content: 'Gracias!', x: 0, y: 21, width: 54, height: 5, style: { fontSize: 8, fontWeight: 'bold', textAlign: 'center' } },
1374
+ { id: 'bc', type: 'barcode', barcodeType: 'code128', value: '{{header.barcode}}', x: 5, y: 28, width: 44, height: 8 },
1375
+ ],
1376
+ },
1377
+ ],
1378
+ };
1379
+ const POS_RECEIPT_58_DATA = {
1380
+ header: {
1381
+ storeName: 'Zentto Store',
1382
+ storeRif: 'J-50123456-7',
1383
+ receiptNumber: 'R-2026-045893',
1384
+ date: '2026-03-27T17:12:00Z',
1385
+ cashier: 'Carlos M.',
1386
+ grandTotal: 230.00,
1387
+ paymentMethod: 'Efectivo USD',
1388
+ barcode: 'R2026045893',
1389
+ },
1390
+ items: [
1391
+ { description: 'Mouse MX Master 3S', qty: 1, total: 85.00 },
1392
+ { description: 'Teclado MX Keys', qty: 1, total: 95.00 },
1393
+ { description: 'Cable HDMI 2.1 2m', qty: 2, total: 37.00 },
1394
+ { description: 'USB SanDisk 128GB', qty: 1, total: 12.00 },
1395
+ { description: 'Funda Laptop 15"', qty: 1, total: 1.00 },
1396
+ ],
1397
+ };
1398
+ // =====================================================================
1399
+ // 15. ID BADGE / NAME TAG
1400
+ // =====================================================================
1401
+ const ID_BADGE_LAYOUT = {
1402
+ version: '1.0',
1403
+ name: 'Credencial / Gafete',
1404
+ description: 'Credencial de identificacion con foto, nombre, cargo y QR',
1405
+ pageSize: { width: 86, height: 54, unit: 'mm' },
1406
+ margins: { top: 3, right: 3, bottom: 3, left: 3 },
1407
+ orientation: 'landscape',
1408
+ dataSources: [
1409
+ {
1410
+ id: 'person', name: 'Persona', type: 'object',
1411
+ fields: [
1412
+ { name: 'name', label: 'Nombre', type: 'string' },
1413
+ { name: 'title', label: 'Cargo', type: 'string' },
1414
+ { name: 'department', label: 'Departamento', type: 'string' },
1415
+ { name: 'company', label: 'Empresa', type: 'string' },
1416
+ { name: 'employeeId', label: 'ID Empleado', type: 'string' },
1417
+ { name: 'photoUrl', label: 'Foto URL', type: 'image' },
1418
+ ],
1419
+ },
1420
+ ],
1421
+ bands: [
1422
+ {
1423
+ id: 'detail', type: 'detail', height: 48, dataSource: 'person',
1424
+ elements: [
1425
+ // Company header
1426
+ { id: 'company', type: 'field', dataSource: 'person', field: 'company', x: 0, y: 0, width: 80, height: 7, style: { fontSize: 10, fontWeight: 'bold', textAlign: 'center', color: '#1a1a2e' } },
1427
+ { id: 'line1', type: 'line', x: 0, y: 8, width: 80, height: 0, x2: 80, y2: 8, lineStyle: { color: '#1a1a2e', width: 1.5, style: 'solid' } },
1428
+ // Photo placeholder
1429
+ { id: 'photo', type: 'rect', x: 2, y: 11, width: 22, height: 26, fill: '#e0e0e0', cornerRadius: 2 },
1430
+ { id: 'photoPlaceholder', type: 'text', content: 'FOTO', x: 2, y: 20, width: 22, height: 8, style: { fontSize: 7, textAlign: 'center', color: '#999' } },
1431
+ // Person info
1432
+ { id: 'name', type: 'field', dataSource: 'person', field: 'name', x: 27, y: 12, width: 53, height: 8, style: { fontSize: 12, fontWeight: 'bold' } },
1433
+ { id: 'title', type: 'field', dataSource: 'person', field: 'title', x: 27, y: 21, width: 53, height: 6, style: { fontSize: 9, color: '#555' } },
1434
+ { id: 'dept', type: 'field', dataSource: 'person', field: 'department', x: 27, y: 28, width: 35, height: 5, style: { fontSize: 8, color: '#888' } },
1435
+ // QR code
1436
+ { id: 'qr', type: 'barcode', barcodeType: 'qr', value: '{{person.employeeId}}', x: 62, y: 28, width: 18, height: 18 },
1437
+ // Employee ID at bottom
1438
+ { id: 'idLabel', type: 'text', content: 'ID:', x: 2, y: 40, width: 8, height: 5, style: { fontSize: 7, fontWeight: 'bold', color: '#888' } },
1439
+ { id: 'idVal', type: 'field', dataSource: 'person', field: 'employeeId', x: 10, y: 40, width: 30, height: 5, style: { fontSize: 7, fontFamily: 'Courier New', color: '#555' } },
1440
+ ],
1441
+ },
1442
+ ],
1443
+ };
1444
+ const ID_BADGE_DATA = {
1445
+ person: {
1446
+ name: 'Raul Gonzalez',
1447
+ title: 'Director de Tecnologia',
1448
+ department: 'Ingenieria',
1449
+ company: 'Zentto Solutions',
1450
+ employeeId: 'EMP-2026-0001',
1451
+ photoUrl: '',
1452
+ },
1453
+ };
1454
+ // =====================================================================
1455
+ // REGISTRY — All templates in one array
1456
+ // =====================================================================
1457
+ export const REPORT_TEMPLATES = [
1458
+ // ── Reports ───────────────────────────────────────────────────────
1459
+ {
1460
+ id: 'invoice',
1461
+ name: 'Factura de Venta',
1462
+ description: 'Factura completa con detalle, impuestos, descuentos y totales',
1463
+ category: 'report',
1464
+ icon: '\uD83E\uDDFE', // receipt emoji
1465
+ color: '#1a1a2e',
1466
+ layout: INVOICE_LAYOUT,
1467
+ sampleData: INVOICE_DATA,
1468
+ },
1469
+ {
1470
+ id: 'pricelist',
1471
+ name: 'Lista de Precios',
1472
+ description: 'Catalogo de productos por categoria con precios vigentes',
1473
+ category: 'report',
1474
+ icon: '\uD83D\uDCCB', // clipboard emoji
1475
+ color: '#0d47a1',
1476
+ layout: PRICELIST_LAYOUT,
1477
+ sampleData: PRICELIST_DATA,
1478
+ },
1479
+ {
1480
+ id: 'delivery-note',
1481
+ name: 'Nota de Entrega',
1482
+ description: 'Despacho con datos de almacen, conductor, vehiculo y firma',
1483
+ category: 'report',
1484
+ icon: '\uD83D\uDE9A', // truck emoji
1485
+ color: '#2e7d32',
1486
+ layout: DELIVERY_LAYOUT,
1487
+ sampleData: DELIVERY_DATA,
1488
+ },
1489
+ {
1490
+ id: 'purchase-order',
1491
+ name: 'Orden de Compra',
1492
+ description: 'Orden a proveedor con items, condiciones de pago y autorizacion',
1493
+ category: 'report',
1494
+ icon: '\uD83D\uDED2', // shopping cart emoji
1495
+ color: '#e65100',
1496
+ layout: PURCHASE_ORDER_LAYOUT,
1497
+ sampleData: PURCHASE_ORDER_DATA,
1498
+ },
1499
+ {
1500
+ id: 'quote',
1501
+ name: 'Presupuesto / Cotizacion',
1502
+ description: 'Cotizacion con items, validez, garantia y condiciones comerciales',
1503
+ category: 'report',
1504
+ icon: '\uD83D\uDCDD', // memo emoji
1505
+ color: '#6a1b9a',
1506
+ layout: QUOTE_LAYOUT,
1507
+ sampleData: QUOTE_DATA,
1508
+ },
1509
+ {
1510
+ id: 'credit-note',
1511
+ name: 'Nota de Credito',
1512
+ description: 'Credito referenciado a factura original con motivo y detalle',
1513
+ category: 'report',
1514
+ icon: '\u21A9\uFE0F', // leftwards arrow emoji
1515
+ color: '#c62828',
1516
+ layout: CREDIT_NOTE_LAYOUT,
1517
+ sampleData: CREDIT_NOTE_DATA,
1518
+ },
1519
+ // ── Labels ────────────────────────────────────────────────────────
1520
+ {
1521
+ id: 'product-barcode',
1522
+ name: 'Etiqueta Producto (50x30mm)',
1523
+ description: 'Etiqueta con nombre, SKU, precio y codigo de barras',
1524
+ category: 'label',
1525
+ icon: '\uD83C\uDFF7\uFE0F', // label emoji
1526
+ color: '#37474f',
1527
+ layout: PRODUCT_BARCODE_LAYOUT,
1528
+ sampleData: PRODUCT_BARCODE_DATA,
1529
+ },
1530
+ {
1531
+ id: 'shipping-label',
1532
+ name: 'Etiqueta Envio 4x6"',
1533
+ description: 'Etiqueta de envio con remitente, destinatario, barcode y QR',
1534
+ category: 'label',
1535
+ icon: '\uD83D\uDCE6', // package emoji
1536
+ color: '#455a64',
1537
+ layout: SHIPPING_LABEL_LAYOUT,
1538
+ sampleData: SHIPPING_LABEL_DATA,
1539
+ },
1540
+ {
1541
+ id: 'avery-5160-address',
1542
+ name: 'Avery 5160 Direcciones',
1543
+ description: '30 etiquetas de direccion por hoja Letter',
1544
+ category: 'label',
1545
+ icon: '\u2709\uFE0F', // envelope emoji
1546
+ color: '#546e7a',
1547
+ layout: AVERY_5160_LAYOUT,
1548
+ sampleData: AVERY_5160_DATA,
1549
+ },
1550
+ {
1551
+ id: 'inventory-qr-tag',
1552
+ name: 'Etiqueta QR Inventario (50x25mm)',
1553
+ description: 'Etiqueta con QR, SKU, ubicacion y cantidad para almacen',
1554
+ category: 'label',
1555
+ icon: '\uD83D\uDCE6', // package emoji
1556
+ color: '#d32f2f',
1557
+ layout: INVENTORY_QR_LAYOUT,
1558
+ sampleData: INVENTORY_QR_DATA,
1559
+ },
1560
+ {
1561
+ id: 'price-tag',
1562
+ name: 'Etiqueta de Precio (Gondola)',
1563
+ description: 'Etiqueta de estanteria con nombre, precio grande y barcode',
1564
+ category: 'label',
1565
+ icon: '\uD83D\uDCB2', // dollar sign emoji
1566
+ color: '#c62828',
1567
+ layout: PRICE_TAG_LAYOUT,
1568
+ sampleData: PRICE_TAG_DATA,
1569
+ },
1570
+ // ── Receipts ──────────────────────────────────────────────────────
1571
+ {
1572
+ id: 'pos-receipt-80mm',
1573
+ name: 'Recibo POS 80mm',
1574
+ description: 'Recibo punto de venta estandar con items, total y barcode',
1575
+ category: 'receipt',
1576
+ icon: '\uD83E\uDDFE', // receipt emoji
1577
+ color: '#212121',
1578
+ layout: POS_RECEIPT_80_LAYOUT,
1579
+ sampleData: POS_RECEIPT_80_DATA,
1580
+ },
1581
+ {
1582
+ id: 'pos-receipt-58mm',
1583
+ name: 'Recibo POS 58mm',
1584
+ description: 'Recibo compacto para impresoras termicas portatiles',
1585
+ category: 'receipt',
1586
+ icon: '\uD83E\uDDFE', // receipt emoji
1587
+ color: '#424242',
1588
+ layout: POS_RECEIPT_58_LAYOUT,
1589
+ sampleData: POS_RECEIPT_58_DATA,
1590
+ },
1591
+ // ── Cards ─────────────────────────────────────────────────────────
1592
+ {
1593
+ id: 'business-card',
1594
+ name: 'Tarjeta de Presentacion',
1595
+ description: 'Tarjeta Avery 5371 con nombre, cargo, empresa y contacto',
1596
+ category: 'card',
1597
+ icon: '\uD83D\uDCBC', // briefcase emoji
1598
+ color: '#1a1a2e',
1599
+ layout: BUSINESS_CARD_LAYOUT,
1600
+ sampleData: BUSINESS_CARD_DATA,
1601
+ },
1602
+ {
1603
+ id: 'id-badge',
1604
+ name: 'Credencial / Gafete',
1605
+ description: 'Credencial de identificacion con foto, cargo, departamento y QR',
1606
+ category: 'card',
1607
+ icon: '\uD83E\uDEAA', // id card emoji
1608
+ color: '#1a237e',
1609
+ layout: ID_BADGE_LAYOUT,
1610
+ sampleData: ID_BADGE_DATA,
1611
+ },
1612
+ ];
1613
+ // ─── Helpers ──────────────────────────────────────────────────────────
1614
+ /** Retrieve a template by its unique id */
1615
+ export function getTemplateById(id) {
1616
+ return REPORT_TEMPLATES.find(t => t.id === id);
1617
+ }
1618
+ /** Retrieve all templates that belong to a given category */
1619
+ export function getTemplatesByCategory(category) {
1620
+ return REPORT_TEMPLATES.filter(t => t.category === category);
1621
+ }
1622
+ //# sourceMappingURL=report-templates.js.map