The ending balance for March would be $85,700.
You would create a T-account for accounts payable and since accounts payable is a liability, you would credit the beginning balance. The purchases made during the month are also credited because you are increasing the amount in the liability. The $10,700 would not be included because this is unearned revenue and while it is a liability, it does not classify as accounts payable. The $37,800 would be debited since you are decreasing the liability by paying part of it off.
Once doing so, you add up the amounts on the right side and deduct the amounts on the left: (78,200+45,300)-37,800=85,700