A supplier can invoice part of a purchase order after one delivery. Matching the invoice only against the whole order makes a correct partial quantity appear wrong.

Link received line items and outstanding quantities before comparing amounts. Include contracts that record cases, units and multipacks differently in a test of the matching rules.