Logical Error in Script Logic
Please provide your guidance for the following scenario.
I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
To accomplish this, I have written the following script logic.
*WHEN ACCOUNT *IS AccumDep, Depreciation *FOR %MON% = 2009.FEB,2009.MAR,2009.APR *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%) *NEXT *ENDWHEN *COMMIT
The above logic was validated without any 'syntax' errors. However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month. The amount from FEB appears for MAR & APR also.
Therefore, could you please review the above script and let me know if there are any 'logical' errors?
All your guidance is greatly appreciated. Thanks...