<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Work Order - #<?php echo $order_data->order_id.' ['.$order_data->customer_name.']'?></title>

  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous" media="all">
  <!--end::Web font -->
  <!--begin::Base Styles -->
  <link href="<?php  echo $this->config->item('Template_template_file_url'); ?>template/assets/vendors/base/vendors.bundle.css" rel="stylesheet" type="text/css" />
  <link href="<?php echo $this->config->item('Template_template_file_url'); ?>template/assets/demo/default/base/style.bundle.css" rel="stylesheet" type="text/css" />
  <style>
  body { font-family:Arial, Helvetica, sans-serif; font-size:20px; }
  .quotation { font-family:calibri; font-size:20px; text-align:left; font-style:normal; height:60px; text-align:justify; line-height:26px;}
  @font-face {
    font-family: calibri;
    src: url(calibri.ttf);
  }
  div {
    font-family: calibri;
  }
  </style>
</head>
<style type="text/css">

body {
  font-size: 20pt !important;
  line-height: 25px;
  /* font-size: 13px;
  font-weight: 300;
  font-family: Poppins;
  -ms-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  line-height: 20px;
  padding:0px;
  margin:0px;
  line-height:18px; */
}
.item_table td{
  padding: .75rem !important;
}
.item_table th{
  white-space: nowrap;
  padding: .75rem !important;
}
.table thead th {
  border-top: 2px solid #f4f5f8 !important;
}
@media print
{
  #print, .print_hide_div
  {
    display: none !important;
  }
}

/* @media print {
html, body, div, span, applet, object, iframe, td, tr, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size: 15pt !important;
}
h1.entry-title {
font-size: 15pt !important;
}
}

@media print {
html, body, div, span, applet, object, iframe, td, tr, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size: 15pt !important;
}
h1.entry-title {
font-size: 15pt !important;
}
} */

.page-header, .page_table .page-header-space {
  height: 0px;
}
.page-footer, .page-footer-space {
  height: 0px;
}
.page-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
}
.page-header {
  position: fixed;
  top: 0mm;
  width: 100%;
}

.page {
  page-break-after: always;
}
@page {
  margin: 20mm
}

@media print {
  thead {display: table-header-group;}
  tfoot {display: table-footer-group;}
  button {display: none;}
  body {margin: 0;}

}
* {
  -webkit-print-color-adjust: exact !important;   /* Chrome, Safari, Edge */
  color-adjust: exact !important;                 /*Firefox*/
}

</style>
<body>
  <div class="m-grid__item m-grid__item--fluid m-wrapper" id="content">
    <div class="m-content" style="height:auto; float:left; font-size: 36;">
      <div class="page-header" style="text-align: left;padding-left: 0px;">

      </div>
      <div class="page-footer">

      </div>
      <table class="page_table">
        <thead>
          <tr>
            <td>
              <!--place holder for the fixed-position header-->
              <div class="page-header-space"></div>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <div class="page">
                <img class="" style="width:100%" src="<?php echo base_url()."uploads/quotation_workorder/work_order_header_1.jpg"?>" width="200" />
                <table width="85%" border="0" align="center" style="font-size: 20px;margin-top: 30px;" >
                  <tr>
                    <td colspan="4" style="height:70px" align="center" valign="baseline"><span style="font-size:28px;font-weight:800;">WORK ORDER</span></td>
                  </tr>
                  <tr>
                    <td width="19%">Customer Name </td>
                    <td width="1%">:</td>
                    <td width="23%">Mr. <?php echo $order_data->customer_name ?></td>
                    <td colspan="3" rowspan="5"><table width="100%" border="0" style="font-size: 20px;">
                      <tr>
                        <td width="44%">Work Order Number</td>
                        <td width="4%">:</td>
                        <td width="52%">#<?php echo $order_data->order_id ?></td>
                      </tr>
                      <tr>
                        <td>Work Order Date</td>
                        <td>:</td>
                        <td><?php echo date('d-m-Y',strtotime($order_data->order_date)) ?></td>
                      </tr>
                      <tr>
                        <td>District</td>
                        <td>: </td>
                        <td><?php echo nl2br($order_data->customer_district) ?></td>
                      </tr>
                      <tr>
                        <td>Phone</td>
                        <td>: </td>
                        <td><?php echo nl2br($order_data->customer_phone) ?></td>
                      </tr>
                      <tr>
                        <td>Email</td>
                        <td>: </td>
                        <td><?php echo nl2br($order_data->customer_email) ?></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td>Address</td>
                    <td>: </td>
                    <td><?php echo nl2br($order_data->customer_address) ?></td>
                  </tr>
                  <tr>
                    <td>PIN</td>
                    <td>: </td>
                    <td><?php echo nl2br($order_data->customer_pin) ?></td>
                  </tr>
                  <tr>
                    <td>GST No</td>
                    <td>: </td>
                    <td><?php echo nl2br($order_data->customer_taxno) ?></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="3">&nbsp;</td>
                  </tr>

                  <tr>
                    <td colspan="7" align="center" valign="middle">&nbsp;</td>
                  </tr>
                  <tr>
                    <td  colspan="7" align="center" valign="middle"><table  bordercolor="#000000" width="100%" border="0" cellpadding="0" cellspacing="1">
                      <tr style="border: 1px solid black;" >
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="8%" align="center" valign="middle" bgcolor="#666666">No<br/></td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="15%" align="center" valign="middle" bgcolor="#666666">Item Code</td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="18%" align="center" valign="middle" bgcolor="#666666">Size</td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="14%" align="center" valign="middle" bgcolor="#666666">Type</td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="15%" align="center" valign="middle" bgcolor="#666666">Qty</td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="16%" align="center" valign="middle" bgcolor="#666666">Rate</td>
                        <td style="padding: 10px;color:#FFF;border:1px solid #666666 !important" width="19%" align="center" valign="middle" bgcolor="#666666">Amount</td>
                      </tr>
                      <?php foreach ($items_data as $key => $value) { ?>
                        <tr style="border:1px solid #666666 !important">
                          <td style="border:1px solid #666666 !important" height="40" align="center" valign="middle">&nbsp;<?php echo $key+1 ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $value->item_code ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $value->size ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $value->type ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $this->config->item('currency_format')->formatCurrency($value->quantity,$this->config->item('Currency_currency_shortname')) ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $this->config->item('currency_format')->formatCurrency($value->unit_price,$this->config->item('Currency_currency_shortname')) ?></td>
                          <td  style="border:1px solid #666666 !important" align="center" valign="middle">&nbsp;<?php echo $this->config->item('currency_format')->formatCurrency($value->total_price,$this->config->item('Currency_currency_shortname')) ?></td>
                        </tr>
                      <?php } ?>
                      <tr style="border:1px solid #666666 !important">
                        <td style="border:1px solid #666666 !important" height="40" align="center" valign="middle">&nbsp;</td>
                        <td style="border:1px solid #666666 !important" align="center" valign="middle" >&nbsp;</td>
                        <td style="border:1px solid #666666 !important"  align="center" valign="middle" >&nbsp;</td>
                        <td style="border:1px solid #666666 !important"  align="center" valign="middle" >&nbsp;</td>
                        <td style="border:1px solid #666666 !important" align="center" valign="middle" >&nbsp;</td>
                        <td style="border:1px solid #666666 !important"  align="center" valign="middle" >&nbsp;</td>
                        <td style="border:1px solid #666666 !important" align="center" valign="middle" >&nbsp;</td>
                      </tr>
                      <tr style="border:1px solid #666666 !important">
                        <td style="border:1px solid #666666 !important;" height="40" colspan="3" align="center" valign="middle" style="" >Amount in Words: <br/><?php echo ucwords(getIndianCurrency($order_data->total_order_amount));?></td>
                        <td style="border:1px solid #666666 !important;" colspan="4">
                          <table style="width:100%">
                            <tr>
                              <td height="40" style="border:1px solid #666666 !important;text-align:center">Total</td>
                              <td height="40" style="border:1px solid #666666 !important;text-align:right;padding-right:10px"><?php echo $this->config->item('currency_format')->formatCurrency($order_data->grand_total_amount,$this->config->item('Currency_currency_shortname')) ?></td>
                            </tr>
                            <tr>
                              <td height="40" style="border:1px solid #666666 !important;text-align:center">Discount</td>
                              <td height="40" style="border:1px solid #666666 !important;text-align:right;padding-right:10px"><?php echo $this->config->item('currency_format')->formatCurrency($order_data->discount_amount,$this->config->item('Currency_currency_shortname')) ?></td>
                            </tr>
                            <tr>
                              <td height="40" style="border:1px solid #666666 !important;text-align:center">Grand Total</td>
                              <td height="40" style="border:1px solid #666666 !important;text-align:right;padding-right:10px"><?php echo $this->config->item('currency_format')->formatCurrency($order_data->total_order_amount,$this->config->item('Currency_currency_shortname')) ?></td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                    <table style="width:100%;margin-top:20px">
                      <tr>
                        <td>Executive Name:<br/><?php echo $order_data->site_coordinator ?></td>
                        <td style="text-align:right">Customer Sign:</td>
                      </tr>
                    </table>
                  </td>
                </tr>

                <tr>
                  <td colspan="6" align="center" valign="middle">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="6" align="center" valign="middle">&nbsp;</td>
                </tr>
              </table>


            </div>


          </td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td>
            <!--place holder for the fixed-position footer-->
            <div class="page-footer-space"></div>
          </td>
        </tr>
      </tfoot>
    </table>
  </div>
</div>
<script src="<?php echo $this->config->item('Template_template_file_url'); ?>template/assets/vendors/base/vendors.bundle.js" type="text/javascript"></script>
<script src="<?php echo $this->config->item('Template_template_file_url'); ?>template/assets/demo/default/base/scripts.bundle.js" type="text/javascript"></script>

<!--end::Base Scripts -->


<script>
jQuery(document).ready(function() {
  window.print();
});
</script>
<style>
.hidden{
  display: none;
}
</style>

</body>
</html>
