1

我的不含税金额被视为含税。现在我知道你会说我的设置搞砸了,但它们正确设置为不含税。如果我启用该行的税收设置,它会显示 10 条牛仔裤,每条 10 欧元,包括税前 100 欧元和 119 欧元(19% 荷兰税)。

例子:

Subtotal:           100
Shipping:           50
Grand Total ex:     121,5
TAX:                28,5
Grand Total In:     150

我发现了另一个有同样问题的案例,但遗憾的是没有答案...... http://www.magentocommerce.com/answers/Catalog-prices-do-not-include-tax-but-if-I-check -不包括税我的价格变化

复制粘贴示例

Subtotal (Excl. Tax)    € 65,20
Subtotal (Incl. Tax)    € 77,59
Shipping Excl. Tax (Flat Rate - Fixed)  € 50,00
Shipping Incl. Tax (Flat Rate - Fixed)  € 59,50 
Totaal Excl. BTW    € 93,31
BTW € 21,89
Totaal Incl. BTW    € 115,20 
4

1 回答 1

0

它远非漂亮,但以下作品!

19% 是荷兰税额

class Mage_Sales_Model_Quote_Address_Total_Grand extends Mage_Sales_Model_Quote_Address_Total_Abstract
{
    /**
     * Collect grand total address amount
     *
     * @param   Mage_Sales_Model_Quote_Address $address
     * @return  Mage_Sales_Model_Quote_Address_Total_Grand
     */
    public function collect(Mage_Sales_Model_Quote_Address $address)
    {
        $grandTotal     = $address->getGrandTotal();
        $baseGrandTotal = $address->getBaseGrandTotal();

        $totals     = array_sum($address->getAllTotalAmounts());
        $baseTotals = array_sum($address->getAllBaseTotalAmounts());

        $address->setGrandTotal(($grandTotal+$totals) * 1.19);
        $address->setBaseGrandTotal(($grandTotal+$totals) * 1.19);
        return $this;
    }

    /**
     * Add grand total information to address
     *
     * @param   Mage_Sales_Model_Quote_Address $address
     * @return  Mage_Sales_Model_Quote_Address_Total_Grand
     */
    public function fetch(Mage_Sales_Model_Quote_Address $address)
    {
        $address->addTotal(array(
            'code'  => $this->getCode(),
            'title' => Mage::helper('sales')->__('Grand Total'),
            'value' => $address->getGrandTotal(),
            'area'  => 'footer',
        ));
        return $this;
    }
}
于 2012-08-17T14:40:43.720 回答