From c782ff739fecebfae40ebdedfea352ea73eaf7f2 Mon Sep 17 00:00:00 2001 From: Raul Rodriguez Date: Fri, 20 Feb 2015 14:10:50 +0100 Subject: [PATCH] fix query that gets global tax rate --- src/bb-modules/Invoice/ServiceTax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Invoice/ServiceTax.php b/src/bb-modules/Invoice/ServiceTax.php index af93b7399..3f8cfa8c6 100644 --- a/src/bb-modules/Invoice/ServiceTax.php +++ b/src/bb-modules/Invoice/ServiceTax.php @@ -57,8 +57,8 @@ class ServiceTax implements InjectionAwareInterface return $tax->taxrate; } - // find rate which matches clients country - $tax = $this->di['db']->findOne('Tax', 'state is NULL or state = "" and country is null or country = ""'); + // find global rate + $tax = $this->di['db']->findOne('Tax', '(state is NULL or state = "") and (country is null or country = "")'); if($tax instanceof \Model_Tax) { $title = $tax->name; return $tax->taxrate;