Skip to content

Commit

Permalink
fix(excel): date format, cell-width
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuioli committed Feb 24, 2022
1 parent 9c74965 commit 039c2c2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/afip/afip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,20 @@ export class AfipComponent implements OnInit {
{wch:15},
{wch:20},
{wch:30},
{wch:12},
{wch:30},
{wch:30},
{wch:30},
{wch:15},
{wch:15},
{wch:12},
{wch:15},
{wch:20},
{wch:20},
{wch:10}
];

let amount = 0;
let amount_iva = 0;

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

0 comments on commit 039c2c2

Please sign in to comment.