<style>
    .mouse-cursor{
        
    }
</style>  
<div class="wrapper">
            <div class="container">
                <!-- Page-Title -->
                <div class="row">
                    <div class="col-sm-12">
                        <h4 class="page-title">Receiving Voucher</h4>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="pull-left">
                                        <h3 class="logo invoice-logo"><?php if(isset($business)){ echo "<img src='".base_url().'assets/images/business/'.$business[0]['business_logo']."' alt='".$business[0]['business_name']."' class='img-responsive' />";} else {echo 'Skedwise';}?></h3>
                                    </div>
                                    <div class="pull-right">
                                        <h4 >
                                            <strong id="vouchernumber">  <?php echo $voucher[0]['account_voucher_type'];  ?></strong>
                                        </h4>
                                        
                                        <table class="table" style="border:1px solid #fff;">
                                            <tr>
                                                <td>Print Date:</td>
                                               
                                                <td><b> <?php echo date('d-m-Y'); ?></b></td>
                                            </tr>
                                            
                                        </table>
                                        
                                        
                                      
                                         
                                    </div>
                                </div>
                               
                                <div class="row" style="color:#000 !important">
                                    <div class="col-md-12 ">                                        
                                        <div class="col-md-2 col-xs-2" style="text-align: right;">
                                        <?php if($voucher[0]['account_voucher_type']=='Receive Voucher'){?>                                           
                                            <span>PAYMENT RECEIVED FROM: </span>
                                        <?php } elseif($voucher[0]['account_voucher_type']=='Payment Voucher'){?> 
                                            <span>PAYMENT MADE TO: </span>
                                        <?php } elseif($voucher[0]['account_voucher_type']=='Transfer Voucher' || $voucher[0]['account_voucher_type']=='Journal Voucher'){?>     
                                             <span>NARRATION: </span>
                                        <?php } ?>    
                                        </div>
                                        <div class="col-md-10 col-xs-10" style="border-bottom:1px solid #000;">
                                        <?php if($voucher[0]['account_voucher_type']=='Receive Voucher' || $voucher[0]['account_voucher_type']=='Payment Voucher'){?>                                           
                                            <span><?php echo $voucher[0]['business_partner_name']; ?> </span>

                                        <?php } elseif($voucher[0]['account_voucher_type']=='Transfer Voucher' || $voucher[0]['account_voucher_type']=='Journal Voucher'){?>     
                                             <span><?php echo   $voucher[0]['description']; ?> </span>
                                        <?php } ?>    
                                        </div>                                        
                                        
                                    </div>
                                </div><!-- end col -->
                                    
                                    <div class="row m-t-20" style="color:#000 !important">
                                        <div class="col-md-12">    
                                             <?php if($voucher[0]['account_voucher_type']=='Receive Voucher' || $voucher[0]['account_voucher_type']=='Payment Voucher'){?>                 
                                            <div class="col-md-2 col-xs-2" style="text-align: right;">
                                                                     
                                                <span>ON ACCOUNT OF: </span>
                                            
                                            </div>
                                            <?php } ?>    
                                             <?php if($voucher[0]['account_voucher_type']=='Receive Voucher' || $voucher[0]['account_voucher_type']=='Payment Voucher'){?>                                           
                                            <div class="col-md-10 col-xs-10" style="border-bottom:1px solid #000;">
                                           
                                                <span><?php echo $voucher[0]['description']; ?> </span>
                                            
                                          
                                            </div>                                        
                                              <?php } ?>    
                                        </div>
                                    </div>
                                    <!--<div class="row m-t-20" style="color:#000 !important">
                                        <div class="col-md-12 m-t-20">    
                                           <div class="col-md-2 col-xs-2" style="text-align: right;">
                                               <span>RS.</span>
                                           </div>
                                            
                                            <div class="col-md-10 col-xs-10" style="border-bottom:1px solid #000;">
                                           
                                                <span>
                                                    <?php //$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
                                                    //echo $f->format(1432); ?>
                                                </span>
                                            
                                          
                                            </div>                                        
                                             
                                        </div>
                                    </div>  -->
                                </div>
                                <!-- end row -->

                                <div class="row m-t-20">
                                    <div class="col-md-12">
                                        <div class="">
                                            <table class="table m-t-20" style='border:1px solid #000'>
                                                <thead style="color:#000 !important ; ">
                                                    <tr>
                                                        <th   style="border:1px solid #000;">Voucher #</th>
                                                        <th style="border:1px solid #000;">Head of Account</th>
                                                        <th style="border:1px solid #000;">Code/Folio</th>
                                                        <th style="border:1px solid #000;">Date</th>
                                                        <th style="border:1px solid #000;">Instrument #</th>
                                                        <th style="border:1px solid #000;">Debit</th>
                                                        
                                                        <th style="border:1px solid #000;">Credit</th>
                                                    </tr>
                                                </thead>
                                                <tbody style="color:#000 !important">
                                                    <?php $totalcredit=0; $totaldebit=0; foreach($voucher as $v){?>
                                                    <?php // if($v['credit']>0){ ?>
                                                    <tr>
                                                        <td style="border:1px solid #000;"><?php echo $v['id_account_vouchers'];?></td>
                                                        <td style="border:1px solid #000;"><?php echo $v['account_head']; ?></td>
                                                        <td style="border:1px solid #000;"><?php echo $v['account_main_number'].'-'. $v['account_control_number'].'-'. $v['account_sub_control_number'].'-'.$v['account_head_number']; ?></td>
                                                        <td style="border:1px solid #000;"><?php echo $v['voucher_date'];?></td>
                                                        <td style="border:1px solid #000;"><?php echo $v['instrument_number']; ?></td>
                                                        <td style="border:1px solid #000; text-align: right;"><?php echo number_format($v['debit'],2); $totaldebit=$totaldebit+$v['debit'];?></td>
                                                        <td style="border:1px solid #000; text-align: right;"><?php echo number_format($v['credit'],2); $totalcredit=$totalcredit+$v['credit'];?></td>
                                                    </tr>
                                                    <?php  //}
                                                    
                                                    } ?>
                                                   
                                                </tbody>
                                                <tfoot>
                                                    <tr>
                                                        <th></th>
                                                        <th></th>
                                                        <th></th>
                                                        <th></th>
                                                        <th></th>
                                                        <th style="border:1px solid #000; text-align: right;"><?php echo number_format($totaldebit,2);?></th>
                                                        <th style="border:1px solid #000; text-align: right;"><?php echo number_format($totalcredit,2);?></th>
                                                    </tr>

                                                </tfoot>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="row" style="color:#000 !important">
                                     <div class="col-md-12">
                                         <div class="row">
                                            
                                         </div>
                                     </div>
                                </div>
                                <div class="row m-t-40" style="color:#000 !important">
                                    
                                    <div class="col-md-12 col-sm-12 col-xs-12 m-t-40">
                                        <table class='' style='border:none !important; width:100%; text-align: center; color:#000;'>
                                            <tr>
                                                <td>________________________________</td>
                                                <td>________________________________</td>
                                                <td>________________________________</td>
                                                <td>________________________________</td>
                                            </tr>
                                            <tr>
                                                <td>PREPARED BY </td>
                                                <td>CHECKED BY </td>
                                                <td>APPROVED BY </td>
                                                <td>RECEIVED BY </td>
                                            </tr>
                                        </table>
                                       
                                    </div>
                                </div>
                                <hr>
                                <div class="hidden-print">
                                    <div class="pull-right">
                                        <a href="javascript:window.print()" class="btn btn-inverse waves-effect waves-light" id="btnprint"><i class="fa fa-print"></i></a>
                                       
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>

                </div>
                <!-- end row -->
               
<script>
    
 
   
    
   

</script>
