UNPKG

@disruptive-learning/cfdi-to-pdf

Version:

Librería para crear un pdf basado en un XML CFDI o Retenciones

56 lines (55 loc) 2.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const catalogs_source_1 = require("#src/catalogs/catalogs_source"); const genericRetencionPeriodoContent = (periodo, isVersionOne, catalogs, primaryColor, bgGrayColor) => { return { table: { widths: ['*', '*', '*'], body: [ [ { text: 'Periodo', style: ['tableSubtitleHeader'], color: primaryColor, colSpan: 3 }, '', '', ], [ { text: [ { text: 'Mes Inicial: ', color: primaryColor }, { text: (0, catalogs_source_1.getKeyValueOfCatalog)('retenciones20Periodos', periodo.getAttribute('MesIni'), catalogs), }, ], alignment: 'center', fillColor: bgGrayColor, }, { text: [ { text: 'Mes Final: ', color: primaryColor }, { text: (0, catalogs_source_1.getKeyValueOfCatalog)('retenciones20Periodos', periodo.getAttribute('MesFin'), catalogs), }, ], alignment: 'center', fillColor: bgGrayColor, }, { text: [ { text: 'Ejercicio: ', color: primaryColor }, { text: periodo.getAttribute(isVersionOne ? 'Ejerc' : 'Ejercicio') }, ], alignment: 'center', fillColor: bgGrayColor, }, ], [ { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, ], ], dontBreakRows: true, }, layout: 'tableLayout', }; }; exports.default = genericRetencionPeriodoContent;