The VAT rate used to code an invoice must match that on the face of the invoice.
If the rate is 20%, then use PS - Purchase Standard Rated
For 0% VAT, then use PZ - Purchase Zero Rated apart from advertising (NB Cycle helmets are zero rated).
For Advertising where there is no VAT use PA - Purchase Advertising
If there is no VAT but the goods are exempt or the rate is E use PE.
If the supplier is too small to be registered for VAT (if there is no VAT number on the invoice, then this applies) then use PO - Purchase Outside the Scope.
If the supplier address is outside the UK - the tax code should be PR - Purchases Reverse Charge.
If an invoice has lines with different VAT rates, then these need to be split in the invoice coding and the appropriate rate applied to each line.