@catalogicus-international/n8n-nodes-invoice-parser 0.2.0 → 0.2.2

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LEMAN = exports.PROFILES = exports.UNIVERSAL = exports.ETM = void 0;
3
+ exports.MEGAPOLIS = exports.LEMAN_SHIFT = exports.LEMAN_OFFER = exports.PETROVICH_COMPACT = exports.PETROVICH_DISCOUNT = exports.PETROVICH_NARROW = exports.PETROVICH_MAIN = exports.PETROVICH_WIDE = exports.TEREM_NARROW = exports.TEREM = exports.NORMALVENT = exports.LUNDA = exports.LEMAN = exports.PROFILES = exports.UNIVERSAL = exports.ETM = void 0;
4
4
  exports.ETM = {
5
5
  id: 'etm',
6
6
  layoutId: 'etm/main',
@@ -39,8 +39,8 @@ exports.LEMAN = {
39
39
  id: 'leman',
40
40
  layoutId: 'leman/main',
41
41
  title: 'Леруа Мерлен (ЛЕ МОНЛИД)',
42
- detect: [/ЛЕ\s*МОНЛИД/i, /lemanapro\.ru/i],
43
- yTolerance: 8,
42
+ detect: [/ЛЕ\s*МОНЛИД/iu, /lemanapro\.ru/iu],
43
+ yTolerance: 10,
44
44
  pricesIncludeVat: true,
45
45
  qtyUnitInOneColumn: true,
46
46
  articleFromCode: true,
@@ -61,5 +61,901 @@ exports.LEMAN = {
61
61
  total: /^Всего к оплате/i,
62
62
  },
63
63
  };
64
+ exports.LUNDA = {
65
+ id: 'lunda',
66
+ layoutId: 'lunda/main',
67
+ title: 'Лунда',
68
+ detect: [/Лунда/iu, /lunda\.ru/iu],
69
+ pricesIncludeVat: true,
70
+ vatRate: 20,
71
+ columns: [
72
+ { key: 'num', from: 0, to: 50 },
73
+ { key: 'code', from: 50, to: 85 },
74
+ { key: 'name', from: 85, to: 258 },
75
+ { key: 'qty', from: 258, to: 294 },
76
+ { key: 'unit', from: 294, to: 312 },
77
+ { key: 'price', from: 378, to: 450 },
78
+ { key: 'sum', from: 450, to: 560 },
79
+ ],
80
+ rowPattern: {
81
+ num: /^\d+$/,
82
+ code: /^(?:\p{L}[\p{L}\d/*_.?*-]*\d[\p{L}\d/*_.?*-]*|\d{4,})$/u,
83
+ },
84
+ stopPattern: /^итого/iu,
85
+ discountPattern: /скидка по программе лояльности/iu,
86
+ totalsPatterns: {
87
+ sum: /Итого без НДС/iu,
88
+ vat: /Сумма НДС/iu,
89
+ total: /Итого к оплате/iu,
90
+ },
91
+ };
92
+ exports.PROFILES.push(exports.LUNDA);
93
+ exports.NORMALVENT = {
94
+ id: 'normalvent',
95
+ layoutId: 'normalvent/main',
96
+ title: 'Нормал-Вент',
97
+ detect: [/Нормал-?Вент/iu],
98
+ yTolerance: 12,
99
+ pricesIncludeVat: true,
100
+ vatRate: 20,
101
+ columns: [
102
+ { key: 'num', from: 0, to: 45 },
103
+ { key: 'name', from: 45, to: 258 },
104
+ { key: 'unit', from: 258, to: 308 },
105
+ { key: 'qty', from: 308, to: 350 },
106
+ { key: 'price', from: 350, to: 430 },
107
+ { key: 'sum', from: 430, to: 560 },
108
+ ],
109
+ rowPattern: { num: /^\d+$/ },
110
+ stopPattern: /^итого/iu,
111
+ totalsPatterns: {
112
+ vat: /^в том числе НДС/iu,
113
+ total: /^Итого:/iu,
114
+ },
115
+ };
116
+ exports.PROFILES.push(exports.NORMALVENT);
117
+ exports.TEREM = {
118
+ id: 'terem',
119
+ layoutId: 'terem/main',
120
+ title: 'ТЕРЕМ',
121
+ detect: [/7729646148/, /ООО\s*[«"]?\s*ТЕРЕМ/iu],
122
+ articleFromCode: true,
123
+ columns: [
124
+ { key: 'num', from: 0, to: 60 },
125
+ { key: 'name', from: 60, to: 222 },
126
+ { key: 'code', from: 222, to: 275 },
127
+ { key: 'art', from: 222, to: 275 },
128
+ { key: 'unit', from: 275, to: 300 },
129
+ { key: 'qty', from: 300, to: 345 },
130
+ { key: 'price', from: 345, to: 390 },
131
+ { key: 'price2', from: 390, to: 438 },
132
+ { key: 'sum', from: 438, to: 505 },
133
+ { key: 'total', from: 505, to: 570 },
134
+ ],
135
+ rowPattern: { num: /^\d+$/, code: /^[\dA-Za-z.]+$/ },
136
+ stopPattern: /^итого/iu,
137
+ };
138
+ exports.PROFILES.push(exports.TEREM);
139
+ exports.TEREM_NARROW = {
140
+ id: 'terem-narrow',
141
+ layoutId: 'terem/narrow',
142
+ title: 'ТЕРЕМ (узкий макет)',
143
+ detect: [/7729646148/, /ООО\s*[«"]?\s*ТЕРЕМ/iu],
144
+ articleFromCode: true,
145
+ columns: [
146
+ { key: 'num', from: 0, to: 62 },
147
+ { key: 'name', from: 62, to: 218 },
148
+ { key: 'code', from: 218, to: 265 },
149
+ { key: 'art', from: 218, to: 265 },
150
+ { key: 'unit', from: 265, to: 290 },
151
+ { key: 'qty', from: 290, to: 330 },
152
+ { key: 'price', from: 330, to: 368 },
153
+ { key: 'price2', from: 368, to: 412 },
154
+ { key: 'sum', from: 412, to: 470 },
155
+ { key: 'total', from: 470, to: 570 },
156
+ ],
157
+ rowPattern: { num: /^\d+$/, code: /^[\dA-Za-z.]+$/ },
158
+ stopPattern: /^итого/iu,
159
+ };
160
+ exports.PROFILES.push(exports.TEREM_NARROW);
161
+ exports.PETROVICH_WIDE = {
162
+ id: 'petrovich-wide',
163
+ layoutId: 'petrovich/wide',
164
+ title: 'СТД «Петрович» (широкий макет)',
165
+ detect: [/7802348846/],
166
+ descriptionAbove: true,
167
+ pricesIncludeVat: true,
168
+ vatRate: 20,
169
+ articleFromCode: true,
170
+ columns: [
171
+ { key: 'num', from: 0, to: 45 },
172
+ { key: 'code', from: 45, to: 80 },
173
+ { key: 'name', from: 80, to: 190 },
174
+ { key: 'qty', from: 190, to: 205 },
175
+ { key: 'unit', from: 205, to: 232 },
176
+ { key: 'art', from: 232, to: 296 },
177
+ { key: 'vat', from: 296, to: 320 },
178
+ { key: 'vatsum', from: 320, to: 360 },
179
+ { key: 'price2', from: 360, to: 425 },
180
+ { key: 'price', from: 425, to: 478 },
181
+ { key: 'vatflag', from: 478, to: 515 },
182
+ { key: 'sum', from: 515, to: 700 },
183
+ ],
184
+ rowPattern: { num: /^\d+$/, code: /^[\d\s]{6,}$/ },
185
+ stopPattern: /^Всего наименований/iu,
186
+ totalsPatterns: {
187
+ vat: /В том числе НДС/iu,
188
+ total: /Итого:/iu,
189
+ },
190
+ };
191
+ exports.PROFILES.push(exports.PETROVICH_WIDE);
192
+ exports.PETROVICH_MAIN = {
193
+ id: 'petrovich-main',
194
+ layoutId: 'petrovich/main',
195
+ title: 'СТД «Петрович»',
196
+ detect: [/7802348846/],
197
+ pricesIncludeVat: true,
198
+ vatRate: 20,
199
+ articleFromCode: true,
200
+ columns: [
201
+ { key: 'num', from: 0, to: 60 },
202
+ { key: 'code', from: 60, to: 100 },
203
+ { key: 'name', from: 100, to: 330 },
204
+ { key: 'qty', from: 330, to: 360 },
205
+ { key: 'unit', from: 360, to: 400 },
206
+ { key: 'art', from: 400, to: 465 },
207
+ { key: 'price', from: 465, to: 520 },
208
+ { key: 'sum', from: 520, to: 600 },
209
+ ],
210
+ rowPattern: { num: /^\d+$/, code: /^\d{6,}$/ },
211
+ stopPattern: /^Всего наименований/iu,
212
+ totalsPatterns: {
213
+ vat: /В том числе НДС/iu,
214
+ total: /Итого:/iu,
215
+ },
216
+ };
217
+ exports.PROFILES.push(exports.PETROVICH_MAIN);
218
+ exports.PETROVICH_NARROW = {
219
+ id: 'petrovich-narrow',
220
+ layoutId: 'petrovich/narrow',
221
+ title: 'СТД «Петрович» (счета 2026)',
222
+ detect: [/7802348846/],
223
+ pricesIncludeVat: true,
224
+ vatRate: 22,
225
+ columns: [
226
+ { key: 'num', from: 0, to: 60 },
227
+ { key: 'name', from: 60, to: 330 },
228
+ { key: 'qty', from: 330, to: 360 },
229
+ { key: 'unit', from: 360, to: 400 },
230
+ { key: 'art', from: 400, to: 465 },
231
+ { key: 'price', from: 465, to: 520 },
232
+ { key: 'sum', from: 520, to: 600 },
233
+ ],
234
+ rowPattern: { num: /^\d+$/ },
235
+ stopPattern: /^Всего наименований/iu,
236
+ totalsPatterns: {
237
+ vat: /В том числе НДС/iu,
238
+ total: /Итого:/iu,
239
+ },
240
+ };
241
+ exports.PROFILES.push(exports.PETROVICH_NARROW);
242
+ exports.PETROVICH_DISCOUNT = {
243
+ id: 'petrovich-discount',
244
+ layoutId: 'petrovich/discount',
245
+ title: 'СТД «Петрович» (со скидкой)',
246
+ detect: [/7802348846/],
247
+ pricesIncludeVat: true,
248
+ vatRate: 20,
249
+ articleFromCode: true,
250
+ columns: [
251
+ { key: 'num', from: 0, to: 55 },
252
+ { key: 'code', from: 55, to: 100 },
253
+ { key: 'name', from: 100, to: 230 },
254
+ { key: 'qty', from: 230, to: 262 },
255
+ { key: 'unit', from: 262, to: 300 },
256
+ { key: 'art', from: 300, to: 345 },
257
+ { key: 'price2', from: 345, to: 408 },
258
+ { key: 'price', from: 408, to: 465 },
259
+ { key: 'vatflag', from: 465, to: 500 },
260
+ { key: 'sum', from: 500, to: 600 },
261
+ ],
262
+ rowPattern: { num: /^\d+$/, code: /^\d{6,}$/ },
263
+ stopPattern: /^Всего наименований/iu,
264
+ totalsPatterns: {
265
+ vat: /В том числе НДС/iu,
266
+ total: /Итого:/iu,
267
+ },
268
+ };
269
+ exports.PROFILES.push(exports.PETROVICH_DISCOUNT);
270
+ exports.PETROVICH_COMPACT = {
271
+ id: 'petrovich-compact',
272
+ layoutId: 'petrovich/compact',
273
+ title: 'СТД «Петрович» (компактный)',
274
+ detect: [/7802348846/],
275
+ pricesIncludeVat: true,
276
+ vatRate: 20,
277
+ articleFromCode: true,
278
+ columns: [
279
+ { key: 'num', from: 0, to: 55 },
280
+ { key: 'code', from: 55, to: 90 },
281
+ { key: 'name', from: 90, to: 205 },
282
+ { key: 'qty', from: 205, to: 232 },
283
+ { key: 'unit', from: 232, to: 262 },
284
+ { key: 'price2', from: 262, to: 350 },
285
+ { key: 'price', from: 350, to: 400 },
286
+ { key: 'vatflag', from: 400, to: 445 },
287
+ { key: 'sum', from: 450, to: 520 },
288
+ ],
289
+ rowPattern: { num: /^\d+$/, code: /^\d{6,}$/ },
290
+ stopPattern: /^Всего наименований/iu,
291
+ totalsPatterns: {
292
+ vat: /В том числе НДС/iu,
293
+ total: /Итого:/iu,
294
+ },
295
+ };
296
+ exports.PROFILES.push(exports.PETROVICH_COMPACT);
297
+ const ONEC_ARTICLE = [
298
+ { key: 'num', from: 0, to: 58 },
299
+ { key: 'art', from: 56, to: 100 },
300
+ { key: 'name', from: 100, to: 290 },
301
+ { key: 'qty', from: 290, to: 333 },
302
+ { key: 'unit', from: 333, to: 355 },
303
+ { key: 'price', from: 355, to: 430 },
304
+ { key: 'vat', from: 430, to: 455 },
305
+ { key: 'vatsum', from: 455, to: 510 },
306
+ { key: 'sum', from: 510, to: 610 },
307
+ ];
308
+ const ONEC_CODE_ARTICLE = [
309
+ { key: 'num', from: 0, to: 58 },
310
+ { key: 'code', from: 58, to: 100 },
311
+ { key: 'art', from: 100, to: 135 },
312
+ { key: 'name', from: 135, to: 290 },
313
+ { key: 'qty', from: 290, to: 333 },
314
+ { key: 'unit', from: 333, to: 355 },
315
+ { key: 'price', from: 355, to: 430 },
316
+ { key: 'vat', from: 430, to: 455 },
317
+ { key: 'vatsum', from: 455, to: 510 },
318
+ { key: 'sum', from: 510, to: 610 },
319
+ ];
320
+ const ONEC_PLAIN = [
321
+ { key: 'num', from: 0, to: 58 },
322
+ { key: 'name', from: 58, to: 395 },
323
+ { key: 'qty', from: 395, to: 440 },
324
+ { key: 'unit', from: 440, to: 460 },
325
+ { key: 'price', from: 460, to: 510 },
326
+ { key: 'sum', from: 510, to: 620 },
327
+ ];
328
+ const ONEC_CODE = [
329
+ { key: 'num', from: 0, to: 58 },
330
+ { key: 'code', from: 58, to: 100 },
331
+ { key: 'name', from: 100, to: 290 },
332
+ { key: 'qty', from: 290, to: 333 },
333
+ { key: 'unit', from: 333, to: 355 },
334
+ { key: 'price', from: 355, to: 430 },
335
+ { key: 'vat', from: 430, to: 455 },
336
+ { key: 'vatsum', from: 455, to: 510 },
337
+ { key: 'sum', from: 510, to: 610 },
338
+ ];
339
+ const ONEC_PLAIN_CODE = [
340
+ { key: 'num', from: 0, to: 58 },
341
+ { key: 'code', from: 58, to: 100 },
342
+ { key: 'name', from: 100, to: 395 },
343
+ { key: 'qty', from: 395, to: 440 },
344
+ { key: 'unit', from: 440, to: 460 },
345
+ { key: 'price', from: 460, to: 510 },
346
+ { key: 'sum', from: 510, to: 620 },
347
+ ];
348
+ const SHORT_TABLE = [
349
+ { key: 'num', from: 0, to: 56 },
350
+ { key: 'name', from: 56, to: 330 },
351
+ { key: 'qty', from: 330, to: 344 },
352
+ { key: 'unit', from: 344, to: 378 },
353
+ { key: 'price', from: 378, to: 460 },
354
+ { key: 'sum', from: 460, to: 610 },
355
+ ];
356
+ const OFFER_TABLE = [
357
+ { key: 'num', from: 0, to: 56 },
358
+ { key: 'name', from: 56, to: 370 },
359
+ { key: 'qty', from: 370, to: 386 },
360
+ { key: 'unit', from: 386, to: 420 },
361
+ { key: 'price', from: 420, to: 500 },
362
+ { key: 'sum', from: 500, to: 610 },
363
+ ];
364
+ const CODE_RIGHT_TABLE = [
365
+ { key: 'num', from: 0, to: 60 },
366
+ { key: 'name', from: 60, to: 235 },
367
+ { key: 'code', from: 235, to: 330 },
368
+ { key: 'qty', from: 330, to: 350 },
369
+ { key: 'unit', from: 350, to: 400 },
370
+ { key: 'price', from: 400, to: 470 },
371
+ { key: 'sum', from: 470, to: 610 },
372
+ ];
373
+ const IP_TABLE = [
374
+ { key: 'num', from: 0, to: 80 },
375
+ { key: 'name', from: 80, to: 240 },
376
+ { key: 'code', from: 240, to: 290 },
377
+ { key: 'qty', from: 290, to: 302 },
378
+ { key: 'unit', from: 302, to: 330 },
379
+ { key: 'price', from: 330, to: 370 },
380
+ { key: 'sum', from: 420, to: 610 },
381
+ ];
382
+ const TUBE_TABLE = [
383
+ { key: 'num', from: 0, to: 70 },
384
+ { key: 'name', from: 70, to: 300 },
385
+ { key: 'code', from: 300, to: 345 },
386
+ { key: 'price', from: 345, to: 415 },
387
+ { key: 'qty', from: 415, to: 440 },
388
+ { key: 'unit', from: 440, to: 485 },
389
+ { key: 'sum', from: 485, to: 610 },
390
+ ];
391
+ const BOILER_TABLE = [
392
+ { key: 'num', from: 0, to: 80 },
393
+ { key: 'name', from: 80, to: 370 },
394
+ { key: 'qty', from: 370, to: 384 },
395
+ { key: 'unit', from: 384, to: 430 },
396
+ { key: 'price', from: 430, to: 510 },
397
+ { key: 'sum', from: 510, to: 610 },
398
+ ];
399
+ const CATALOG_TABLE = [
400
+ { key: 'num', from: 0, to: 56 },
401
+ { key: 'code', from: 56, to: 100 },
402
+ { key: 'name', from: 100, to: 275 },
403
+ { key: 'qty', from: 390, to: 430 },
404
+ { key: 'unit', from: 430, to: 460 },
405
+ { key: 'price', from: 460, to: 510 },
406
+ { key: 'sum', from: 510, to: 610 },
407
+ ];
408
+ const WA_TABLE = [
409
+ { key: 'num', from: 0, to: 56 },
410
+ { key: 'name', from: 56, to: 260 },
411
+ { key: 'qty', from: 260, to: 300 },
412
+ { key: 'unit', from: 300, to: 340 },
413
+ { key: 'price', from: 340, to: 420 },
414
+ { key: 'sum', from: 500, to: 610 },
415
+ ];
416
+ const PLUMB_TABLE = [
417
+ { key: 'num', from: 0, to: 56 },
418
+ { key: 'code', from: 56, to: 110 },
419
+ { key: 'name', from: 110, to: 265 },
420
+ { key: 'qty', from: 265, to: 300 },
421
+ { key: 'unit', from: 300, to: 335 },
422
+ { key: 'price', from: 335, to: 380 },
423
+ { key: 'price2', from: 380, to: 420 },
424
+ { key: 'sum', from: 420, to: 475 },
425
+ { key: 'vatflag', from: 475, to: 610 },
426
+ ];
427
+ const SATURN_TABLE = [
428
+ { key: 'num', from: 0, to: 60 },
429
+ { key: 'name', from: 60, to: 350 },
430
+ { key: 'qty', from: 350, to: 378 },
431
+ { key: 'unit', from: 378, to: 400 },
432
+ { key: 'price', from: 400, to: 470 },
433
+ { key: 'sum', from: 470, to: 525 },
434
+ ];
435
+ const DECOR_TABLE = [
436
+ { key: 'num', from: 0, to: 48 },
437
+ { key: 'name', from: 48, to: 235 },
438
+ { key: 'qty', from: 330, to: 400 },
439
+ { key: 'price', from: 455, to: 517 },
440
+ { key: 'sum', from: 517, to: 620 },
441
+ ];
442
+ const ORDER_TABLE = [
443
+ { key: 'num', from: 0, to: 35 },
444
+ { key: 'name', from: 35, to: 180 },
445
+ { key: 'qty', from: 180, to: 190 },
446
+ { key: 'unit', from: 190, to: 230 },
447
+ { key: 'price', from: 255, to: 300 },
448
+ { key: 'sum', from: 400, to: 610 },
449
+ ];
450
+ const CONTRACT_TABLE = [
451
+ { key: 'num', from: 0, to: 58 },
452
+ { key: 'name', from: 58, to: 385 },
453
+ { key: 'price', from: 385, to: 450 },
454
+ { key: 'qty', from: 450, to: 480 },
455
+ { key: 'unit', from: 480, to: 505 },
456
+ { key: 'sum', from: 505, to: 610 },
457
+ ];
458
+ const TERMOKIT_TABLE = [
459
+ { key: 'num', from: 0, to: 30 },
460
+ { key: 'code', from: 30, to: 90 },
461
+ { key: 'name', from: 90, to: 300 },
462
+ { key: 'qty', from: 300, to: 310 },
463
+ { key: 'unit', from: 310, to: 340 },
464
+ { key: 'price', from: 340, to: 400 },
465
+ { key: 'total', from: 400, to: 455 },
466
+ { key: 'vatsum', from: 455, to: 505 },
467
+ { key: 'sum', from: 505, to: 610 },
468
+ ];
469
+ const STEEL_TABLE = [
470
+ { key: 'num', from: 0, to: 60 },
471
+ { key: 'name', from: 60, to: 330 },
472
+ { key: 'qty', from: 330, to: 352 },
473
+ { key: 'unit', from: 352, to: 380 },
474
+ { key: 'price', from: 380, to: 480 },
475
+ { key: 'sum', from: 480, to: 610 },
476
+ ];
477
+ const TOTALS_WITH_VAT = {
478
+ vat: /В т\.ч\. НДС|Сумма НДС/iu,
479
+ total: /Итого с НДС/iu,
480
+ };
481
+ const TOTALS_PAYABLE = {
482
+ vat: /В том числе НДС/iu,
483
+ total: /Всего к оплате/iu,
484
+ };
485
+ const TOTALS_TOTAL = {
486
+ vat: /В том числе НДС/iu,
487
+ total: /Итого:/iu,
488
+ };
489
+ const TOTALS_PAY = {
490
+ total: /Итог к оплате/iu,
491
+ };
492
+ const TOTALS_PLUMB = {
493
+ sum: /Итого без НДС/iu,
494
+ vat: /Кроме того НДС/iu,
495
+ total: /Итого\s*[cс]\s*НДС/iu,
496
+ };
497
+ const TOTALS_SUM = {
498
+ vat: /В том числе НДС/iu,
499
+ total: /на сумму/iu,
500
+ };
501
+ const PROFILE_ALTUS_KRASNODAR = {
502
+ id: 'altus-krasnodar',
503
+ layoutId: 'onec-article',
504
+ title: 'ООО «АЛЬТУС КРАСНОДАР»',
505
+ detect: [/2312309655/],
506
+ pricesIncludeVat: true,
507
+ vatRate: 22,
508
+ columns: ONEC_ARTICLE,
509
+ rowPattern: { num: /^\d+$/ },
510
+ stopPattern: /^итог/iu,
511
+ totalsPatterns: TOTALS_WITH_VAT,
512
+ };
513
+ exports.PROFILES.push(PROFILE_ALTUS_KRASNODAR);
514
+ const PROFILE_KRASKA_1001 = {
515
+ id: 'kraska-1001',
516
+ layoutId: 'onec-article',
517
+ title: 'ООО «1001 КРАСКА»',
518
+ detect: [/7729682876/],
519
+ pricesIncludeVat: true,
520
+ vatRate: 22,
521
+ columns: ONEC_CODE,
522
+ rowPattern: { num: /^\d+$/ },
523
+ stopPattern: /^итог/iu,
524
+ totalsPatterns: TOTALS_WITH_VAT,
525
+ };
526
+ exports.PROFILES.push(PROFILE_KRASKA_1001);
527
+ const PROFILE_ROZMET = {
528
+ id: 'rozmet',
529
+ layoutId: 'onec-article',
530
+ title: 'ООО «Розмет»',
531
+ detect: [/5003099533/],
532
+ pricesIncludeVat: true,
533
+ vatRate: 22,
534
+ columns: ONEC_ARTICLE,
535
+ rowPattern: { num: /^\d+$/ },
536
+ stopPattern: /^итог/iu,
537
+ totalsPatterns: TOTALS_WITH_VAT,
538
+ };
539
+ exports.PROFILES.push(PROFILE_ROZMET);
540
+ const PROFILE_R_KLIMAT = {
541
+ id: 'r-klimat',
542
+ layoutId: 'onec-code-article',
543
+ title: 'ООО «Р-КЛИМАТ»',
544
+ detect: [/7706739893/],
545
+ pricesIncludeVat: true,
546
+ vatRate: 22,
547
+ columns: ONEC_CODE_ARTICLE,
548
+ rowPattern: { num: /^\d+$/ },
549
+ stopPattern: /^итог/iu,
550
+ totalsPatterns: TOTALS_WITH_VAT,
551
+ };
552
+ exports.PROFILES.push(PROFILE_R_KLIMAT);
553
+ const PROFILE_OBEDINENNY_METALIST = {
554
+ id: 'obedinenny-metalist',
555
+ layoutId: 'onec-plain',
556
+ title: 'ООО «Объединённый металлист»',
557
+ detect: [/2315123592/],
558
+ pricesIncludeVat: true,
559
+ vatRate: 22,
560
+ columns: ONEC_PLAIN,
561
+ rowPattern: { num: /^\d+$/ },
562
+ stopPattern: /^итог/iu,
563
+ totalsPatterns: TOTALS_WITH_VAT,
564
+ };
565
+ exports.PROFILES.push(PROFILE_OBEDINENNY_METALIST);
566
+ const PROFILE_PROFILSTAR = {
567
+ id: 'profilstar',
568
+ layoutId: 'onec-plain',
569
+ title: 'ООО «ПРОФИЛЬСТАР»',
570
+ detect: [/7702401126/],
571
+ pricesIncludeVat: true,
572
+ vatRate: 22,
573
+ columns: ONEC_PLAIN,
574
+ rowPattern: { num: /^\d+$/ },
575
+ stopPattern: /^итог/iu,
576
+ totalsPatterns: TOTALS_WITH_VAT,
577
+ };
578
+ exports.PROFILES.push(PROFILE_PROFILSTAR);
579
+ const PROFILE_FORWARD_S = {
580
+ id: 'forward-s',
581
+ layoutId: 'onec-plain',
582
+ title: 'ООО «ФОРВАРД-С»',
583
+ detect: [/7743224469/],
584
+ pricesIncludeVat: true,
585
+ vatRate: 22,
586
+ columns: ONEC_PLAIN,
587
+ rowPattern: { num: /^\d+$/ },
588
+ stopPattern: /^итог/iu,
589
+ totalsPatterns: TOTALS_WITH_VAT,
590
+ };
591
+ exports.PROFILES.push(PROFILE_FORWARD_S);
592
+ const PROFILE_GK_ATLANT = {
593
+ id: 'gk-atlant',
594
+ layoutId: 'onec-plain',
595
+ title: 'ООО «ГК АТЛАНТ»',
596
+ detect: [/7811214101/],
597
+ columns: ONEC_PLAIN,
598
+ rowPattern: { num: /^\d+$/ },
599
+ stopPattern: /^итог/iu,
600
+ totalsPatterns: {
601
+ sum: /Итого:/iu,
602
+ vat: /Сумма НДС/iu,
603
+ total: /Итого с НДС/iu,
604
+ },
605
+ };
606
+ exports.PROFILES.push(PROFILE_GK_ATLANT);
607
+ const PROFILE_MAMAZHANOV = {
608
+ id: 'mamazhanov',
609
+ layoutId: 'onec-plain-article',
610
+ title: 'ИП Мамажанов Р. О.',
611
+ detect: [/582102754005/],
612
+ pricesIncludeVat: true,
613
+ vatRate: 22,
614
+ columns: ONEC_PLAIN_CODE,
615
+ rowPattern: { num: /^\d+$/ },
616
+ stopPattern: /^итог/iu,
617
+ totalsPatterns: TOTALS_WITH_VAT,
618
+ };
619
+ exports.PROFILES.push(PROFILE_MAMAZHANOV);
620
+ const PROFILE_SHAROV = {
621
+ id: 'sharov',
622
+ layoutId: 'short-table',
623
+ title: 'ИП Шаров М. И.',
624
+ detect: [/772883149760/],
625
+ pricesIncludeVat: true,
626
+ vatRate: 22,
627
+ columns: SHORT_TABLE,
628
+ rowPattern: { num: /^\d+$/ },
629
+ stopPattern: /^итог/iu,
630
+ totalsPatterns: TOTALS_PAYABLE,
631
+ };
632
+ exports.PROFILES.push(PROFILE_SHAROV);
633
+ const PROFILE_BOYKO = {
634
+ id: 'boyko',
635
+ layoutId: 'short-table',
636
+ title: 'ИП Бойко С. С.',
637
+ detect: [/772797351740/],
638
+ pricesIncludeVat: true,
639
+ vatRate: 22,
640
+ columns: SHORT_TABLE,
641
+ rowPattern: { num: /^\d+$/ },
642
+ stopPattern: /^итог/iu,
643
+ totalsPatterns: TOTALS_PAYABLE,
644
+ };
645
+ exports.PROFILES.push(PROFILE_BOYKO);
646
+ const PROFILE_SGK_TEHSTROY = {
647
+ id: 'sgk-tehstroy',
648
+ layoutId: 'short-table',
649
+ title: 'ООО «СГК-ТЕХСТРОЙ»',
650
+ detect: [/7724615523/],
651
+ pricesIncludeVat: true,
652
+ vatRate: 22,
653
+ columns: SHORT_TABLE,
654
+ rowPattern: { num: /^\d+$/ },
655
+ stopPattern: /^итог/iu,
656
+ totalsPatterns: TOTALS_PAYABLE,
657
+ };
658
+ exports.PROFILES.push(PROFILE_SGK_TEHSTROY);
659
+ const PROFILE_STROY_DIALOG = {
660
+ id: 'stroy-dialog',
661
+ layoutId: 'short-table',
662
+ title: 'ООО «Строй-Диалог»',
663
+ detect: [/7719742692/],
664
+ pricesIncludeVat: true,
665
+ vatRate: 22,
666
+ columns: SHORT_TABLE,
667
+ rowPattern: { num: /^\d+$/ },
668
+ stopPattern: /^итог/iu,
669
+ totalsPatterns: TOTALS_PAYABLE,
670
+ };
671
+ exports.PROFILES.push(PROFILE_STROY_DIALOG);
672
+ const PROFILE_M5_GROUP = {
673
+ id: 'm5-group',
674
+ layoutId: 'short-table',
675
+ title: 'ООО «М5 ГРУПП»',
676
+ detect: [/7751259296/],
677
+ pricesIncludeVat: true,
678
+ vatRate: 22,
679
+ columns: SHORT_TABLE,
680
+ rowPattern: { num: /^\d+$/ },
681
+ stopPattern: /^итог/iu,
682
+ totalsPatterns: TOTALS_PAYABLE,
683
+ };
684
+ exports.PROFILES.push(PROFILE_M5_GROUP);
685
+ const PROFILE_VIKVENT = {
686
+ id: 'vikvent',
687
+ layoutId: 'offer-table',
688
+ title: 'ООО «ВИКВЕНТ»',
689
+ detect: [/5040151735/],
690
+ pricesIncludeVat: true,
691
+ vatRate: 22,
692
+ columns: OFFER_TABLE,
693
+ rowPattern: { num: /^\d+$/ },
694
+ stopPattern: /^итог/iu,
695
+ totalsPatterns: TOTALS_PAYABLE,
696
+ };
697
+ exports.PROFILES.push(PROFILE_VIKVENT);
698
+ const PROFILE_AGAFONKIN = {
699
+ id: 'agafonkin',
700
+ layoutId: 'offer-table',
701
+ title: 'ИП Агафонкин А. М.',
702
+ detect: [/501304967839/],
703
+ pricesIncludeVat: true,
704
+ vatRate: 22,
705
+ columns: OFFER_TABLE,
706
+ rowPattern: { num: /^\d+$/ },
707
+ stopPattern: /^итог/iu,
708
+ totalsPatterns: TOTALS_PAYABLE,
709
+ };
710
+ exports.PROFILES.push(PROFILE_AGAFONKIN);
711
+ const PROFILE_INTERIER_UYUT = {
712
+ id: 'interier-uyut',
713
+ layoutId: 'code-right-table',
714
+ title: 'ООО «Интерьер Уют»',
715
+ detect: [/5029209244/],
716
+ pricesIncludeVat: true,
717
+ vatRate: 22,
718
+ columns: CODE_RIGHT_TABLE,
719
+ rowPattern: { num: /^\d+$/ },
720
+ stopPattern: /^итог/iu,
721
+ totalsPatterns: TOTALS_PAYABLE,
722
+ };
723
+ exports.PROFILES.push(PROFILE_INTERIER_UYUT);
724
+ const PROFILE_VSEINSTRUMENTI = {
725
+ id: 'vseinstrumenti',
726
+ layoutId: 'catalog-table',
727
+ title: 'ООО «ВсеИнструменты.ру»',
728
+ detect: [/7722753969/],
729
+ pricesIncludeVat: true,
730
+ vatRate: 22,
731
+ columns: CATALOG_TABLE,
732
+ rowPattern: { num: /^\d+$/ },
733
+ stopPattern: /^итог/iu,
734
+ totalsPatterns: TOTALS_PAYABLE,
735
+ };
736
+ exports.PROFILES.push(PROFILE_VSEINSTRUMENTI);
737
+ const PROFILE_KOLODIY = {
738
+ id: 'kolodiy',
739
+ layoutId: 'ip-table',
740
+ title: 'ИП Колодий В. В.',
741
+ detect: [/732771536701/],
742
+ columns: IP_TABLE,
743
+ rowPattern: { num: /^\d+$/ },
744
+ stopPattern: /^итог/iu,
745
+ totalsPatterns: TOTALS_PAYABLE,
746
+ };
747
+ exports.PROFILES.push(PROFILE_KOLODIY);
748
+ const PROFILE_TRUBY_SOVKOM = {
749
+ id: 'truby-sovkom',
750
+ layoutId: 'tube-table',
751
+ yTolerance: 9,
752
+ title: 'Поставщик 7743778097',
753
+ detect: [/7743778097/],
754
+ pricesIncludeVat: true,
755
+ vatRate: 22,
756
+ columns: TUBE_TABLE,
757
+ rowPattern: { num: /^\d+$/ },
758
+ stopPattern: /^итог/iu,
759
+ totalsPatterns: TOTALS_TOTAL,
760
+ };
761
+ exports.PROFILES.push(PROFILE_TRUBY_SOVKOM);
762
+ const PROFILE_KOPICHNIKOVA = {
763
+ id: 'kopichnikova',
764
+ layoutId: 'boiler-table',
765
+ title: 'ИП Копичникова Е. С.',
766
+ detect: [/770201555461/],
767
+ pricesIncludeVat: true,
768
+ vatRate: 22,
769
+ columns: BOILER_TABLE,
770
+ rowPattern: { num: /^\d+$/ },
771
+ stopPattern: /^итог/iu,
772
+ totalsPatterns: TOTALS_TOTAL,
773
+ };
774
+ exports.PROFILES.push(PROFILE_KOPICHNIKOVA);
775
+ const PROFILE_BABAYAN = {
776
+ id: 'babayan',
777
+ layoutId: 'wa-table',
778
+ title: 'ИП Бабаян М. М.',
779
+ detect: [/772793005900/],
780
+ columns: WA_TABLE,
781
+ rowPattern: { num: /^\d+$/ },
782
+ stopPattern: /^итог/iu,
783
+ totalsPatterns: TOTALS_PAY,
784
+ };
785
+ exports.PROFILES.push(PROFILE_BABAYAN);
786
+ const PROFILE_SANTEHKOMPLEKT = {
787
+ id: 'santehkomplekt',
788
+ layoutId: 'plumb-table',
789
+ title: 'ООО «Сантехкомплект»',
790
+ detect: [/7736192449/],
791
+ pricesIncludeVat: true,
792
+ vatRate: 22,
793
+ columns: PLUMB_TABLE,
794
+ rowPattern: { num: /^\d+$/ },
795
+ stopPattern: /^итог/iu,
796
+ totalsPatterns: TOTALS_PLUMB,
797
+ };
798
+ exports.PROFILES.push(PROFILE_SANTEHKOMPLEKT);
799
+ const PROFILE_SATURN_CENTR = {
800
+ id: 'saturn-centr',
801
+ layoutId: 'saturn-table',
802
+ title: 'ООО «САТУРН ЦЕНТР»',
803
+ detect: [/9717052425/],
804
+ pricesIncludeVat: true,
805
+ vatRate: 22,
806
+ columns: SATURN_TABLE,
807
+ rowPattern: { num: /^\d+$/ },
808
+ stopPattern: /^итог/iu,
809
+ totalsPatterns: TOTALS_TOTAL,
810
+ };
811
+ exports.PROFILES.push(PROFILE_SATURN_CENTR);
812
+ const PROFILE_VLADIMIROVA = {
813
+ id: 'vladimirova',
814
+ layoutId: 'decor-table',
815
+ title: 'ИП Владимирова М. Н.',
816
+ detect: [/502771785894/],
817
+ columns: DECOR_TABLE,
818
+ rowPattern: { num: /^\d+$/ },
819
+ stopPattern: /^итог/iu,
820
+ totalsPatterns: TOTALS_PAYABLE,
821
+ };
822
+ exports.PROFILES.push(PROFILE_VLADIMIROVA);
823
+ const PROFILE_ROVEN_M = {
824
+ id: 'roven-m',
825
+ layoutId: 'order-table',
826
+ title: 'ООО «РОВЕН-М»',
827
+ detect: [/7723812078/],
828
+ pricesIncludeVat: true,
829
+ vatRate: 22,
830
+ columns: ORDER_TABLE,
831
+ rowPattern: { num: /^\d+$/ },
832
+ stopPattern: /^итог/iu,
833
+ totalsPatterns: TOTALS_SUM,
834
+ };
835
+ exports.PROFILES.push(PROFILE_ROVEN_M);
836
+ const PROFILE_SCHET_DOGOVOR = {
837
+ id: 'schet-dogovor',
838
+ layoutId: 'contract-table',
839
+ title: 'Счёт-договор (ИНН 7707743243)',
840
+ detect: [/7707743243/],
841
+ pricesIncludeVat: true,
842
+ vatRate: 22,
843
+ columns: CONTRACT_TABLE,
844
+ rowPattern: { num: /^\d+$/ },
845
+ stopPattern: /^итог/iu,
846
+ totalsPatterns: TOTALS_TOTAL,
847
+ };
848
+ exports.PROFILES.push(PROFILE_SCHET_DOGOVOR);
849
+ const PROFILE_TERMOKIT = {
850
+ id: 'termokit',
851
+ layoutId: 'termokit-table',
852
+ title: 'ООО «ТЕРМОКИТ-СЕРВИС»',
853
+ detect: [/9715287781/],
854
+ columns: TERMOKIT_TABLE,
855
+ rowPattern: { num: /^\d+$/ },
856
+ stopPattern: /^итог/iu,
857
+ };
858
+ exports.PROFILES.push(PROFILE_TERMOKIT);
859
+ const PROFILE_REGION_STAL_SPB = {
860
+ id: 'region-stal-spb',
861
+ layoutId: 'steel-table',
862
+ title: 'ООО «РЕГИОН СТАЛЬ СПБ»',
863
+ detect: [/7814712017/],
864
+ pricesIncludeVat: true,
865
+ vatRate: 22,
866
+ columns: STEEL_TABLE,
867
+ rowPattern: { num: /^\d+$/ },
868
+ stopPattern: /^итог/iu,
869
+ totalsPatterns: TOTALS_PAYABLE,
870
+ };
871
+ exports.PROFILES.push(PROFILE_REGION_STAL_SPB);
64
872
  exports.PROFILES.push(exports.LEMAN);
873
+ exports.LEMAN_OFFER = {
874
+ id: 'leman-offer',
875
+ layoutId: 'leman/offer',
876
+ title: 'Леруа Мерлен (счёт-оферта)',
877
+ detect: [/ЛЕ\s*МОНЛИД/iu, /lemanapro\.ru/iu],
878
+ descriptionAbove: true,
879
+ pricesIncludeVat: true,
880
+ vatRate: 20,
881
+ columns: [
882
+ { key: 'num', from: 0, to: 60 },
883
+ { key: 'code', from: 60, to: 120 },
884
+ { key: 'art', from: 60, to: 120 },
885
+ { key: 'name', from: 120, to: 280 },
886
+ { key: 'qty', from: 280, to: 300 },
887
+ { key: 'unit', from: 300, to: 340 },
888
+ { key: 'price', from: 340, to: 430 },
889
+ { key: 'sum', from: 430, to: 500 },
890
+ ],
891
+ rowPattern: { num: /^\d+$/, code: /^[\d\s]{6,}$/ },
892
+ stopPattern: /^Итого:/i,
893
+ discountPattern: /^Скидка:/i,
894
+ totalsPatterns: {
895
+ vat: /В том числе НДС/i,
896
+ total: /Всего к оплате/i,
897
+ },
898
+ };
899
+ exports.PROFILES.push(exports.LEMAN_OFFER);
900
+ exports.LEMAN_SHIFT = {
901
+ id: 'leman-shift',
902
+ layoutId: 'leman/shift',
903
+ title: 'Леруа Мерлен (сдвинутый макет)',
904
+ detect: [/ЛЕ\s*МОНЛИД/iu, /lemanapro\.ru/iu],
905
+ descriptionAbove: true,
906
+ pricesIncludeVat: true,
907
+ vatRate: 22,
908
+ qtyUnitInOneColumn: true,
909
+ articleFromCode: true,
910
+ columns: [
911
+ { key: 'num', from: 0, to: 85 },
912
+ { key: 'code', from: 85, to: 132 },
913
+ { key: 'name', from: 132, to: 315 },
914
+ { key: 'qty', from: 315, to: 385 },
915
+ { key: 'price', from: 386, to: 470 },
916
+ { key: 'vat', from: 470, to: 508 },
917
+ { key: 'sum', from: 508, to: 600 },
918
+ ],
919
+ rowPattern: { num: /^\d+$/, code: /^[\d\s]{5,}$/ },
920
+ stopPattern: /^Сумма без НДС/i,
921
+ totalsPatterns: {
922
+ sum: /^Сумма без НДС/i,
923
+ vat: /^Итого НДС/i,
924
+ },
925
+ };
926
+ exports.PROFILES.push(exports.LEMAN_SHIFT);
927
+ const ONEC_RENT = [
928
+ { key: 'num', from: 0, to: 60 },
929
+ { key: 'name', from: 60, to: 390 },
930
+ { key: 'qty', from: 390, to: 424.7 },
931
+ { key: 'unit', from: 424.7, to: 455 },
932
+ { key: 'price', from: 455, to: 521 },
933
+ { key: 'sum', from: 521, to: 620 },
934
+ ];
935
+ exports.MEGAPOLIS = {
936
+ id: 'megapolis',
937
+ layoutId: 'onec-rent',
938
+ title: 'ООО «МЕГАПОЛИС»',
939
+ detect: [/(?<!\d)7731283974(?!\d)/u],
940
+ pricesIncludeVat: true,
941
+ vatRate: 22,
942
+ columns: ONEC_RENT,
943
+ headerColumns: {
944
+ labels: {
945
+ num: /^(?:№|N|No)$/u,
946
+ name: /^Наименование(?:\s+товара)?$/iu,
947
+ qty: /^(?:Кол-?во|Количество)$/iu,
948
+ unit: /^Ед\.?(?:\s*изм\.?)?$/iu,
949
+ price: /^Цена(?:,?\s*руб\.?)?(?:\s+с\s+НДС)?$/iu,
950
+ sum: /^Сумма(?:,?\s*руб\.?)?(?:\s+с\s+НДС)?$/iu,
951
+ },
952
+ exclude: {
953
+ sum: /^Сумма(?:,?\s*руб\.?)?\s+(?:НДС|без)(?:\s|$)/iu,
954
+ },
955
+ },
956
+ rowPattern: { num: /^\d+$/ },
957
+ stopPattern: /^итог/iu,
958
+ totalsPatterns: TOTALS_PAYABLE,
959
+ };
960
+ exports.PROFILES.push(exports.MEGAPOLIS);
65
961
  //# sourceMappingURL=profiles.js.map