示例#1
0
 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;
     }
 }
示例#2
0
 public function getLocalTax()
 {
     if ($tax = parent::getLocalTax()) {
         return $tax;
     } else {
         if ($state = $this->getState()) {
             return taxRate($state);
         } else {
             return 6.25;
             // Massachusetts
         }
     }
 }
示例#3
0
 public static function getTax($subtotal, $state = null)
 {
     return $subtotal * taxRate($state) / 100.0;
 }