Hello @dsenevirathne54 ,
I don’t have a full answer for you but I noticed a prior post where Miguel80 explains how to know the number of days in each period. His idea, quoted below, will help you to choose a correct day as the last day of the prior month.
Your Business Event/Import Scenario will subtract 1 from today’s Month obtain the Month Number for your Voucher.
Your Business Event will connect to Financial table to see how many days are in the prior month, and use that number as the date for your Voucher.
miguel80 wrote:
Better answer than my last one:
Join to the FinPeriod Table it has a “Length” field and it contains the length in days of each period. As long as your periods match the months you can use that.
I hope this helps you - we need to save you from creating a voucher on the 31st day of September! 😉
Laura