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


PHP Tax::get方法代码示例

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


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

示例1: getPriceTax

 function getPriceTax($priceset_id, $product_id, $netto, $tax_id = -1)
 {
     $query = "SELECT * FROM " . $this->db->price_table . " WHERE priceset_id='" . $priceset_id . "' AND product_id='" . $product_id . "'";
     $tmp = $this->db->fetchRows($this->db->query($query));
     $price = $tmp[0][3];
     if ($tax_id == -1) {
         $product = new Product();
         $tmp_product = $product->get($product_id);
         if (count($tmp_product) > 0) {
             $tax_id = $tmp_product[0][4];
         } else {
             return 0;
         }
     }
     if ($netto) {
         $tax = new Tax();
         $tmp_tax = $tax->get($tax_id);
         if (count($tmp_tax) <= 0) {
             return 0;
         }
         $price = $price * (1 + $tmp_tax[0][2]);
     }
     return $price;
 }
开发者ID:nebulade,项目名称:faursprung_website,代码行数:24,代码来源:Price.php

示例2: fix

 function fix($bill_id)
 {
     $products = $this->getByBillId($bill_id);
     $product = new Product();
     $price = new Price();
     $tax = new Tax();
     $bill = new Bill();
     $tmp = $bill->get($bill_id);
     $bill_data = $tmp[0];
     $customer = new Customer();
     $tmp = $customer->get($bill_data[1]);
     $customer_data = $tmp[0];
     for ($i = 0; $i < count($products); $i++) {
         $tmp = $this->getByBillIdAndProductId($bill_id, $products[$i][2]);
         $bill_product_data = $tmp[0];
         $tmp = $product->get($products[$i][2]);
         $product_data = $tmp[0];
         $tmp = $price->getPrice($customer_data[11], $product_data[0]);
         $price_data = $tmp[0];
         $tmp = $tax->get($product_data[4]);
         $tax_data = $tmp[0];
         $this->update($bill_product_data[0], array($bill_product_data[1], $bill_product_data[2], $bill_product_data[3], $bill_product_data[4], $bill_product_data[5], $price_data[3], $tax_data[2]));
     }
 }
开发者ID:nebulade,项目名称:faursprung_application,代码行数:24,代码来源:Kopie+von+Bill_Product.php

示例3: Tax

<?php

require_once "util.php";
$tax = new Tax();
if ($action == "new") {
    $tax->create(var_post("tax_id", ""), array(var_post("tax_name", ""), var_post("tax_rate", "")));
} elseif ($action == "edit") {
    $tax->update(var_post("tax_id", ""), array(var_post("tax_name", ""), var_post("tax_rate", "")));
} elseif ($action == "delete") {
    $tax->delete(var_get("tax_id", ""));
}
$tax_box = new NTKVBox("tax_box", 0, 0, False);
$label = new NTKLabel("tax_label", "<h3>Steuers&auml;tze</h3>");
$tax_box->add($label);
$taxlist = $tax->get('');
for ($i = 0; $i < count($taxlist); $i++) {
    $tax_box->add(new NTKETax($taxlist[$i][0], $taxlist[$i][1], $taxlist[$i][2]));
}
$label = new NTKLabel("tax_label", "<h4>neuer Steuersatz</h4>");
$tax_box->add($label);
$tax_box->add(new NTKETax("", "", "", True), -1);
$main_box->add($tax_box, -1, -1, "background-color: #dfe7f3; vertical-align: top;");
开发者ID:nebulade,项目名称:faursprung_application,代码行数:22,代码来源:tax.php

示例4: array

    case "delete":
        $bill->delete(var_get("bill_id", ""));
        if ($fp_tour_id != "") {
            $onload .= "location.href = 'tour.php?action=list_tour&tour_id=" . $fp_tour_id . "&date=" . $fp_date . "';";
        }
        break;
    case "position_add":
        $bill_data = $bill->get(var_post("bill_id", ""));
        /* autoset anmerkung vom produkt, wenn nichts als anmerkung gegeben */
        $details = var_post("details", "");
        if ($details == "") {
            $product_data = $product->get(var_post("product_id", ""));
            $details = $product_data[0][8];
        }
        if ($bill_data[0][5] == -1) {
            $bill_product->create(array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), $details, var_post("rabatt", ""), 0, 0));
        } else {
            $customer_data = $customer->get($bill_data[0][1]);
            $price_data = $price->getPrice($customer_data[0][11], var_post("product_id", ""));
            $product_data = $product->get(var_post("product_id", ""));
            $tax_data = $tax->get($product_data[0][4]);
            $bill_product->create(array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), $details, var_post("rabatt", ""), $price_data[0][3], $tax_data[0][2]));
        }
        break;
    case "position_delete":
        $bill_product->delete(var_get("bill_product_id", ""));
        break;
    case "position_edit":
        $bill_product->update(var_post("bill_product_id", ""), array(var_post("bill_id", ""), var_post("product_id", ""), var_post("amount", ""), var_post("details", ""), var_post("rabatt", ""), var_post("price", ""), var_post("tax", "")));
        break;
}
开发者ID:nebulade,项目名称:faursprung_application,代码行数:31,代码来源:db_action.php


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