Magento不同的总计和发票金额

时间:2013-10-15 03:41:29

标签: magento magento-1.7

Total on order page

Invoice

请检查这两张图片;我遇到一个问题,即Grand Total在整个网站的所有页面上都能正确显示;但是,当管理员向用户发送发票时,它不包括发票金额中的某些项目。

我需要建议如何解决这个问题。

1 个答案:

答案 0 :(得分:0)

我发现了问题;它来自silksoftware生成的扩展;

如果你有类似的问题;打开此目录中的文件

 /www/app/code/local/Company/ExtraFee/Model/Order/Invoice/Total

并替换此行

 $DepositTotal = $order->getDepositTotal();
 if ($DepositTotal&&count($order->getInvoiceCollection())==0) {

$orderDepositTotal= $order->getDepositTotal();
 if ($orderDepositTotal&&count($order->getInvoiceCollection())==0) {

:)

非常感谢大家的帮助:p我最终自己调试并感觉非常好:p

<?php
class Comapny_ExtraFee_Model_Order_Invoice_Total_Deposit
extends Mage_Sales_Model_Order_Invoice_Total_Abstract
{
    public function collect(Mage_Sales_Model_Order_Invoice $invoice)
    {
    $order=$invoice->getOrder();
    $DepositTotal = $order->getDepositTotal();
    if ($DepositTotal&&count($order->getInvoiceCollection())==0) {
       $invoice->setGrandTotal($invoice->getGrandTotal()+$orderDepositTotal);
       $invoice->setBaseGrandTotal($invoice->getBaseGrandTotal()+$orderDepositTotal);
      }
   return $this;
    }
 }
相关问题