fetch vat rate for purchaseinvoice calcs from database

fixes #163