Apply vendor advance to multiple bills

Apply vendor advance to multiple bills

How do we apply a vendor advance to multiple vendor bills?

Example, we pay vendor bulk amount such as retainer, they send us 20-30 bills per month, all drawing from one of the vendor advance payments, or multiple vendor advance payments.