*Whats the simplest way to get the accounting peri...
# suitescript
e
Whats the simplest way to get the accounting period (if any) for every date in a javascript array of
date
objects?
Each
date
is a standalone javascript date object, not a
trandate
in a transaction. So, I have a
date
object as input, and I want the corresponding accounting period (the internal ID is fine) as an output. My approach so far: Get all the open periods in a single search and create a new object
openPeriods
. For every
date
object, search the
openPeriods
to match the dates.
a
Untitled.js
1
🙌 1
💡 1