Problem with out of the box sync script for General Ledger IS/BS database

Specifically, the Balance Sheet stream. This script queries the GLPeriodBal table for data. The 0 period is the balance forward amount for the year. In the out of the box query, there is logic that looks for this 0 period balance and it fires when it sees the first period. However, if there is no period 1 (when there are not a lot of transactions that hit this account) then this part of the script does not fire and the year opening balance is not correct. Has anyone modified their query to correct this? If so, I would be curious to know how you corrected this.

Hi Mike,
We found a number of issues with the standard query. Also the data model is not Phocas best practice. It uses different measures for Actuals and Budget instead of different streams (along with other issues).
We ended up ditching the standard queries and creating our own using the GL transaction tables instead, then created a new database from scratch.
Let me know if you would like a hand with it.
Regards, Michael