當前位置: 首頁>>代碼示例>>PHP>>正文


PHP company::getNationality方法代碼示例

本文整理匯總了PHP中company::getNationality方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::getNationality方法的具體用法?PHP company::getNationality怎麽用?PHP company::getNationality使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在company的用法示例。


在下文中一共展示了company::getNationality方法的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::getNationality方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。