public function addTaxAmount(TaxAmount $taxAmount)
    {
        $this->total += $taxAmount->getAmount();

        foreach ($this->taxes as $tax) {
            if ($tax->getTax() == $taxAmount->getTax()) {
                $tax->addAmount($taxAmount->getAmount());
                return;
            }
        }

        $this->taxes[] = $taxAmount;
    }
public function addTaxAmount(TaxAmount $taxAmount)
    {
        $this->total += $taxAmount->getAmount();

        foreach ($this->taxes as $tax) {
            if ($tax->getTax() == $taxAmount->getTax()) {
                $tax->addAmount($taxAmount->getAmount());
                return;
            }
        }

        $this->taxes[] = $taxAmount;
    }
public function addTaxAmount ( TaxAmount $ taxAmount ) { $ this -> total += $ taxAmount -> getAmount ( ) ; foreach ( $ this -> taxes as $ tax ) { if ( $ tax -> getTax ( ) == $ taxAmount -> getTax ( ) ) { $ tax -> addAmount ( $ taxAmount -> getAmount ( ) ) ; return ; } } $ this -> taxes [ ] = $ taxAmount ; }
Adds a tax amount

@param TaxAmount $taxAmount
Adds a tax amount