Commit 37266dcb05218f306dc226df7f6f07de8843fc45

Authored by Eric Fernandez
1 parent da1dfc07cb
Exists in master

+console log

Showing 2 changed files with 8 additions and 5 deletions   Show diff stats
... ... @@ -25,6 +25,9 @@ module.exports = function(config) {
25 25  
26 26 guardarComprobante: function (body) {
27 27  
  28 + console.log('recibo datos guardarComprobante en estación');
  29 + console.log(body);
  30 +
28 31 return new Promise((resolve, reject) => {
29 32  
30 33 delete body.cabecera.idTransaccion;
... ... @@ -105,9 +108,9 @@ module.exports = function(config) {
105 108 ID_MOTIVO_NANB: 0
106 109 }));
107 110 };
108   -
  111 +
109 112 cuerpo.estado == 'rechazado' ? cuerpo.cantidadRecibida = 0 : false;
110   -
  113 +
111 114 delete cuerpo.GLN;
112 115 delete cuerpo.C_HD2;
113 116 delete cuerpo.E_HD2;
... ... @@ -13,7 +13,7 @@ client.on('open', function open() {
13 13 client.on('message', function incoming(message) {
14 14  
15 15 message = JSON.parse(message.toString('utf8'));
16   - console.log(message);
  16 +
17 17 switch (message.action) {
18 18 case 'getEntity':
19 19  
... ... @@ -28,8 +28,8 @@ client.on('open', function open() {
28 28 data.guardarComprobante(message.req).then(() => {
29 29 console.log('se guardó');
30 30 client.send(JSON.stringify('ok'));
31   - }).catch(() => {
32   - console.log('no se guardó');
  31 + }).catch((ee) => {
  32 + console.log('no se guardó' + ee);
33 33 client.send(JSON.stringify('bad'));
34 34 });
35 35