当前位置: 首页>>代码示例>>PHP>>正文


PHP JSFactory::getAllTaxesOriginal方法代码示例

本文整理汇总了PHP中JSFactory::getAllTaxesOriginal方法的典型用法代码示例。如果您正苦于以下问题:PHP JSFactory::getAllTaxesOriginal方法的具体用法?PHP JSFactory::getAllTaxesOriginal怎么用?PHP JSFactory::getAllTaxesOriginal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JSFactory的用法示例。


在下文中一共展示了JSFactory::getAllTaxesOriginal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAllTaxes

 public static function getAllTaxes()
 {
     static $rows;
     if (!is_array($rows)) {
         $jshopConfig = JSFactory::getConfig();
         $dispatcher = JDispatcher::getInstance();
         $_tax = JSFactory::getTable('tax', 'jshop');
         $rows = JSFactory::getAllTaxesOriginal();
         if ($jshopConfig->use_extend_tax_rule) {
             $country_id = 0;
             $adv_user = JSFactory::getUserShop();
             $country_id = $adv_user->country;
             if ($jshopConfig->tax_on_delivery_address && $adv_user->delivery_adress && $adv_user->d_country) {
                 $country_id = $adv_user->d_country;
             }
             $client_type = $adv_user->client_type;
             $enter_tax_id = $adv_user->tax_number != "";
             if (!$country_id) {
                 $adv_user = JSFactory::getUserShopGuest();
                 $country_id = $adv_user->country;
                 if ($jshopConfig->tax_on_delivery_address && $adv_user->delivery_adress && $adv_user->d_country) {
                     $country_id = $adv_user->d_country;
                 }
                 $client_type = $adv_user->client_type;
                 $enter_tax_id = $adv_user->tax_number != "";
             }
             if ($country_id) {
                 $_rowsext = $_tax->getExtTaxes();
                 $dispatcher->trigger('beforeGetAllTaxesRowsext', array(&$_rowsext, &$country_id, &$adv_user, &$rows));
                 foreach ($_rowsext as $v) {
                     if (in_array($country_id, $v->countries)) {
                         if ($jshopConfig->ext_tax_rule_for == 1) {
                             if ($enter_tax_id) {
                                 $rows[$v->tax_id] = $v->firma_tax;
                             } else {
                                 $rows[$v->tax_id] = $v->tax;
                             }
                         } else {
                             if ($client_type == 2) {
                                 $rows[$v->tax_id] = $v->firma_tax;
                             } else {
                                 $rows[$v->tax_id] = $v->tax;
                             }
                         }
                     }
                 }
                 $dispatcher->trigger('afterGetAllTaxesRowsext', array(&$_rowsext, &$country_id, &$adv_user, &$rows));
                 unset($_rowsext);
             }
         }
         $dispatcher->trigger('afterGetAllTaxes', array(&$rows));
     }
     return $rows;
 }
开发者ID:olegverstka,项目名称:monax.dev,代码行数:54,代码来源:factory.php

示例2: getFixBrutopriceToTax

function getFixBrutopriceToTax($price, $tax_id)
{
    $jshopConfig = JSFactory::getConfig();
    if ($jshopConfig->no_fix_brutoprice_to_tax == 1) {
        return $price;
    }
    $taxoriginal = JSFactory::getAllTaxesOriginal();
    $taxes = JSFactory::getAllTaxes();
    $tax = $taxes[$tax_id];
    $tax2 = $taxoriginal[$tax_id];
    if ($tax != $tax2) {
        $price = $price / (1 + $tax2 / 100);
        $price = $price * (1 + $tax / 100);
    }
    return $price;
}
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:16,代码来源:functions.php

示例3: getFixBrutopriceToTax

function getFixBrutopriceToTax($price, $tax_id)
{
    $taxoriginal = JSFactory::getAllTaxesOriginal();
    $taxes = JSFactory::getAllTaxes();
    $tax = $taxes[$tax_id];
    $tax2 = $taxoriginal[$tax_id];
    if ($tax != $tax2) {
        $price = $price / (1 + $tax2 / 100);
        $price = $price * (1 + $tax / 100);
    }
    return $price;
}
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:12,代码来源:functions.php


注:本文中的JSFactory::getAllTaxesOriginal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。