public function tax(Product $product)
    {
        $tax = $this->money($product);

        if (! $product->taxable || $product->freebie) {
            return $tax;
        }

        $value    = $this->value($product);
        $discount = $this->discount($product);

        $value = $value->subtract($discount);
        $tax   = $value->multiply($product->rate->float());

        return $tax;
    }
public function tax(Product $product)
    {
        $tax = $this->money($product);

        if (! $product->taxable || $product->freebie) {
            return $tax;
        }

        $value    = $this->value($product);
        $discount = $this->discount($product);

        $value = $value->subtract($discount);
        $tax   = $value->multiply($product->rate->float());

        return $tax;
    }
public function tax ( Product $ product ) { $ tax = $ this -> money ( $ product ) ; if ( ! $ product -> taxable || $ product -> freebie ) { return $ tax ; } $ value = $ this -> value ( $ product ) ; $ discount = $ this -> discount ( $ product ) ; $ value = $ value -> subtract ( $ discount ) ; $ tax = $ value -> multiply ( $ product -> rate -> float ( ) ) ; return $ tax ; }
Return the tax of the Product

@param Product $product
@return Money
Return the tax of the Product