Hello,
it should be default behaviour in VirtueMarts tax mode called EU mode.
Shoppers from abroad who provide valid VAT ID are except from VAT.
Local companies (from the same country as seller) are charged the VAT even when providing a valid EU VAT ID.
This is an EU standard.
Our utility
VirtueMart VAT ID Chekers makes sure this work with all VirtueMart versions, as in some of them, this funcitonality was broken.
It also validates the VAT ID online agains the EU online VAT ID registry.