Skip to content

Commit 039c2c2

Browse files
committed
fix(excel): date format, cell-width
1 parent 9c74965 commit 039c2c2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/app/afip/afip.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,19 +280,20 @@ export class AfipComponent implements OnInit {
280280
{wch:15},
281281
{wch:20},
282282
{wch:30},
283+
{wch:12},
283284
{wch:30},
284-
{wch:30},
285-
{wch:30},
286-
{wch:15},
287-
{wch:15},
285+
{wch:12},
288286
{wch:15},
287+
{wch:20},
288+
{wch:20},
289289
{wch:10}
290290
];
291291

292292
let amount = 0;
293293
let amount_iva = 0;
294294

295295
this.invoices.forEach((row) => {
296+
const date = new Date(row.date);
296297
json.push({
297298
'Tipo': row.docName,
298299
'Nro': row.docNumber,
@@ -301,7 +302,7 @@ export class AfipComponent implements OnInit {
301302
'Emisor CUIT': row.cuitEmi,
302303
'Receptor': row.nameRec,
303304
'Receptor CUIT': row.cuitRec,
304-
'Fecha': row.date,
305+
'Fecha': date.toLocaleString('es-AR', { year: 'numeric', month: '2-digit', day: '2-digit' }),
305306
'Importe': formatter.format(row.amount),
306307
'Importe sin IVA 21': formatter.format((Number(row.amount) / 1.21)),
307308
'Moneda': row.currency,

0 commit comments

Comments
 (0)