PharMericaA local court has ruled against Louisville-based PharMerica Corp. in a $48.5 million dispute with a drug supplier over unpaid bills.

PharMerica, a pharmacy services provider, said in a press release that it had refused to pay the invoices from AmeriSourceBergen Drug Corp. (ABDC) because it alleges that it’s owed more than that by ABDC.

“PharMerica … withheld payment and applied the invoiced amounts against rebates and other amounts that PharMerica believes ABDC owes it and which are in excess of $48.5 million,” the company said in the release.

The Louisville company said the ruling of the Jefferson County Circuit Court, from April 1, “has not, in any way, impaired PharMerica’s ability to ultimately recover damages the company believes it is owed by ABDC.”

PharMerica had filed a breach of contract suit against ABDC, based in Valley Forge, Pa., in 2014. The Louisville company said it will appeal the ruling, a process it expects to take six months to a year.

PharMerica had reported in February that it earned a net profit of $20.2 million in the quarter that ended Dec. 31, compared to $3.2 million a year earlier. The company delivers more than 30 million prescriptions a year to nursing facilities.

ABDC ranks 16th on the Fortune 500 list with more than $135 billion in annual revenues. It employs about 18,000.