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


PHP formattax函数代码示例

本文整理汇总了PHP中formattax函数的典型用法代码示例。如果您正苦于以下问题:PHP formattax函数的具体用法?PHP formattax怎么用?PHP formattax使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: foreach

 }
 ?>
     <?php 
 if (!$this->config->hide_tax) {
     ?>
         <?php 
     foreach ($this->tax_list as $percent => $value) {
         ?>
             <tr class="tax">
                 <td class = "name">
                     <?php 
         print displayTotalCartTaxName();
         ?>
                     <?php 
         if ($this->show_percent_tax) {
             print formattax($percent) . "%";
         }
         ?>
                 </td>
                 <td class = "value">
                     <?php 
         print formatprice($value);
         print $this->_tmp_ext_tax[$percent];
         ?>
                 </td>
             </tr>
         <?php 
     }
     ?>
     <?php 
 }
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:31,代码来源:cart.php

示例2: productTaxInfo

function productTaxInfo($tax, $display_price = null)
{
    if (!isset($display_price)) {
        $jshopConfig = JSFactory::getConfig();
        $display_price = $jshopConfig->display_price_front_current;
    }
    if ($display_price == 0) {
        return sprintf(_JSHOP_INC_PERCENT_TAX, formattax($tax));
    } else {
        return sprintf(_JSHOP_PLUS_PERCENT_TAX, formattax($tax));
    }
}
开发者ID:JexyRu,项目名称:jshop-updates,代码行数:12,代码来源:functions.php

示例3: generatePDF


//.........这里部分代码省略.........
        if ($order->order_package > 0 || $jshopConfig->display_null_package_price) {
            $y = $y + 5;
            $pdf->SetXY(20, $y + 5);
            $pdf->Rect(20, $y + 5, 170, 5, 'F');
            $pdf->MultiCell(130, 5, _JSHOP_PACKAGE_PRICE, '1', 'R');
            $pdf->SetXY(150, $y + 5);
            $pdf->MultiCell(40, 5, formatprice($order->order_package, $order->currency_code) . $order->_pdf_ext_shipping_package, '1', 'R');
        }
    } else {
        $y = $y - 5;
    }
    if ($order->order_payment != 0) {
        $y = $y + 5;
        $pdf->SetXY(20, $y + 5);
        $pdf->Rect(20, $y + 5, 170, 5, 'F');
        $pdf->MultiCell(130, 5, $order->payment_name, '1', 'R');
        $pdf->SetXY(150, $y + 5);
        $pdf->MultiCell(40, 5, formatprice($order->order_payment, $order->currency_code) . $order->_pdf_ext_payment, '1', 'R');
    }
    $show_percent_tax = 0;
    if (count($order->order_tax_list) > 1 || $jshopConfig->show_tax_in_product) {
        $show_percent_tax = 1;
    }
    if ($jshopConfig->hide_tax) {
        $show_percent_tax = 0;
    }
    $dispatcher->trigger('onBeforeCreatePdfOrderBeforeEndTotal', array(&$order, &$pdf, &$y));
    if (!$jshopConfig->hide_tax) {
        foreach ($order->order_tax_list as $percent => $value) {
            $pdf->SetXY(20, $y + 10);
            $pdf->Rect(20, $y + 10, 170, 5, 'F');
            $text = displayTotalCartTaxName($order->display_price);
            if ($show_percent_tax) {
                $text = $text . " " . formattax($percent) . "%";
            }
            $pdf->MultiCell(130, 5, $text, '1', 'R');
            $pdf->SetXY(150, $y + 10);
            $pdf->MultiCell(40, 5, formatprice($value, $order->currency_code) . $order->_pdf_ext_tax[$percent], '1', 'R');
            $y = $y + 5;
        }
    }
    $text_total = _JSHOP_ENDTOTAL;
    if (($jshopConfig->show_tax_in_product || $jshopConfig->show_tax_product_in_cart) && count($order->order_tax_list) > 0) {
        $text_total = _JSHOP_ENDTOTAL_INKL_TAX;
    }
    $pdf->SetFont('freesansb', '', 10);
    $pdf->SetXY(20, $y + 10);
    $pdf->Rect(20, $y + 10, 170, 5.1, 'F');
    $pdf->MultiCell(130, 5, $text_total, '1', 'R');
    $pdf->SetXY(150, $y + 10);
    $pdf->MultiCell(40, 5, formatprice($order->order_total, $order->currency_code) . $order->_pdf_ext_total, '1', 'R');
    if ($jshopConfig->display_tax_id_in_pdf && $order->tax_number) {
        $y = $y + 5.2;
        $pdf->SetFont('freesans', '', 7);
        $pdf->SetXY(20, $y + 10);
        $pdf->MultiCell(170, 4, _JSHOP_TAX_NUMBER . ": " . $order->tax_number, '1', 'L');
    }
    $dispatcher->trigger('onBeforeCreatePdfOrderAfterEndTotal', array(&$order, &$pdf, &$y));
    $y = $y + 10;
    if ($jshopConfig->show_delivery_time_checkout && ($order->delivery_times_id || $order->delivery_time)) {
        if ($y > 250) {
            $pdf->addNewPage();
            $y = 60;
        }
        $deliverytimes = JSFactory::getAllDeliveryTime();
        $delivery = $deliverytimes[$order->delivery_times_id];
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:67,代码来源:generete_pdf_order.php

示例4: foreach

         </tr>
         <?php 
    }
    ?>
         <?php 
    if (!$this->config->hide_tax) {
        ?>
                           
         <?php 
        foreach ($this->order->order_tax_list as $percent => $value) {
            ?>
         <tr>
           <td colspan="4" align="right" style="padding-right:15px;"><?php 
            print displayTotalCartTaxName($order->display_price);
            if ($this->show_percent_tax) {
                print " " . formattax($percent) . "%";
            }
            ?>
:</td>
             <td class="price"><?php 
            print formatprice($value, $order->currency_code);
            print $this->_tmp_ext_tax[$percent];
            ?>
</td>
         </tr>
         <?php 
        }
        ?>
         <?php 
    }
    ?>
开发者ID:olegverstka,项目名称:monax.dev,代码行数:31,代码来源:orderemail.php

示例5: onBeforeCreatePdfOrderEnd


//.........这里部分代码省略.........
     if (($jshopConfig->hide_tax || count($order->order_tax_list) == 0) && $order->order_discount == 0 && $order->order_payment == 0 && $jshopConfig->without_shipping) {
         $hide_subtotal = 1;
     } else {
         $hide_subtotal = 0;
     }
     if (!$hide_subtotal) {
         $pdf->Rect(165, $y, 30, 5);
         $pdf->SetXY(20, $y);
         $pdf->MultiCell(143, 5, _JSHOP_SUBTOTAL, '0', 'R');
         $pdf->SetXY(165, $y);
         $pdf->MultiCell(28, 5, $this->formatprice($order->order_subtotal) . $order->_pdf_ext_subtotal, '0', 'R');
     } else {
         $y = $y - 5;
     }
     if ($order->order_discount > 0) {
         $y = $y + 5;
         $pdf->Rect(165, $y, 30, 5);
         $pdf->SetXY(20, $y);
         $pdf->MultiCell(143, 5, _JSHOP_RABATT_VALUE, '0', 'R');
         $pdf->SetXY(165, $y);
         $pdf->MultiCell(28, 5, "-" . $this->formatprice($order->order_discount) . $order->_pdf_ext_discount, '0', 'R');
     }
     if (!$jshopConfig->without_shipping) {
         $pdf->Rect(165, $y + 5, 30, 5);
         $pdf->SetXY(20, $y + 5);
         $pdf->MultiCell(143, 5, _JSHOP_SHIPPING_PRICE, '0', 'R');
         $pdf->SetXY(165, $y + 5);
         //$pdf->MultiCell(28,5,formatprice($order->order_shipping, $order->currency_code).$order->_pdf_ext_shipping,'0','R');
         $pdf->MultiCell(28, 5, $this->formatprice($order->order_shipping) . $order->_pdf_ext_shipping, '0', 'R');
         if ($order->order_package > 0 || $jshopConfig->display_null_package_price) {
             $y = $y + 5;
             $pdf->SetXY(20, $y + 5);
             $pdf->Rect(165, $y + 5, 30, 5);
             $pdf->MultiCell(143, 5, _JSHOP_PACKAGE_PRICE, '0', 'R');
             $pdf->SetXY(165, $y + 5);
             //$pdf->MultiCell(28,5,formatprice($order->order_package, $order->currency_code).$order->_pdf_ext_shipping_package,'0','R');
             $pdf->MultiCell(28, 5, $this->formatprice($order->order_package) . $order->_pdf_ext_shipping_package, '0', 'R');
         }
     } else {
         $y = $y - 5;
     }
     if ($order->order_payment != 0) {
         $y = $y + 5;
         $pdf->SetXY(20, $y + 5);
         $pdf->Rect(165, $y + 5, 30, 5);
         $pdf->MultiCell(143, 5, $order->payment_name, '0', 'R');
         $pdf->SetXY(165, $y + 5);
         //$pdf->MultiCell(40,5, formatprice($order->order_payment, $order->currency_code).$order->_pdf_ext_payment, '1','R');
         $pdf->MultiCell(28, 5, $this->formatprice($order->order_payment) . $order->_pdf_ext_payment, '0', 'R');
     }
     $show_percent_tax = 1;
     if ($jshopConfig->hide_tax) {
         $show_percent_tax = 0;
     }
     if (!$jshopConfig->hide_tax) {
         foreach ($order->order_tax_list as $percent => $value) {
             $pdf->SetXY(20, $y + 10);
             $pdf->Rect(165, $y + 10, 30, 5);
             $text = displayTotalCartTaxName($order->display_price);
             if ($show_percent_tax) {
                 $text = $text . " " . formattax($percent) . "%";
             }
             $pdf->MultiCell(143, 5, $text, '0', 'R');
             $pdf->SetXY(165, $y + 10);
             //$pdf->MultiCell(40,5,formatprice($value, $order->currency_code).$order->_pdf_ext_tax[$percent],'1','R');
             $pdf->MultiCell(28, 5, $this->formatprice($value) . $order->_pdf_ext_tax[$percent], '0', 'R');
             $y = $y + 5;
         }
     }
     $text_total = _JSHOP_ENDTOTAL;
     if (($jshopConfig->show_tax_in_product || $jshopConfig->show_tax_product_in_cart) && count($order->order_tax_list) > 0) {
         $text_total = _JSHOP_ENDTOTAL_INKL_TAX;
     }
     $pdf->SetFont('freesansb', '', 8);
     $pdf->SetXY(20, $y + 10);
     $pdf->Rect(165, $y + 10, 30, 5.1);
     $pdf->MultiCell(143, 5, $text_total, '0', 'R');
     $pdf->SetXY(165, $y + 10);
     //$pdf->MultiCell(40,5,formatprice($order->order_total, $order->currency_code).$order->_pdf_ext_total,'1','R');
     $pdf->MultiCell(28, 5, $this->formatprice($order->order_total, $order->currency_code) . $order->_pdf_ext_total, '0', 'R');
     if ($jshopConfig->display_tax_id_in_pdf && $order->tax_number) {
         $y = $y + 5.2;
         $pdf->SetFont('freesans', '', 7);
         $pdf->SetXY(20, $y + 10);
         $pdf->MultiCell(143, 4, _JSHOP_TAX_NUMBER . ": " . $order->tax_number, '0', 'L');
     }
     $y = $pdf->getY() + 15;
     //сумма всего текстом
     $pdf->SetFont('freesans', '', 8);
     $pdf->SetXY(13, $y);
     $pdf->MultiCell(180, 1, _JSHOP_ADDON_RUS_INVOICES_PAYMENT_TOTAL_ITEMS . $num . ", " . _JSHOP_ADDON_RUS_INVOICES_PAYMENT_THE_AMOUNT . $this->formatprice($order->order_total) . " руб.", '0', 'L');
     $pdf->SetFont('freesansb', '', 8);
     $pdf->SetXY(13, $y + 5);
     $pdf->MultiCell(180, 1, $this->mb_ucfirst($this->SumProp($this->formatprice($order->order_total))) . " руб.", '0', 'L');
     $y = $y + 20;
     //мой текст
     //		$pdf->SetFont('freesans','',8);
     //		$text = "Мой супер магазин";
     //		$pdf->text(14,$y,$text);
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:101,代码来源:addon_rus_invoices_for_payment.php

示例6: foreach

  
	
  	<?php 
if (!$this->config->hide_tax) {
    ?>
  	<?php 
    foreach ($order->order_tax_list as $percent => $value) {
        ?>
  	<tr>
    	<td class="name">
      		<?php 
        echo displayTotalCartTaxName($order->display_price);
        ?>
      		<?php 
        if ($this->show_percent_tax) {
            echo formattax($percent) . "%";
        }
        ?>
    	</td>
    	<td class="value">
      		<?php 
        echo formatprice($value, $order->currency_code);
        echo $this->_tmp_ext_tax[$percent];
        ?>
    	</td>
  	</tr>
  	<?php 
    }
    ?>
	<?php 
}
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:29,代码来源:order.php

示例7: generatePDF


//.........这里部分代码省略.........
        $pdf->SetXY(150, $y);
        $pdf->MultiCell(40, 5, "-" . formatprice($order->order_discount, $order->currency_code), '1', 'R');
    }
    if (!$jshopConfig->without_shipping) {
        $pdf->SetXY(20, $y + 5);
        $pdf->Rect(20, $y + 5, 170, 5, 'F');
        $pdf->MultiCell(130, 5, _JSHOP_SHIPPING_PRICE, '1', 'R');
        $pdf->SetXY(150, $y + 5);
        $pdf->MultiCell(40, 5, formatprice($order->order_shipping, $order->currency_code), '1', 'R');
    } else {
        $y = $y - 5;
    }
    if ($order->order_payment != 0) {
        $y = $y + 5;
        $pdf->SetXY(20, $y + 5);
        $pdf->Rect(20, $y + 5, 170, 5, 'F');
        $pdf->MultiCell(130, 5, $order->payment_name, '1', 'R');
        $pdf->SetXY(150, $y + 5);
        $pdf->MultiCell(40, 5, formatprice($order->order_payment, $order->currency_code), '1', 'R');
    }
    $show_percent_tax = 0;
    if (count($order->order_tax_list) > 1 || $jshopConfig->show_tax_in_product) {
        $show_percent_tax = 1;
    }
    if ($jshopConfig->hide_tax) {
        $show_percent_tax = 0;
    }
    if (!$jshopConfig->hide_tax) {
        foreach ($order->order_tax_list as $percent => $value) {
            $pdf->SetXY(20, $y + 10);
            $pdf->Rect(20, $y + 10, 170, 5, 'F');
            $text = displayTotalCartTaxName($order->display_price);
            if ($show_percent_tax) {
                $text = $text . " " . formattax($percent) . "%";
            }
            $pdf->MultiCell(130, 5, $text, '1', 'R');
            $pdf->SetXY(150, $y + 10);
            $pdf->MultiCell(40, 5, formatprice($value, $order->currency_code), '1', 'R');
            $y = $y + 5;
        }
    }
    $pdf->SetXY(20, $y + 20);
    $pdf->Cell(50, 5, 'Всего наименований ' . $prodtot . ' на сумму: ' . formatprice($order->order_total, $order->currency_code), '0', 'L');
    $m = new money2str();
    $m = $m->work($order->order_total, true);
    $afm = mb_substr(trim($m), 0, 1, 'UTF-8');
    switch ($afm) {
        case 'о':
            $afm = 'О';
            break;
        case 'д':
            $afm = 'Д';
            break;
        case 'т':
            $afm = 'Т';
            break;
        case 'ч':
            $afm = 'Ч';
            break;
        case 'п':
            $afm = 'П';
            break;
        case 'ш':
            $afm = 'Ш';
            break;
        case 'с':
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:67,代码来源:generete_pdf_order.php


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