From 734d76754611c8d164798338b20ca3c1157e66ca Mon Sep 17 00:00:00 2001 From: Wisley Alves Date: Mon, 27 May 2024 12:25:07 -0300 Subject: [PATCH] fix(export-order): fix add installments --- functions/lib/integration/exports/orders-to-horus.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions/lib/integration/exports/orders-to-horus.js b/functions/lib/integration/exports/orders-to-horus.js index 5d13f77..cbd1ff5 100644 --- a/functions/lib/integration/exports/orders-to-horus.js +++ b/functions/lib/integration/exports/orders-to-horus.js @@ -317,10 +317,12 @@ module.exports = async ({ appSdk, storeId, auth }, orderId, opts = {}) => { const params = new url.URLSearchParams(body) const endpoint = `/InsVencPedidoVenda?${params.toString()}` - console.log('>> try installments: ', endpoint) + console.log('>> try is new: ', isNew, ' installments: ', endpoint) - // await requestHorus(horus, endpoint, 'POST') - // .catch(console.error) + if (isNew) { + await requestHorus(horus, endpoint, 'POST') + .catch(console.error) + } return { order,