<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Sales Quotation - <?php echo "#".$quotation_data->quotation_prefix."-".$quotation_data->quotation_no ?></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">
      <div class="page-header" style="text-align: center"></div>
      <div class="page-footer">
        <img style="max-width: 970px;max-height:100px" src="<?php echo base_url()."uploads/quotation_workorder/".$quotation_data->quotation_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">
                <table width="100%" border="0" style="font-size:20px !important;">
                  <tr>
                    <td><img style="width:100%" src="<?php echo base_url()."uploads/quotation_workorder/".$quotation_data->quotation_header ?>" border="0" /></td>
                  </tr>
                  <tr>
                    <td>
                      <table width="85%" border="0" align="center" style="font-size:20px !important;">
                        <tr>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>CUSTOMER NAME</td>
                          <td>QUOTATION NO.</td>
                          <td>DATE</td>
                          <td>EXPIRY DATE</td>
                        </tr>
                        <tr>
                          <td><strong><?php echo $quotation_data->customer_name ?></strong>   </td>
                          <td><strong><?php echo "#".$quotation_data->quotation_prefix."-".$quotation_data->quotation_no ?></strong></td>
                          <td><strong><?php echo date('d-m-Y',strtotime($quotation_data->date)) ?></strong></td>
                          <td><strong><?php echo date('d-m-Y',strtotime($quotation_data->expiry_date)) ?></strong></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>ADDRESS</td>
                          <td>STATE</td>
                          <td>PREPARED BY</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td><strong><?php echo nl2br($quotation_data->customer_address);if($quotation_data->customer_phone!=''){ echo "<br/>Phone: ".$quotation_data->customer_phone;} ?></strong></td>
                          <td><strong><?php echo $quotation_data->state ?></strong></td>
                          <td><strong><?php if(is_numeric($quotation_data->prepared_by)){
                            echo ($quotation_data->prepared_by_name);
                          }else{
                            echo nl2br($quotation_data->prepared_by);
                          }
                          ?></strong></td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <td colspan="4">&nbsp;</td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
            </div>
            <?php foreach ($items_data as $key => $value) { ?>
            <div class="page">
              <div style="margin-top:200px;">
                <table width="100%" border="0" class="item_table" style="font-family:calibri;border-collapse:seperate !important">
                  <tr>
                    <td>&nbsp;</td>
                    <td colspan="2" rowspan="2" style="border: 1px solid black;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="29" colspan="4" align="center" valign="middle" style="font-size:30px;"><strong><?php echo $value->title ?></strong></td>
                      </tr>
                      <tr>
                        <td height="36" colspan="4" align="center" valign="top" style="font-weight:normal;font-size:24px;"><?php echo $value->sub_title ?></td>
                      </tr>
                      <tr>
                        <td colspan="4" align="center" valign="middle" style="font-weight:normal;font-size:20px;"><?php echo $value->description ?>

                        </td>
                      </tr>
                      <tr>
                        <td colspan="4">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="4" bgcolor="#FFFFFF" >
                          <table style="font-size:18px;" width="100%" border="0"  bgcolor="#000000" cellpadding="0" cellspacing="1">
                          <tr style="border: 1px solid black !important; ">
                            <td width="19%" height="38" bgcolor="#FFCC00" style="font-size:16px;border: 1px solid black;"><strong>&nbsp;&nbsp;PRODUCTS</strong></td>
                            <td width="22%" bgcolor="#FFCC00" style="font-size:16px;border: 1px solid black;"><strong>&nbsp;&nbsp;AMOUNT /<br/> SQ.FT.(RS)</strong></td>
                            <td width="22%" bgcolor="#FFCC00" style="font-size:16px;border: 1px solid black;"><strong>&nbsp;&nbsp;WARRANTY</strong></td>
                            <td width="37%" bgcolor="#FFCC00" style="font-size:16px;border: 1px solid black;"><strong>&nbsp;&nbsp;METHOD OF APPLICATION</strong></td>
                          </tr>
                          <tr style="border: 1px solid black !important; ">
                            <td style="border: 1px solid black !important; " height="136" align="left" valign="middle" bgcolor="#FFFFFF" style="font-size:16px; padding-left:5px;"><?php echo $value->products ?>
                            </td>
                            <td style="border: 1px solid black !important; " align="center" valign="middle" bgcolor="#FFFFFF" style="font-size:16px;"><?php echo $value->unit_price ?></td>
                            <td style="border: 1px solid black !important; " style="font-size:16px; padding-left:5px;" bgcolor="#FFFFFF" ><?php echo nl2br($value->warranty) ?></td>
                            <td style="border: 1px solid black !important; " style="font-size:16px; padding-left:5px;" bgcolor="#FFFFFF"><?php echo $value->method_of_application ?></td>
                          </tr>
                          <tr style="border: 1px solid black !important; ">
                            <td style="border: 1px solid black !important; " height="31" colspan="2" bgcolor="#FFFFFF" style="font-size:16px; padding-left:5px;"><strong>Approx. Sq. Ft</strong></td>
                            <td style="border: 1px solid black !important; " colspan="2" bgcolor="#FFFFFF" style="font-size:13px; padding-left:5px;"><strong><?php echo $value->quantity ?></strong></td>
                          </tr>
                          <tr style="border: 1px solid black !important; ">
                            <td style="border: 1px solid black !important; " height="34" colspan="2" style="font-size:16px; padding-left:5px;" bgcolor="#FFFFFF"><strong>Amount</strong></td>
                            <td style="border: 1px solid black !important; " colspan="2" bgcolor="#FFFFFF" style="font-size:16px; padding-left:5px;"><strong><?php echo $value->quantity ?> x <?php echo $value->unit_price ?> = <?php echo $value->total_amount ?>+GST</strong></td>
                          </tr>
                          <tr style="border: 1px solid black !important; ">
                            <td style="border: 1px solid black !important; " height="48" colspan="4" bgcolor="#FFFFFF" style="font-size:16px; padding-left:5px; line-height:24px;"><?php echo $value->notes ?></td>
                          </tr>
                        </table>
                      </td>
                      </tr>
                    </table>
                  </td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                </table>
              </div>
            </div>
            <?php } ?>
            <div class="page">
              <div style="margin-top:100px;">
                <table width="85%" 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($quotation_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>
