Average Payment Period Calculation