This routine calculates a single value representing the amount of days sales contained within the current period trade debtors figure. The DSO sub-routine included here makes certain assumptions:
The parameters supplied are fully defined points of view (for example, Account/C1/C2/C3/C4/ICP) because the routine uses the HS.GETCELL function.
The routine will calculate the days going back as far as possible in time. However, it will stop if the periodic sales value for any period is a negative or zero value.