From a7c17c1b8c057e89cf614de28cbb192996102dd2 Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Wed, 7 Aug 2019 18:13:00 -0300 Subject: [PATCH] fix iva --- db/index.js | 4 ++-- debo/cuerpoDebo.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/index.js b/db/index.js index 1f1c6fa..4fbe4cd 100644 --- a/db/index.js +++ b/db/index.js @@ -28,8 +28,8 @@ module.exports = function(comprobante, nameFile) { if(err) console.log(err); console.log('COMPROBANTE GUARDADO CON ÉXITO'); }); - }).catch(function() { - + }).catch(function(e) { + console.log(e); console.log('ERROR AL GUARDAR EL COMPROBANTE'); }); } diff --git a/debo/cuerpoDebo.js b/debo/cuerpoDebo.js index 7eef45e..7086986 100644 --- a/debo/cuerpoDebo.js +++ b/debo/cuerpoDebo.js @@ -15,7 +15,7 @@ module.exports = function(comprobante, afipTablas, entities, item) { CAN: item.cantidad, // [money] NOT NULL, CANTIDAD DEL ITEM PUN: item.precioUnitario, // [decimal](20, 8) NOT NULL PRECIO UNITARIO DEL PRODUCTO ITEM IMI: item.impuestoInterno ? item.impuestoInterno.importeImpuesto : 0, // [money] NOT NULL, IMPORTE IMPUESTOS INTERNOS DEL ITEM - IVA: item.alicuotaIVAAplicable ? ((item.precioUnitario * item.cantidad) * comprobante.itemsFactura.alicuotaIVAAplicable) / 100 : 0, + IVA: item.alicuotaIVAAplicable ? ((item.precioUnitario * item.cantidad) * item.alicuotaIVAAplicable) / 100 : 0, PUT: item.precioUnitario, // [money] NOT NULL, IGUAL AL PUN LEG: 0, // [int] NOT NULL, FIJO 0 CMF: 0, // [int] NOT NULL, FIJO 0 -- 1.9.1