how to calculate average account payable