Skip to content

Commit

Permalink
fix(parse-bling-order): fix deadLine
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Oct 3, 2024
1 parent 6047df7 commit 60229ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/lib/integration/parsers/order-to-bling/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const ecomUtils = require('@ecomplus/utils')
const parseAddress = require('../address-to-bling')
const { logger } = require('../../../../context')

module.exports = (order, blingOrderNumber, blingStore, appData, customerIdBling, paymentTypeId, itemsBling, originalBlingOrder) => {
try {
Expand Down Expand Up @@ -62,7 +63,7 @@ module.exports = (order, blingOrderNumber, blingStore, appData, customerIdBling,
const addDaysMs = i ? (i * 30 * 24 * 60 * 60 * 1000) : 0
const deadLine = new Date(date + addDaysMs)
blingOrder.parcelas.push({
dataVencimento: deadLine.substring(0, 10),
dataVencimento: deadLine.toISOString().substring(0, 10),
valor: vlr,
observacoes: `${blingPaymentLabel} (${(i + 1)}/${number})`,
formaPagamento: { id: paymentTypeId }
Expand Down Expand Up @@ -137,6 +138,6 @@ module.exports = (order, blingOrderNumber, blingStore, appData, customerIdBling,

return blingOrder
} catch (err) {
console.error(err)
logger.error(err)
}
}

0 comments on commit 60229ea

Please sign in to comment.