/** * Process row amount based on FPT total amount configuration setting * * @param \Magento\Quote\Model\Quote\Address $address * @param float $rowValueExclTax * @param float $baseRowValueExclTax * @param float $rowValueInclTax * @param float $baseRowValueInclTax * @return $this */ protected function processTotalAmount($address, $rowValueExclTax, $baseRowValueExclTax, $rowValueInclTax, $baseRowValueInclTax) { if ($this->weeeData->includeInSubtotal($this->_store)) { $address->addTotalAmount('subtotal', $rowValueExclTax); $address->addBaseTotalAmount('subtotal', $baseRowValueExclTax); } else { $address->addTotalAmount('weee', $rowValueExclTax); $address->addBaseTotalAmount('weee', $baseRowValueExclTax); } $address->setSubtotalInclTax($address->getSubtotalInclTax() + $rowValueInclTax); $address->setBaseSubtotalInclTax($address->getBaseSubtotalInclTax() + $baseRowValueInclTax); return $this; }
/** * Process row amount based on FPT total amount configuration setting * * @param \Magento\Quote\Model\Quote\Address $address * @param float $rowValueExclTax * @param float $baseRowValueExclTax * @param float $rowValueInclTax * @param float $baseRowValueInclTax * @return $this */ protected function processTotalAmount($address, $rowValueExclTax, $baseRowValueExclTax, $rowValueInclTax, $baseRowValueInclTax) { if (!$this->weeeData->isTaxable($this->_store)) { //Accumulate the values. Will be used later in the 'weee tax' collector $this->weeeTotalExclTax += $this->priceCurrency->round($rowValueExclTax); $this->weeeBaseTotalExclTax += $this->priceCurrency->round($baseRowValueExclTax); } //This value is used to calculate shipping cost; it will be overridden by tax collector $address->setSubtotalInclTax($address->getSubtotalInclTax() + $this->priceCurrency->round($rowValueInclTax)); $address->setBaseSubtotalInclTax($address->getBaseSubtotalInclTax() + $this->priceCurrency->round($baseRowValueInclTax)); return $this; }