UNPKG

@disruptive-learning/cfdi-to-pdf

Version:

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

55 lines (54 loc) 2.2 kB
import { getKeyValueOfCatalog } from '#src/catalogs/catalogs_source'; const genericCfdiInformacionGlobalContent = (informacionGlobal, catalogs, primaryColor, bgGrayColor) => { return { table: { widths: ['*', '*', '*'], body: [ [ { text: 'Información Global', style: ['tableSubtitleHeader'], color: primaryColor, colSpan: 3, }, '', '', ], [ { fillColor: bgGrayColor, text: [ { text: 'Periodicidad: ', color: primaryColor }, { text: getKeyValueOfCatalog('cfdi40Periodicidades', informacionGlobal.getAttribute('Periodicidad'), catalogs), }, ], }, { fillColor: bgGrayColor, text: [ { text: 'Meses: ', color: primaryColor }, { text: getKeyValueOfCatalog('cfdi40Meses', informacionGlobal.getAttribute('Meses'), catalogs), }, ], }, { fillColor: bgGrayColor, text: [ { text: 'Año: ', color: primaryColor }, { text: informacionGlobal.getAttribute('Año') }, ], }, ], [ { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, { fillColor: bgGrayColor, text: '', border: [false, false, false, true] }, ], ], }, layout: 'tableLayout', }; }; export default genericCfdiInformacionGlobalContent;