fikihfirmansyah

Untitled

Oct 17th, 2021
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 18.53 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.   <meta charset="UTF-8">
  6.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.   <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8.   <title>INVOICE</title>
  9.   <style>
  10.     @page {
  11.       margin: 10px 20px 10px 20px !important;
  12.       padding: 10px 20px 10px 20px !important;
  13.     }
  14.  
  15.     .clearfix:after {
  16.       content: "";
  17.       display: table;
  18.       clear: both;
  19.     }
  20.  
  21.     a {
  22.       color: black;
  23.       text-decoration: none;
  24.       font-family: Arial, sans-serif;
  25.  
  26.     }
  27.  
  28.     body {
  29.       position: relative;
  30.       width: 18.9cm;
  31.       /* height: 26.73cm; */
  32.       margin: 0 auto;
  33.       color: #555555;
  34.       background: #FFFFFF;
  35.       font-family: Arial, sans-serif;
  36.       font-size: 11px;
  37.       font-family: Arial, sans-serif;
  38.       text-align: left;
  39.  
  40.     }
  41.  
  42.     header {
  43.       padding: 10px 0;
  44.       margin-bottom: 20px;
  45.       border-bottom: 1px solid #d8d8d8;
  46.       background-color: #BDBDBD;
  47.       font-family: Arial, sans-serif;
  48.  
  49.     }
  50.  
  51.     #logo {
  52.       float: left;
  53.       margin-top: 13px;
  54.       margin-left: 5%;
  55.       margin-bottom: 15px;
  56.     }
  57.  
  58.     #logo img {
  59.       height: 70px;
  60.     }
  61.  
  62.     #company {
  63.       float: right;
  64.       text-align: right;
  65.       width: 50%;
  66.       color: #000;
  67.       margin-right: 5%;
  68.       margin-top: 20px;
  69.       margin-bottom: 15px;
  70.       border-right: 3px solid #000;
  71.       padding-right: 6px;
  72.     }
  73.  
  74.     #quo {
  75.       width: 50%;
  76.       margin-right: 8%;
  77.       color: #000;
  78.       float: right;
  79.       text-align: right;
  80.     }
  81.  
  82.     #details {
  83.       margin-bottom: 5px;
  84.       /* width: 100%; */
  85.     }
  86.  
  87.     #detail-info {
  88.       margin-bottom: 15px;
  89.       width: 100%;
  90.       margin-left: 5%;
  91.       font-family: sans-serif;
  92.  
  93.     }
  94.  
  95.     .detail {
  96.       color: #46464c;
  97.       font-size: 1.1em;
  98.       font-weight: normal;
  99.     }
  100.  
  101.     #client {
  102.       float: left;
  103.       text-align: left;
  104.       margin-left: 5%;
  105.       margin-top: 5px;
  106.       font-family: sans-serif;
  107.  
  108.     }
  109.  
  110.     #closing {
  111.       float: left;
  112.       text-align: left;
  113.       margin-top: 26px;
  114.     }
  115.  
  116.     #signature {
  117.       float: right;
  118.       text-align: right;
  119.       margin-top: 26px;
  120.     }
  121.  
  122.     #client .to {
  123.       color: #000;
  124.       font-size: 1.1em;
  125.       line-height: 1.1em;
  126.       font-weight: normal;
  127.     }
  128.  
  129.     h2.name {
  130.       font-size: 1.4em;
  131.       font-weight: normal;
  132.       margin: 0;
  133.       color: #000;
  134.     }
  135.  
  136.     h2.name-header {
  137.       font-size: 1.4em;
  138.       font-weight: normal;
  139.       margin: 0;
  140.       color: #000;
  141.     }
  142.  
  143.     h2.name-customer {
  144.       font-size: 1.4em;
  145.       font-weight: normal;
  146.       margin: 0;
  147.       color: #222222;
  148.     }
  149.  
  150.     h3.gender {
  151.       font-size: 1.3em;
  152.       font-weight: normal;
  153.       margin: 0;
  154.       color: #222222;
  155.     }
  156.  
  157.     #invoice {
  158.       /* float: left; */
  159.       text-align: right;
  160.       margin-right: 5%;
  161.       font-family: sans-serif;
  162.  
  163.     }
  164.  
  165.     #invoice h1 {
  166.       color: #000;
  167.       font-size: 2.2em;
  168.       line-height: 1em;
  169.       font-weight: normal;
  170.     }
  171.  
  172.     .thanks {
  173.       font-size: 1.1em;
  174.       color: #59afce;
  175.     }
  176.  
  177.     #notices {
  178.       padding-left: 6px;
  179.       border-left: 6px solid #0087C3;
  180.     }
  181.  
  182.     #notices .notice {
  183.       font-size: 1.2em;
  184.     }
  185.  
  186.     footer {
  187.       color: #777777;
  188.       width: 100%;
  189.       height: 30px;
  190.       position: absolute;
  191.       bottom: 0;
  192.       border-top: 1px solid #d8d8d8;
  193.       padding: 8px 0;
  194.       text-align: center;
  195.     }
  196.  
  197.     .table1 {
  198.       font-family: sans-serif;
  199.       color: #444;
  200.       border-collapse: collapse;
  201.       border: 1px solid #f2f5f7;
  202.     }
  203.  
  204.     .table1 tr th {
  205.       background: #000;
  206.       color: #fff;
  207.       font-weight: normal;
  208.     }
  209.  
  210.     .table1,
  211.     th,
  212.     td {
  213.       padding: 8px 10px;
  214.       text-align: center;
  215.     }
  216.  
  217.     .customer {
  218.       padding: 5px 5px;
  219.       text-align: center;
  220.     }
  221.  
  222.     .table1 tbody tr:hover {
  223.       background-color: #f5f5f5;
  224.     }
  225.  
  226.     .table1 tbody tr:nth-child(even) {
  227.       background-color: #f2f2f2;
  228.     }
  229.  
  230.     .table1 td.desc {
  231.       text-align: left;
  232.     }
  233.  
  234.     .table1 tr.counter {
  235.       padding-top: 10px;
  236.       padding-left: 15px;
  237.       text-align: left;
  238.  
  239.     }
  240.  
  241.     .table1 td.term-condition {
  242.       text-align: left;
  243.       padding-top: 10px;
  244.       padding-left: 15px;
  245.     }
  246.  
  247.     .table1 tr.total {
  248.       text-align: right;
  249.  
  250.       background-image: linear-gradient(to right, #d3d3d3, #BDBDBD);
  251.     }
  252.   </style>
  253. </head>
  254.  
  255. <body>
  256.   <?php
  257.  // Read image path, convert to base64 encoding
  258.  
  259.  $imageData = base64_encode(file_get_contents($imgHeader));
  260.  $imageHeaderData = base64_encode(file_get_contents($headerImage));
  261.  // Format the image SRC:  data:{mime};base64,{data};
  262.  $src = 'data:' . mime_content_type($imgHeader) . ';base64,' . $imageData;
  263.  $headerImageSrc = 'data:' . mime_content_type($headerImage) . ';base64,' . $imageHeaderData;
  264.  
  265.  if (!is_null($receipt->getCreatedBy()->getCompany())) {
  266.     $companySalesPerson = $receipt->getCreatedBy()->getCompany()->getName();
  267.     $companyAddressSalesPerson = $receipt->getCreatedBy()->getCompany()->getAddress();
  268.     $companyPhoneSalesPerson = $receipt->getCreatedBy()->getCompany()->getPhone();
  269.     $companyMailSalesPerson = $receipt->getCreatedBy()->getCompany()->getEmail();
  270.   } else {
  271.     $companySalesPerson = '';
  272.     $companyAddressSalesPerson = '';
  273.     $companyPhoneSalesPerson = '';
  274.     $companyMailSalesPerson = '';
  275.   }
  276.  
  277.   // if (!is_null($receipt->getDueDate()) && $receipt->getDueDate() != '') {
  278.  //   $validTill = $receipt->getDueDate()->format('d F Y');
  279.   // } else {
  280.   //   $validTill = '-';
  281.   // }
  282.  
  283.   if (!is_null($receipt->getCustomer()->getName()) && $receipt->getCustomer()->getName() != '') {
  284.    $customerName = $receipt->getCustomer()->getName();
  285.   } else {
  286.     $customerName = '-';
  287.   }
  288.  
  289.   if (!is_null($receipt->getCustomer()->getAddress()) &&  $receipt->getCustomer()->getAddress() != '') {
  290.    $customerAddress =  $receipt->getCustomer()->getAddress();
  291.   } else {
  292.     $customerAddress = '-';
  293.   }
  294.  
  295.   if (!is_null($receipt->getCustomer()->getCity()) &&  $receipt->getCustomer()->getCity() != '') {
  296.    $customerCity =  $receipt->getCustomer()->getCity();
  297.   } else {
  298.     $customerCity = '-';
  299.   }
  300.  
  301.   if (!is_null($receipt->getCustomer()->getState()) &&  $receipt->getCustomer()->getState() != '') {
  302.    $customerProvince =  $receipt->getCustomer()->getState();
  303.   } else {
  304.     $customerProvince = '-';
  305.   }
  306.  
  307.   if (!is_null($receipt->getCustomer()->getPhone()) &&  $receipt->getCustomer()->getPhone() != '') {
  308.    $customerPhone =  $receipt->getCustomer()->getPhone();
  309.   } else {
  310.     $customerPhone = '-';
  311.   }
  312.  
  313.  
  314.   ?>
  315.   <table cellpadding="0" cellspacing="0" style="width:100%">
  316.     <tbody>
  317.       <tr>
  318.         <td style="width:40%">
  319.           <div style="position: fixed; text-align:left;">
  320.             <img src="<?php echo $headerImageSrc ?> " width="300px" />
  321.           </div>
  322.         </td>
  323.         <td style="width:35%; text-align:right;"><br>
  324.           <b><?= strtoupper($companySalesPerson) ?></b><br />
  325.           <?= ucwords($companyAddressSalesPerson) ?><br>
  326.           TEL : <?= ucwords($companyPhoneSalesPerson) ?><br>
  327.           <a href="mailto:<?= ucwords($companyMailSalesPerson) ?>"></a><?= $companyMailSalesPerson ?><br>
  328.         </td>
  329.         <td style="width:15%"><img alt="" src="<?php echo $src ?>" style="float:left; height:99px; width:100px" /></td>
  330.       </tr>
  331.       <tr>
  332.         <td style="width:40%; text-align:left;font-size:24px; padding:0%; margin:0% "><strong>DELIVERY<br>ORDER</strong></td>
  333.         <td style="width:35%">&nbsp;</td>
  334.         <td style="width:15%">&nbsp;</td>
  335.       <tr>
  336.     </tbody>
  337.   </table>
  338.   <table cellpadding="0" cellspacing="0" style="width:100%">
  339.     <tbody>
  340.       <tr>
  341.         <td style="width:45%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  342.           <table border="0" cellpadding="0" cellspacing="0" style="width:100%">
  343.             <tbody>
  344.               <tr>
  345.                 <td style="width:20%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  346.                   <p>
  347.                     Number<br>
  348.                     Created Date<br>
  349.                     Received Date
  350.                   </p>
  351.                 </td>
  352.                 <td style="width:80%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  353.                   <p>
  354.                     : <?= $receipt->getNumber() ?><br>
  355.                     : <?= $receipt->getCreatedAt()->format("d F Y") ?><br>
  356.                     : <?= $receipt->getReceivedAt()->format("d F Y") ?><br>
  357.                   </p>
  358.                 </td>
  359.               </tr>
  360.             </tbody>
  361.           </table>
  362.         </td>
  363.         <td style="width:50%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  364.           <table border="0" cellpadding="0" cellspacing="0" style="width:100%">
  365.             <tbody>
  366.               <tr>
  367.                 <td style="width:20%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  368.                   <p>
  369.                     Customer<br>
  370.                     Address<br>
  371.                     Phone
  372.                   </p>
  373.                 </td>
  374.                 <td style="width:80%; white-space:nowrap; text-align:left;padding:0%; margin:0%">
  375.                   <p>
  376.                     : <b><?= $customerName ?><br></b>
  377.                     : <?= $customerAddress ?>, <?= $customerCity ?>, <?= $customerProvince ?><br>
  378.                     : <?= $customerPhone ?><br>
  379.                   </p>
  380.                 </td>
  381.               </tr>
  382.             </tbody>
  383.           </table>
  384.         </td>
  385.       </tr>
  386.     </tbody>
  387.   </table>
  388.   <table align="left" border="1" cellpadding="0" cellspacing="0" style="width:100%">
  389.     <thead>
  390.       <tr>
  391.         <th scope="col" style="width: 5%; background-color: #d8d8d8;">NO</th>
  392.         <th scope="col" style="width: 40%; background-color: #d8d8d8;">ITEM</th>
  393.         <th scope="col" style="width: 10%; background-color: #d8d8d8;">QUANTITY</th>
  394.         <th scope="col" style="width: 10%; background-color: #d8d8d8;">UNIT</th>
  395.         <th scope="col" style="width: 35%; background-color: #d8d8d8;">NOTE</th>
  396.       </tr>
  397.     </thead>
  398.     <tbody>
  399.       <?php
  400.      $count = 1;
  401.      $total = 0;
  402.      foreach ($receiptItems as $itemList) {
  403.  
  404.        if (!is_null($itemList->getItemList()) && $itemList->getItemList() != '') {
  405.          $itemName = $itemList->getItemList()->getName();
  406.         } else {
  407.           $itemName = $itemList->getCustomItem();
  408.         }
  409.  
  410.  
  411.         if (!is_null($itemList->getItemList()->getItemUnit()->getName()) &&  $itemList->getItemList()->getItemUnit()->getName() != '') {
  412.          $itemUnit =  $itemList->getItemList()->getItemUnit()->getName();
  413.         } else {
  414.           $itemUnit = '-';
  415.         }
  416.  
  417.  
  418.         $itemNum  = $count;
  419.         $itemQty  = $itemList->getQuantity();
  420.         $count   += 1;
  421.  
  422.       ?>
  423.         <tr>
  424.           <td style="width:5%"><?= $itemNum ?></td>
  425.           <td style="width:40%; text-align: left;"><?= $itemName ?></td>
  426.           <td style="width:10%"><?= $itemQty ?></td>
  427.           <td style="width:10%"><?= $itemUnit ?></td>
  428.           <td style="width:35%"><?= $itemNote ?></td>
  429.         </tr>
  430.       <?php
  431.      }
  432.      ?>
  433.  
  434.     </tbody>
  435.   </table>
  436.   <p>&nbsp;</p>
  437.   <br>
  438.   <table cellpadding="0" cellspacing="0" style="width:100%; height:100px; margin-top:10%; padding:0%; margin:0%">
  439.     <tbody>
  440.       <?php
  441.      // Read image path, convert to base64 encoding
  442.      // if (!is_null($receipt->getCreatedBy()->getSignature()) || !is_null($receipt->getShippedBy()->getSignature()) ||  !is_null($receipt->getReceivedBy()->getSignature())) {
  443.       $signatureCreatedData = base64_encode(file_get_contents($receipt->getCreatedBy()->getSignature()));
  444.       $signatureShippedData = base64_encode(file_get_contents($receipt->getShippedBy()->getSignature()));
  445.       $signatureReceivedData = $receipt->getSignatures();
  446.       $signatureReceivedData = str_replace('["', "", $signatureReceivedData);
  447.       $signatureReceivedData = str_replace('"]', "", $signatureReceivedData);
  448.       $signatureReceivedDataPath = base64_encode(file_get_contents('data/receipt/signatures/' . $signatureReceivedData));
  449.       $stampData = base64_encode(file_get_contents($stamp));
  450.  
  451.       $signatureCreated = 'data:' . mime_content_type($receipt->getCreatedBy()->getSignature()) . ';base64,' . $signatureCreatedData;
  452.       $signatureShipped = 'data:' . mime_content_type($receipt->getShippedBy()->getSignature()) . ';base64,' . $signatureShippedData;
  453.       $signatureReceived = 'data:' . mime_content_type('data/receipt/signatures/' . $signatureReceivedData) . ';base64,' . $signatureReceivedDataPath;
  454.       $stampLogo = 'data:' . mime_content_type($stamp) . ';base64,' . $stampData;
  455.  
  456.       // var_dump($signatureReceived);
  457.       // var_dump($signatureShipped);
  458.       // exit;
  459.       ?>
  460.       <tr>
  461.         <td style="text-align:center; width:33%; padding:0%; margin:0%; text-align:center; ">
  462.           <div style=" position: relative; width: 100px; padding:0%; margin:0%; text-align:center; left:20; height: 100px; display:block; justify-content: center;">
  463.             Dibuat Oleh,
  464.             <img style=" position: absolute; height: 100%; top -50; left:0; text-align:center; padding:0%; margin:0%;  " src="<?php
  465.                                                                                                                              if (is_null($signatureCreated) || $signatureShipped == '') {
  466.                                                                                                                                echo "";
  467.                                                                                                                              } else {
  468.                                                                                                                                echo $signatureShipped;
  469.                                                                                                                              }
  470.                                                                                                                              ?>" />
  471.             <!-- <img style="position: absolute; width: 100%; top: 20; text-align:center; padding:0%; margin:0%; " src="<?php
  472.                                                                                                                        echo $stampLogo
  473.                                                                                                                        ?>" /> -->
  474.             <br>
  475.             <p style=" position: absolute; top: 60; text-align:center; "><?= $receipt->getCreatedBy()->getFirstName() ?> <?= $receipt->getCreatedBy()->getLastName() ?></p>
  476.  
  477.           </div>
  478.         </td>
  479.         <td style="text-align:center; width:33%; padding:0%; margin:0%; text-align:center; ">
  480.           <div style=" position: relative; width: 100px; padding:0%; margin:0%; text-align:center; left:20; height: 100px; display:block; justify-content: center;">
  481.             Dibuat Oleh,
  482.             <img style=" position: absolute; height: 100%; top -50; left:0; text-align:center; padding:0%; margin:0%;  " src="<?php
  483.                                                                                                                              if (is_null($signatureShipped) || $signatureCreated == '') {
  484.                                                                                                                                echo "";
  485.                                                                                                                              } else {
  486.                                                                                                                                echo $signatureCreated;
  487.                                                                                                                              }
  488.                                                                                                                              ?>" />
  489.             <!-- <img style="position: absolute; width: 100%; top: 20; text-align:center; padding:0%; margin:0%; " src="<?php
  490.                                                                                                                        echo $stampLogo
  491.                                                                                                                        ?>" /> -->
  492.             <br>
  493.             <p style=" position: absolute; top: 60; text-align:center; "><?= $receipt->getCreatedBy()->getFirstName() ?> <?= $receipt->getCreatedBy()->getLastName() ?></p>
  494.  
  495.           </div>
  496.         </td>
  497.         <td style="text-align:center; width:33%; padding:0%; margin:0%; text-align:center; ">
  498.           <div style=" position: relative; width: 100px; padding:0%; margin:0%; text-align:center; left:20; height: 100px; display:block; justify-content: center;">
  499.             Diterima Oleh,
  500.             <img style=" position: absolute; height: 100%; top -50; left:0; text-align:center; padding:0%; margin:0%;  " src="<?php
  501.                                                                                                                              if (is_null($signatureReceived) || $signatureReceived == '') {
  502.                                                                                                                                echo "";
  503.                                                                                                                              } else {
  504.                                                                                                                                echo $signatureReceived;
  505.                                                                                                                              }
  506.                                                                                                                              ?>" />
  507.             <!-- <img style="position: absolute; width: 100%; top: 20; text-align:center; padding:0%; margin:0%; " src="<?php
  508.                                                                                                                        echo $stampLogo
  509.                                                                                                                        ?>" /> -->
  510.             <br>
  511.             <p style=" position: absolute; top: 60; text-align:center; "><?= $receipt->getCreatedBy()->getFirstName() ?> <?= $receipt->getCreatedBy()->getLastName() ?></p>
  512.  
  513.           </div>
  514.         </td>
  515.       </tr>
  516.     </tbody>
  517.   </table>
  518. </body>
  519.  
  520. </html>
Add Comment
Please, Sign In to add comment