Commit 1a7c3128 authored by Schoumi's avatar Schoumi

Fix error double toDate and log error before breaking loop

parent 73b9cba3
......@@ -179,6 +179,7 @@ async function getAllDeclaration(params, declarationList) {
accData.lastSaved = declarationList[i]
this.saveAccountData(accData, { merge: false })
} catch (error) {
log('error',error)
break
}
}
......@@ -243,7 +244,6 @@ async function getDeclaration(params, periode) {
}
let year = 2000 + Math.floor(periode / 100)
bill.filename = '' + year + '-' + month + '.pdf'
bill.date = bill.date.toDate()
bill.filestream = await buildDeclarationPDF(data, periode)
return bill
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment