@disruptive-learning/cfdi-to-pdf
Version:
Librería para crear un pdf basado en un XML CFDI o Retenciones
57 lines (56 loc) • 2.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const catalogs_source_1 = require("#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: (0, catalogs_source_1.getKeyValueOfCatalog)('cfdi40Periodicidades', informacionGlobal.getAttribute('Periodicidad'), catalogs),
},
],
},
{
fillColor: bgGrayColor,
text: [
{ text: 'Meses: ', color: primaryColor },
{
text: (0, catalogs_source_1.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',
};
};
exports.default = genericCfdiInformacionGlobalContent;