public static function getTax($subtotal, $state = null) { if (in_array($state, array('KS', 'KY', 'NY', 'ND', 'WA'))) { return $subtotal * taxRate($state) / 100.0; } else { return 0; } }
public function getLocalTax() { if ($tax = parent::getLocalTax()) { return $tax; } else { if ($state = $this->getState()) { return taxRate($state); } else { return 6.25; // Massachusetts } } }
public static function getTax($subtotal, $state = null) { return $subtotal * taxRate($state) / 100.0; }