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


PHP company::getUst_id方法代码示例

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


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

示例1: SecondTable

 function SecondTable($order)
 {
     $company = new company($order->getId_company());
     $this->SetFillColor(82, 189, 236);
     $this->SetTextColor(255);
     $this->SetDrawColor(183, 183, 183);
     $this->SetLineWidth(0.3);
     $this->SetFont('Arial', '', 10);
     ////////////////////////////////////////////////////////
     //Header
     $this->Cell(10, 6, 'Pos', 1, 0, 'L', true);
     $this->Cell(20, 6, 'Quantity', 1, 0, 'L', true);
     $this->Cell(12, 6, 'Unity', 1, 0, 'L', true);
     $this->Cell(107, 6, 'Product', 1, 0, 'L', true);
     $this->Cell(18, 6, 'Price/u', 1, 0, 'R', true);
     $this->Cell(18, 6, 'Price', 1, 0, 'R', true);
     $this->Ln();
     ////////////////////////////////////////////////////////
     //Ligne en plus
     $this->SetFillColor(224, 235, 255);
     $this->SetTextColor(0);
     $fill = false;
     $this->SetFont('Arial', '', 9);
     $count = 1;
     if ($order->getCustomer_order_id() != NULL && $order->getCustomer_order_id() != "") {
         $this->Cell(185, 6, '>>> ' . utf8_decode($order->getCustomer_order_id()), 1, 0, 'C');
         $this->Ln();
     }
     ////////////////////////////////////////////////////////
     //Détails de la commande produit par produit
     foreach ($order->getLine_product() as $lp) {
         $xline = $this->getX();
         $yline = $this->getY();
         $marge = 42;
         $this->setX($xline + $marge);
         $chaineproduct = $lp->getProduct()->getNameDes();
         if ($lp->getId_parameter() != "") {
             $parameter = $lp->getParameter();
             $chaineproduct = $chaineproduct . " " . $parameter->getName();
         }
         if ($lp->getRef_batch() != "") {
             $chaineproduct = $chaineproduct . ' || ' . $lp->getRef_batch();
         }
         $this->MultiCell(107, 6, utf8_decode($chaineproduct), 1, 'L', $fill);
         $newy = $this->getY() - $yline;
         $this->setX($xline);
         $this->setY($yline);
         $this->Cell(10, $newy, $count, 1, 0, 'L', $fill);
         $this->Cell(20, $newy, $lp->getAmount(), 1, 0, 'L', $fill);
         $this->Cell(12, $newy, utf8_decode($lp->getProduct()->getUnit()), 1, 0, 'L', $fill);
         $this->setX($this->getX() + 107);
         $this->Cell(18, $newy, number_format($lp->getPrice_bis(), 2, ',', ' '), 1, 0, 'R', $fill);
         $this->Cell(18, $newy, number_format($lp->getPrice_bis() * $lp->getAmount(), 2, ',', ' '), 1, 0, 'R', $fill);
         $fill = !$fill;
         $count++;
         $this->Ln();
     }
     ////////////////////////////////////////////////////////////
     //Somme des produits
     $this->SetFont('Arial', 'B', 10);
     $this->Cell(167, 6, 'Sum in euro', 1, 0, 'R');
     $this->Cell(18, 6, number_format($order->getPrice(), 2, ',', ' '), 1, 0, 'R');
     $this->Ln();
     ////////////////////////////////////////////////////////
     //TVA
     $this->SetFont('Arial', 'I', 8);
     $this->Cell(167, 6, 'TVA 19%', 1, 0, 'R');
     /* Calcul de la tva */
     $tva = 0;
     if ($order->getForce_tva() == "yes") {
         $tva = round(19 * $order->getPrice() / 100, 2);
     }
     if (!($company->getUst_id() != "" && $company->getNationality() != "GER")) {
         $tva = round(19 * $order->getPrice() / 100, 2);
     }
     $this->Cell(18, 6, $tva, 1, 0, 'R');
     $this->Ln();
     //Display
     $this->SetFillColor(82, 189, 236);
     $this->SetTextColor(255);
     $this->SetFont('Arial', 'B', 10);
     $this->Cell(167, 6, 'Total in euro', 1, 0, 'R', true);
     $this->Cell(18, 6, number_format($order->getPrice() + $tva, 2, ',', ' '), 1, 0, 'R', true);
     $this->Ln();
 }
开发者ID:JulienRst,项目名称:Biothys-Manager,代码行数:85,代码来源:PDFOrderConfirmation.php

示例2: SecondTable

 function SecondTable($order)
 {
     $company = new company($order->getId_company());
     $this->SetFillColor(82, 189, 236);
     $this->SetTextColor(255);
     $this->SetDrawColor(183, 183, 183);
     $this->SetLineWidth(0.3);
     $this->SetFont('Arial', '', 10);
     //Header
     $this->Cell(10, 6, 'Pos', 1, 0, 'L', true);
     $this->Cell(20, 6, 'Quantity', 1, 0, 'L', true);
     $this->Cell(12, 6, 'Unity', 1, 0, 'L', true);
     $this->Cell(107, 6, 'Product', 1, 0, 'L', true);
     $this->Cell(18, 6, 'Price/u', 1, 0, 'R', true);
     $this->Cell(18, 6, 'Price', 1, 0, 'R', true);
     $this->Ln();
     //Body
     $this->SetFillColor(224, 235, 255);
     $this->SetTextColor(0);
     $fill = false;
     $this->SetFont('Arial', '', 9);
     $count = 1;
     if ($order->getCustomer_order_id() != NULL && $order->getCustomer_order_id() != "") {
         $this->Cell(185, 6, '>>> ' . $order->getCustomer_order_id(), 1, 0, 'C');
         $this->Ln();
     }
     foreach ($order->getLine_product() as $lp) {
         $xline = $this->getX();
         $yline = $this->getY();
         $marge = 42;
         $this->setX($xline + $marge);
         $this->MultiCell(107, 6, $lp->getProduct()->getNameDes() . ' | batch number : ' . $lp->getRef_batch(), 1, 'L', $fill);
         $newy = $this->getY() - $yline;
         $this->setX($xline);
         $this->setY($yline);
         $this->Cell(10, $newy, $count, 1, 0, 'L', $fill);
         $this->Cell(20, $newy, $lp->getAmount(), 1, 0, 'L', $fill);
         $this->Cell(12, $newy, $lp->getProduct()->getUnit(), 1, 0, 'L', $fill);
         $this->setX($this->getX() + 107);
         $this->Cell(18, $newy, $lp->getPrice_bis(), 1, 0, 'R', $fill);
         $this->Cell(18, $newy, $lp->getPrice_bis() * $lp->getAmount(), 1, 0, 'R', $fill);
         $fill = !$fill;
         $count++;
         $this->Ln();
     }
     $this->SetFont('Arial', 'B', 10);
     $this->Cell(167, 6, 'Sum in euro', 1, 0, 'R');
     $this->Cell(18, 6, $order->getPrice(), 1, 0, 'R');
     $this->Ln();
     //TVA
     $this->SetFont('Arial', 'I', 8);
     $this->Cell(167, 6, 'TVA 19%', 1, 0, 'R');
     //Ajouter condition sur la tva !
     $tva = 0;
     if ($company->getUst_id() != "" && $company->getNationality() != "GER") {
         $this->Cell(18, 6, $tva, 1, 0, 'R');
     } else {
         $tva = round(19 * $order->getPrice() / 100, 2);
         $this->Cell(18, 6, $tva, 1, 0, 'R');
     }
     $this->Ln();
     //Ajouter la condition ici aussi
     $this->SetFillColor(82, 189, 236);
     $this->SetTextColor(255);
     $this->SetFont('Arial', 'B', 10);
     $this->Cell(167, 6, 'Total in euro', 1, 0, 'R', true);
     $this->Cell(18, 6, $order->getPrice() + $tva, 1, 0, 'R', true);
     $this->Ln();
 }
开发者ID:JulienRst,项目名称:Biothys-Manager,代码行数:69,代码来源:PDFSamplesInvoice.php


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