首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >对一州海运营业税的商业规则

对一州海运营业税的商业规则
EN

Drupal用户
提问于 2014-12-02 20:49:55
回答 1查看 350关注 0票数 1

我们只想对运往特定国家的订单征收销售税。我试图从包含的‘价格组件’中拼凑出以下规则,它似乎适用于对所有订单的航运征税,而不管是哪个地址组件。

有人能看看这个然后告诉我我做错了什么吗?

代码语言:javascript
复制
{ "rules_apply_taxes_to_shipping" : {
    "LABEL" : "Apply Taxes to Shipping",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "commerce_order", "commerce_tax", "commerce_shipping" ],
    "ON" : { "commerce_shipping_calculate_rate" : [] },
    "IF" : [
      { "commerce_order_compare_address" : {
          "commerce_order" : [ "commerce-line-item:order" ],
          "address_field" : "commerce_customer_shipping|commerce_customer_address",
          "address_component" : "administrative_area",
          "value" : "WA"
        }
      }
    ],
    "DO" : [
      { "commerce_tax_calculate_by_type" : {
          "commerce_line_item" : [ "commerce_line_item" ],
          "tax_type_name" : "sales_tax"
        }
      }
    ]
  }
}

这是规则评估日志。很明显规则甚至都不是开火。我该怎么想呢?

代码语言:javascript
复制
    0 ms Reacting on event Calculating the sell price of a product.
    3.479 ms Evaluating conditions of rule Calculate taxes: VAT. [edit]
    3.489 ms AND evaluated to TRUE.
        0 ms Rule Calculate taxes: VAT fires.
        0.138 ms Evaluating the action commerce_tax_calculate_by_type. [edit]
        4.267 ms Rule Calculate taxes: VAT has fired.
    7.837 ms Evaluating conditions of rule Calculate Bundle Product Price. [edit]
    7.845 ms AND evaluated to TRUE.
        0 ms Rule Calculate Bundle Product Price fires.
        0.093 ms Evaluating the action commerce_product_bundle_calculate_price. [edit]
        4.688 ms Rule Calculate Bundle Product Price has fired.
    12.594 ms Evaluating conditions of rule Quote Required. [edit]
    12.609 ms AND evaluated to TRUE.
        0 ms Rule Quote Required fires.
        0.012 ms Rule Quote Required has fired.
    12.692 ms Evaluating conditions of rule Calculate taxes: Sales tax. [edit]
    12.699 ms AND evaluated to TRUE.
        0 ms Rule Calculate taxes: Sales tax fires.
        0.111 ms Evaluating the action commerce_tax_calculate_by_type. [edit]
            0 ms Executing rule Calculate Sample Michigan Sales Tax 6%.
            0.169 ms Evaluating conditions of rule Calculate Sample Michigan Sales Tax 6%. [edit]
            2.254 ms The condition commerce_order_compare_address evaluated to TRUE [edit]
            2.263 ms AND evaluated to TRUE.
                0 ms Rule Calculate Sample Michigan Sales Tax 6% fires.
                0.089 ms Evaluating the action commerce_tax_rate_apply. [edit]
                0.571 ms Added the provided variable applied_tax of type commerce_price [edit]
                0.6 ms Rule Calculate Sample Michigan Sales Tax 6% has fired.
            2.905 ms Finished executing of rule Calculate Sample Michigan Sales Tax 6%.
        5.114 ms Rule Calculate taxes: Sales tax has fired.
    17.894 ms Evaluating conditions of rule Unset the price of disabled products in the cart. [edit]
    18.145 ms The condition data_is_empty evaluated to FALSE [edit]
    18.334 ms The condition entity_has_field evaluated to TRUE [edit]
    19.067 ms The condition data_is evaluated to FALSE [edit]
    19.076 ms AND evaluated to FALSE.
    19.102 ms Evaluating conditions of rule Quote Required. [edit]
    19.195 ms The condition data_is_empty evaluated to FALSE [edit]
    19.296 ms The condition entity_has_field evaluated to TRUE [edit]
    19.708 ms The condition data_is evaluated to FALSE [edit]
    19.716 ms AND evaluated to FALSE.
    19.737 ms Finished reacting on event Calculating the sell price of a product.
EN

回答 1

Drupal用户

发布于 2015-12-06 14:57:15

不知道为什么你的规则不是基于州触发的。从标签上看,你似乎在试图对订单总额征税,包括航运。因此,您需要两件事,您需要配置一个州特定的税收规则,然后您需要一个运输规则,和第二个运费率计算,它将您的税适用于您的运费率。希望这能帮上忙。

票数 0
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/138668

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档