  <html>
      <head>
          <title><?php echo $b_header['title']; ?></title>
          <link href="<?php echo base_url(); ?>assets/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" media="all">
      
      <style type="text/css">
          
            
  .relative{position:relative;}
  .text-bold{font-weight:bold;}
  h4,hr{margin:2px;}
  h3,h2,h1,h4{color:#17a05e;}
  .logo{width:100px;height:100px;}
  @media print{
  * {-webkit-print-color-adjust:exact;}

  .logo{width:300px !important;height:100px;}
  #myDataTable{width:100%;margin:0;font-size:14px;}
  .print_doj{width:110px;}
  }
      </style>
      </head>
      <body >

          <div class="super_container">
          <div class="container-fluid">
            <div class="row header">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="row">
                      <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="col-md-1 col-sm-2 col-xs-2"><img class="logo" src="<?php echo base_url().$b_header['b_logo'];?>"></div>
                        <div class="col-md-9 col-sm-8 col-xs-8 text-center">
                              <h3 class="wd-100"><?php echo $b_header['title']; ?></h3>
                              <h4 class="wd-100"><?php echo $b_header['tagline']; ?></h4>
                        </div>
                        <div class="col-md-1 col-sm-2 col-xs-2 pull-right"><img class="logo" src="<?php echo base_url().$b_header['logo2'];?>"></div>
                        
                      </div>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                          <br>
                        <hr>
                              <div class="col-md-5 col-sm-5 col-xs-5 text-left">
                              <?php if($d1==0 && $d2==0 ){ ?>
                                  <h4> <?php echo " Journal Voucher"; ?></h4>
                                  <?php } else { ?>
                                  <h4> <?php echo " Journal Voucher Date wise "; ?></h4>
                                  <?php } ?>
                              </div>
                              <div class="col-md-3 col-sm-3 col-xs-3 text-center">
                                  <h4> <?php echo $b_header['name']; ?></h4>
                              </div>
                              <?php if($d1!=0 && $d2!=0){ ?>
                              <div class="col-md-4 col-sm-4 col-xs-4 text-center">
                                  <small><b> <?php echo "".$d1." - ".$d2 ?></b></small>
                              </div>
                              <?php } ?>
                        </div>
                    </div>  
                </div>
            </div>
  <hr/>
  <hr/>
  <hr/>


            
            <div class="row header">
      <div>

                    <table class="table table-bordered table-striped text-center" style="width:80%;margin:0 auto;">
                  <thead>
                  <tr>
                  <th class="text-center">#</th>
                  <th class="text-center">Voucher #</th>
                  <th class="text-center">Date</th>
                  <th class="text-center" style="width:30%">Head</th>
                  <th class="text-center" >Debit</th>
                  <th class="text-center" >credit</th>
                  </tr>
                  </thead>
                  <?php //var_dump("<pre>",$journal);die(); ?>
                  <tbody>
                  <?php $title=""; $drtotal=0; $crtotal=0; foreach ($journal as $key => $value) {
                    
                     ?>
                  <tr>
                  <td><?php echo ++$key; ?></td>
                  <td><?php echo $value['voucher#']; ?></td>
                  <?php $newDate = date("d-m-Y", strtotime($value['date'])); ?><td class="bold"><?php echo $newDate; ?></td>
                  <td><div class="row"><div class="col-md-12 text-left">
                    <?php foreach ($value['detail'] as $key => $v) {
                      if($v['dr']!=null){
                        echo $v['dr']."<br>";
                      }
                    } ?>
                  </div><div class="col-md-12 text-right">
                  <?php foreach ($value['detail'] as $key => $v) {
                      if($v['cr']!=null){
                        echo $v['cr']."<br>";
                      }
                    } ?>
                  </div></div></td>
                   <!-- Ammount show here -->
                   <td>
                   <div class="row"><div class="col-md-12 text-left">
                  <?php foreach ($value['detail'] as $key => $v) {
                       
                       if($v['dr']!=Null){
                         $drtotal=$v['ammount']+$drtotal;
                         echo $v['ammount']."<br>";
                       }
                       
                     } 
                     
                   
                    ?>
                  </div><div class="col-md-12 text-right">
                  &nbsp;
                  </div></div>
                   </td>
                   <td>
                   <div class="row"><div class="col-md-12 text-left">
                   &nbsp;
                  </div><div class="col-md-12 text-right">
                  <?php  foreach ($value['detail'] as $key => $v) {
                       
                       if($v['cr']!=Null){
                         $crtotal=$v['ammount']+$crtotal;
                         echo $v['ammount']."<br>";
                       }
                       
                     } 
                     
                   
                    ?>
                  
                  </div></div>
                   </td>
                  </tr>
                    <?php  } ?>
                  <tbody>
                  <tr><td colspan="4" class="text-center">Total</td><td><?php echo $drtotal; ?></td><td ><?php echo $crtotal; ?></td></tr>
                  </table>
                        </div >
  </div>







  <script>window.print();</script>
      </body>
  </html>