Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
9.3 kB
3
Indexable
Never
2023-01-11T16:35:09.846Z | [9jyzjckfmilcrvuge6] <------------ New Request /api/v1/invoice/authorize ----------->
2023-01-11T16:35:09.847Z | [9jyzjckfmilcrvuge6] loqueRequest authResponseDateStart: 2023-01-11 13:35:09.830
2023-01-11T16:35:09.848Z | [9jyzjckfmilcrvuge6] request.body -->> {"requestCredential":{"companyCode":"TESTQACOL","storeCode":"TQA2","terminalCode":"T1"},"customer":{"documentType":2,"identificationNumber":222222222222,"taxCategory":"01","billingEmail":"wilmari.carvajalnapse.global","personalEmail":"wilmari.carvajalnapse.global","businessName":"consumidor final"},"fiscalDocument":{"internalId":"98","invoiceType":"1","saleCondition":"1","currency":"COP","currencyChange":0.01,"invoiceDate":"2023-01-11T16:29:18.683Z","items":[{"name":"bombombum colombina","qty":1,"sku":"123bbb4567clm4567k","um":"UN","tax":19,"taxAmount":19,"internalTax":0,"discount":0,"unitPrice":100,"totalPrice":119}],"relatedTaxes":[{"name":"IVA 19","amount":19,"baseAmount":100,"code":19}],"paymentMethods":[{"code":"10","name":"EFECTIVO","surcharge":0,"amount":119,"paymentMethodsInfo":[]}],"subtotalAmount":100,"ticketDiscount":0,"discountAmount":0,"nonTaxedAmount":0,"taxedAmount":100,"amountIVA":19,"amountOtherTaxes":0,"exemptAmount":0,"totalAmount":119,"customer":{"identificationNumber":222222222222,"businessName":"consumidor final","billingEmail":"wilmari.carvajalnapse.global","taxCategory":"01"},"ffuid":"032abea370868bb8c4816d44193eebbf6dd603d9"}}
2023-01-11T16:35:09.851Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando request
2023-01-11T16:35:09.851Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando compañia
2023-01-11T16:35:09.860Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando terminal y tienda
2023-01-11T16:35:09.869Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando resolución (OperationNumber) del comprobante
2023-01-11T16:35:09.910Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando la fecha del comprobante
2023-01-11T16:35:09.910Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando la numeracion del comprobante
2023-01-11T16:35:09.911Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Incrementamos el consecutivo del comprobante a: 816
2023-01-11T16:35:09.911Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando esquema de datos del cliente
2023-01-11T16:35:09.911Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Autocompletando datos en el fiscalDocument
2023-01-11T16:35:09.912Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando fiscalDocument
2023-01-11T16:35:09.913Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Validando existencia del cliente, sino existe lo creamos
2023-01-11T16:35:09.926Z | [CAFAM] sendToCafam => Obteniendo url de envio cafam
2023-01-11T16:35:09.926Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => [] Intento autorizacion (0 de 3) del documento en 7 segundos...
2023-01-11T16:35:09.927Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize => Iniciando envio CAFAM
2023-01-11T16:35:09.928Z | [MapperCAFAM] map => Obteniendo ciudad del cliente
2023-01-11T16:35:09.929Z | [CAFAM] sendToCafam => Iniciando mapeo cafam
2023-01-11T16:35:09.936Z | [MapperCAFAM] map => Obteniendo ciudad de la compañia
2023-01-11T16:35:09.959Z | [MapperCAFAM] map => Mapeando encabezado del comprobante
2023-01-11T16:35:09.959Z | [MapperCAFAM] map => Mapeando cliente del comprobante
2023-01-11T16:35:09.960Z | [MapperCAFAM] map => Mapeando items del comprobante
2023-01-11T16:35:09.960Z | [MapperCAFAM] map => Mapeando resolución del comprobante
2023-01-11T16:35:09.965Z | [CAFAMToken] getTokenFromDatabase => Token expirado, solicitando uno nuevo
2023-01-11T16:35:09.965Z | [MapperCAFAM] map => Mapeando totales del comprobante
2023-01-11T16:35:09.966Z | [MapperCAFAM] map => Mapeando proveedor del comprobante
2023-01-11T16:35:09.966Z | [MapperCAFAM] map => Mapeando metodos de pago del comprobante
2023-01-11T16:35:09.966Z | [CAFAM] sendToCafam => Request: {"ClientId":"1144095897","AccountId":"1144095897-01","invoice":{"ENC":{"ENC_1":"INVOIC","ENC_2":"20243145377","ENC_3":"222222222222","ENC_4":"UBL 2.1","ENC_5":"DIAN 2.1: Factura Electrónica de Venta","ENC_6":"FV5816","ENC_7":"2023-01-11","ENC_8":"13:29:18-05:00","ENC_9":"1","ENC_10":"COP","ENC_15":"1","ENC_16":"2023-01-11","ENC_17":"","ENC_20":"2","ENC_21":"10"},"CUF":{"CUF_1":""},"EMI":{"EMI_1":"1","EMI_2":"20243145377","EMI_3":"31","EMI_6":"COMPANIA DE PRUEBAS QA COLOMBIA SA","EMI_7":"undefined","EMI_10":"undefined","EMI_11":"11","EMI_13":"BOGOT�, D.C.","EMI_14":"110111","EMI_15":"CO","EMI_19":"Bogot�, D.C.","EMI_21":"Colombia","EMI_22":"0","EMI_23":"1","EMI_24":"undefined","TAC":{"TAC_1":"O-13"},"DFE":{"DFE_1":"11001","DFE_2":"11","DFE_3":"CO","DFE_4":"110111","DFE_5":"Colombia","DFE_6":"Bogot�, D.C.","DFE_7":"BOGOT�, D.C."},"CDE":[{"CDE_1":"1","CDE_4":"TESTQA@COLGLOBAL.COM"}],"GET":{"GTE_1":"1","GTE_2":"IVA"}},"ADQ":{"ADQ_1":"2","ADQ_2":"222222222222","ADQ_3":"2","ADQ_4":"49","ADQ_6":"consumidor final","ADQ_7":"consumidor final","ADQ_8":"consumidor final","ADQ_10":"undefined","ADQ_11":"5","ADQ_13":"MEDELL�N","ADQ_14":"undefined","ADQ_19":"Antioquia","TCR":{"TCR_1":"R-99-PN"},"CDA":[{"CDA_1":"1","CDA_2":"consumidor final","CDA_4":"wilmari.carvajalnapse.global"}]},"TOT":{"TOT_1":"100","TOT_2":"COP","TOT_3":"100","TOT_4":"COP","TOT_5":"119","TOT_6":"COP","TOT_7":"119","TOT_8":"COP","TOT_9":"0","TOT_10":"COP","TOT_13":"0.00","TOT_14":"COP"},"ITE":[{"ITE_1":"1","ITE_3":"1","ITE_4":"UN","ITE_5":"119","ITE_6":"COP","ITE_7":"100","ITE_8":"COP","ITE_11":"bombombum colombina","ITE_12":"bombombum colombina","ITE_27":"1","ITE_28":"UN","TIM":[{"TIM_1":"false","TIM_2":"19","TIM_3":"COP","TIM_4":"0","TIM_5":"COP","IMP":[{"IMP_1":"1","IMP_2":"119","IMP_3":"COP","IMP_4":"19","IMP_5":"COP","IMP_6":"undefined"}]}]}],"TIM":[{"TIM_1":"false","TIM_2":"19","TIM_3":"COP","TIM_4":"0","TIM_5":"COP","IMP":[{"IMP_1":"1","IMP_2":"100","IMP_3":"COP","IMP_4":"19","IMP_5":"COP","IMP_6":"19"}]}],"DRF":{"DRF_1":"5555","DRF_2":"2022-12-31","DRF_3":"2023-01-30","DRF_4":"FV5","DRF_5":"804","DRF_6":"904"},"MEP":[{"MEP_1":"10","MEP_2":"1","MEP_3":"2023-01-11"}]}}
2023-01-11T16:35:09.967Z | [MapperCAFAM] map => Mapeando impuestos a nivel global del comprobante 
2023-01-11T16:35:09.967Z | [CAFAMToken] getTokenFromDatabase => Buscando token en la DB
2023-01-11T16:35:10.891Z | [CAFAMToken] decodeToken => Parseando el payload decodificado 
2023-01-11T16:35:10.894Z | [CAFAM] sendToCafam => Preparando peticion axios para envio de comprobante
2023-01-11T16:35:10.895Z | [CAFAMToken] decodeToken => Decodificando el base64 del payload en el token
2023-01-11T16:35:10.895Z | [CAFAMToken] saveToken => Decodificando token, para almacenarlo en DB
2023-01-11T16:35:10.896Z | [CAFAMToken] decodeToken => Separando token JWT
2023-01-11T16:35:10.896Z | [CAFAMToken] getToken => Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhZmFtQHlvcG1haWwuY29tIiwiaWF0IjoxNjczNDU0ODY5LCJleHAiOjE2NzM0NzY0Njl9.I0Wxy-LODv49fyEYPmdhkeQ2Gzcp4UHOZdUeiVrweUs
2023-01-11T16:35:10.896Z | [CAFAMToken] decodeToken => Token JWT decodificado y parseado satisfactoriamente
2023-01-11T16:35:10.896Z | [CAFAMToken] saveToken => Guardando token en DB
2023-01-11T16:35:11.596Z | [CAFAM] sendToCafam ERROR => Error al enviar comprobante a Carvajal: Cannot read property 'legalStatus' of undefined
2023-01-11T16:35:11.597Z | [CAFAM] STACK: TypeError: Cannot read property 'legalStatus' of undefined
    at CAFAM.<anonymous> (/usr/local/etc/fiscalflow-col/src/libs/cafam/carvajal.ts:92:49)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/etc/fiscalflow-col/dist/libs/cafam/carvajal.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
2023-01-11T16:35:11.605Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize ERROR => Error enviando comprobante a cafam: Cannot read property 'legalStatus' of undefined
2023-01-11T16:35:11.606Z | [9jyzjckfmilcrvuge6] STACK: TypeError: Cannot read property 'legalStatus' of undefined
    at CAFAM.<anonymous> (/usr/local/etc/fiscalflow-col/src/libs/cafam/carvajal.ts:92:49)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/etc/fiscalflow-col/dist/libs/cafam/carvajal.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
2023-01-11T16:35:11.606Z | [9jyzjckfmilcrvuge6] FiscalDocumentController.authorize ERROR => Error autorizando documento: Error interno de servidor: Cannot read property 'legalStatus' of undefined
2023-01-11T16:35:11.606Z | [9jyzjckfmilcrvuge6] STACK: undefined
2023-01-11T16:35:11.610Z | [CAFAM] sendToCafam => Insertando FiscalDocumentLog
2023-01-11T16:35:11.612Z | [9jyzjckfmilcrvuge6] response.body -->> {"ack":2999,"message":"Error interno de servidor: Cannot read property 'legalStatus' of undefined"}
2023-01-11T16:35:50.441Z | [ge81ajm2wslcrvvbpy] loqueRequest authResponseDateStart: 2023-01-11 13:35:50.431
2023-01-11T16:35:50.444Z |