<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: 10px;
}
.page-footer, .page-footer-space {
  height: 70px;
}
.page-footer {
  position: fixed;
  bottom: 50px;
  width: 100%;
}
.page-header {
  position: fixed;
  top: 0mm;
  width: 100%;
}

.page {
  page-break-after: always;
}
@media print {
  @page { margin: 0 !important; }
  body { padding: 80px !important; }
}
@media print {
  thead {display: table-header-group;}
  tfoot {display: table-footer-group;}
  button {display: none;}
  body {margin: 0px !important;}
}
* {
    -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="width:21cm; height:auto; float:left; font-size: 36;">
      <div class="page-header" style="text-align: left;padding-left: 0px;">

      </div>
      <div class="page-footer">
        <img class="footer_img" style="max-width: 970px;max-height:100px" src="<?php echo base_url()."uploads/quotation_workorder/".$order_data->workorder_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" style="z-index:10000 !important;position:relative;margin-top:-120px !important">
                <table width="100%" border="0" style="font-weight:600">
                  <tr>
                    <td><img style="max-width: 970px;margin-top:50px" src="<?php echo base_url()."uploads/quotation_workorder/".$order_data->workorder_header?>" border="0" /></td>
                  </tr>
                </table>
              </div>
              <div class="page">
                <img class="header_img" src="<?php echo base_url()."uploads/quotation_workorder/".$order_data->workorder_logo?>" width="200" />
                <table width="100%" border="0" align="center" >
                  <tr>
                    <td></td>
                    <td style="text-align:right" valign="baseline"><span style="font-size:50px;">WORK ORDER</span></td>
                  </tr>
                </table>
                <table width="100%" border="0" align="center" style="font-size: 21px;" >
                  <tr>
                    <td colspan="3">&nbsp;</td>
                    <td colspan="3"></td>
                  </tr>
                  <tr>
                    <td width="19%">Customer Name </td>
                    <td width="1%">:</td>
                    <td width="40%">Mr. <?php echo $order_data->customer_name ?></td>
                    <td colspan="3" rowspan="3">
                      <table width="100%" border="0" style="font-size: 21px;">
                        <tr>
                          <td width="44%">Work Order Number</td>
                          <td width="4%">:</td>
                          <td width="52%">#<?php echo $order_data->workorder_prefix.'-'.$order_data->order_no ?></td>
                        </tr>
                        <tr>
                          <td>Quotation No</td>
                          <td>:</td>
                          <td>#<?php echo $order_data->quotation_prefix.'-'.$order_data->quotation_no ?></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>Project Start Date</td>
                          <td>:</td>
                          <td><?php echo date('d-m-Y',strtotime($order_data->project_start_date)) ?></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                  <tr>
                    <td>Address</td>
                    <td>: </td>
                    <td><?php echo nl2br($order_data->customer_address) ?></td>
                  </tr>
                  <tr>
                    <td>State</td>
                    <td>:</td>
                    <td><?php echo $order_data->state ?></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="3">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="6" align="center" valign="middle"><span style="font-size:35px;">QUOTED PRICE</span></td>
                  </tr>
                  <tr>
                    <td colspan="6" align="center" valign="middle">&nbsp;</td>
                  </tr>
                  <tr>
                    <td  colspan="6" align="center" valign="middle">
                      <table style="    font-size: 24px;"  bordercolor="#000000" width="100%" border="0" cellpadding="0" cellspacing="1">
                      <tr style="border: 1px solid black;" >
                        <td style="color:#FFF;border:1px solid #666666 !important" width="26%" align="center" valign="middle"  bgcolor="#666666">AREA</td>
                        <td style="color:#FFF;border:1px solid #666666 !important" width="18%" align="center" valign="middle"  bgcolor="#666666">APPROX/<BR >SQUARE FEET</td>
                          <td style="color:#FFF;border:1px solid #666666 !important" width="18%" align="center" valign="middle"  bgcolor="#666666">AMOUNT<BR>PER SQ.FT</td>
                            <td style="color:#FFF;border:1px solid #666666 !important" width="19%" align="center" valign="middle"  bgcolor="#666666">TOTAL <BR>
                              AMOUNT <BR> <span style="font-size:12px;">( EXCLUDING GST )</span> </td>
                                <td style="color:#FFF;border:1px solid #666666 !important" width="19%" align="center" valign="middle"  bgcolor="#666666">WARRANTY</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" bgcolor="#ffc20e">&nbsp;<?php echo $value->area_type ?></td>
                                  <td style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;<?php echo nl2br($value->quantity) ?></td>
                                  <td  style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;<?php echo $value->unit_price ?></td>
                                  <td  style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;<?php echo $value->total_price ?></td>
                                  <td  style="border:1px solid #666666 !important"align="center" valign="middle" bgcolor="#ffc20e">&nbsp;<?php echo nl2br($value->warranty) ?></td>
                                </tr>
                              <?php } ?>
                              <tr style="border:1px solid #666666 !important">
                                <td style="border:1px solid #666666 !important" height="40" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                                <td style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                                <td style="border:1px solid #666666 !important"  align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                                <td style="border:1px solid #666666 !important"  align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                                <td style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                              </tr>
                              <?php if($order_data->tax_percent!=0){?>
                              <tr style="border:1px solid #666666 !important">
                                <td style="border:1px solid #666666 !important;color:#FFF" height="40" colspan="3" align="center" valign="middle" style="" bgcolor="#666666">TOTAL TAXABLE</td>
                                <td style="border:1px solid #666666 !important;color:#FFF" align="center" valign="middle" bgcolor="#666666"><?php echo $order_data->grand_total_amount-$order_data->discount_amount ?></td>
                                <td style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                              </tr>
                              <tr style="border:1px solid #666666 !important">
                                <td style="border:1px solid #666666 !important;color:#FFF;border-top: 1.5px solid #ffffff !important;" height="40" colspan="3" align="center" valign="middle" style="" bgcolor="#666666"><?php echo $this->config->item('Tax_tax_name')?> AMOUNT @ <?php echo $order_data->tax_percentage ?>%</td>
                                <td style="border:1px solid #666666 !important;color:#FFF;border-top: 1.5px solid #ffffff !important;" align="center" valign="middle" bgcolor="#666666"><?php echo $order_data->tax_amount ?></td>
                                <td style="border:1px solid #666666 !important;border-top: 1.5px solid #ffffff !important;" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                              </tr>
                              <tr style="border:1px solid #666666 !important">
                                <td style="border:1px solid #666666 !important;color:#FFF;border-top: 1.5px solid #ffffff !important;" height="40" colspan="3" align="center" valign="middle" style="" bgcolor="#666666">NET TOTAL</td>
                                <td style="border:1px solid #666666 !important;color:#FFF;border-top: 1.5px solid #ffffff !important;" align="center" valign="middle" bgcolor="#666666"><?php echo $order_data->total_order_amount ?></td>
                                <td style="border:1px solid #666666 !important;border-top: 1.5px solid #ffffff !important;" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                              </tr>
                            <?php }else{ ?>
                              <tr style="border:1px solid #666666 !important">
                                <td style="border:1px solid #666666 !important;color:#FFF" height="40" colspan="3" align="center" valign="middle" style="" bgcolor="#666666">TOTAL</td>
                                <td style="border:1px solid #666666 !important;color:#FFF" align="center" valign="middle" bgcolor="#666666"><?php echo $order_data->total_order_amount ?> + GST</td>
                                <td style="border:1px solid #666666 !important" align="center" valign="middle" bgcolor="#ffc20e">&nbsp;</td>
                              </tr>
                            <?php } ?>
                            </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>
                      <div class="page">
                        <img class="header_img" src="<?php echo base_url()."uploads/quotation_workorder/".$order_data->workorder_logo?>" width="200" />
                        <table width="100%" border="0" style="font-size:28px;">
                          <tr>
                            <td colspan="5">&nbsp;</td>
                          </tr>
                          <tr>
                            <td colspan="5" align="center" valign="middle"><span style="font-size:35px;">PAYMENT SCHEDULE</span></td>
                          </tr>
                          <tr>
                            <td colspan="5">
                              <table width="100%" border="0" style="font-size:24px">
                              <tr style="border:1px solid #666666 !important">
                                <td  style="border:1px solid #666666 !important" width="9%" height="33" align="center" valign="middle" bgcolor="#ffc20e">Sl No.</td>
                                <td  style="border:1px solid #666666 !important" width="31%" align="center" valign="middle" bgcolor="#ffc20e">PARTICULARS</td>
                                <td style="border:1px solid #666666 !important" width="15%" align="center" valign="middle" bgcolor="#ffc20e">AMOUNT</td>
                                <td style="border:1px solid #666666 !important" width="45%" align="center" valign="middle" bgcolor="#ffc20e">DETAILED REMARKS</td>
                              </tr>
                              <?php
                              $payment_schedule = unserialize($order_data->payment_schedule);
                              if($payment_schedule!='' && $payment_schedule!=null) {
                                $payment_schedule_count = sizeof($payment_schedule);
                                $i = 1;
                                ?>
                                <?php foreach ($payment_schedule as $key => $value) { ?>
                                  <tr style="border:1px solid #666666 !important">
                                    <td style="border:1px solid #666666 !important" height="35" align="center" valign="middle"><?= $key+1 ?></td>
                                    <td style="border:1px solid #666666 !important" align="center" valign="middle"><?= nl2br($value['particulars']) ?></td>
                                    <td style="border:1px solid #666666 !important" align="center" valign="middle"><?= $value['amount'] ?></td>
                                    <td style="border:1px solid #666666 !important" align="center" valign="middle"><?= nl2br($value['remarks']) ?></td>
                                  </tr>
                                <?php }
                              }?>

                              <tr>
                                <td height="35" align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                              </tr>
                              <tr>
                                <td height="35" align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                                <td align="center" valign="middle">&nbsp;</td>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td colspan="5">&nbsp;</td>
                          </tr>
                        </table>
                        <table width="100%" border="0" style="font-size:28px;margin-top:400px !important">
                          <tr >
                            <td colspan="5">Kindly Transfer advance amount to the below mentioned account</td>
                          </tr>
                          <tr>
                            <td colspan="5">&nbsp;</td>
                          </tr>
                          <tr>
                            <td colspan="5">
                              <table width="100%" border="0" style="font-size:28px;">
                              <tr>
                                <td width="25%">COMPANY NAME</td>
                                <td width="2%">:</td>
                                <td width="30%"><?php echo $order_data->company_name ?></td>
                                <td width="43%">&nbsp;</td>
                              </tr>
                              <tr>
                                <td>BANK NAME</td>
                                <td>:</td>
                                <td><?php echo $order_data->bank_name ?> </td>
                                <td rowspan="4" style="float:right">
                                  <table width="100%" border="0" style="font-size:28px;">
                                  <tr>
                                    <td><strong>SITE COORDINATOR</strong></td>
                                  </tr>
                                  <tr>
                                    <td><?php
                                    if(is_numeric($order_data->site_coordinator)){
                                      echo ($order_data->site_coordinator_name);
                                    }else{
                                      echo nl2br($order_data->site_coordinator);
                                    } ?></td>
                                  </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td>ACCOUNT NUMBER</td>
                                <td>:</td>
                                <td><?php echo $order_data->bank_account_no ?></td>
                              </tr>
                              <tr>
                                <td><?= $this->config->item('bank_ifsc_name')?> CODE</td>
                                <td>:</td>
                                <td><?php echo $order_data->bank_ifsc ?></td>
                              </tr>
                              <tr>
                                <td>BRANCH </td>
                                <td>:</td>
                                <td><?php echo $order_data->bank_branch ?></td>
                              </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td colspan="5">&nbsp;</td>
                          </tr>
                        </table>
                      </div>
                      <div class="page">
                        <img class="header_img" src="<?php echo base_url()."uploads/quotation_workorder/".$order_data->workorder_logo?>" width="200" />
                        <div style="margin-top:100px;">
                          <table width="100%" border="0" align="center" style="text-align:justify;margin-bottom:100px">
                            <tr>
                              <td colspan="4" align="center" valign="middle"><strong style="text-decoration:underline; font-size:30px;">THIS PROPOSAL INCLUDES THE CONDITION NOTED</strong></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                              <td>&nbsp;</td>
                            </tr>
                            <tr>
                              <td align="center" valign="middle">&nbsp;</td>
                              <td colspan="3" class="quotation">
                                <?php
                                $terms = unserialize($order_data->terms_and_conditions);
                                if($terms!='' && $terms!=null) {
                                  $count = sizeof($terms);
                                  $i = 1;
                                  ?>
                                  <ul>
                                    <?php foreach ($terms as $key => $value) { ?>
                                      <li style="font-size:24px;line-height: 3rem;"><?= nl2br($value['description']) ?></li>
                                    <?php } ?>
                                  </ul>
                                <?php } ?>
                              </td>
                            </tr>

                          </table>
                        </div>
                      </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>
