<!--<style type="text/css" media="print">
    .page
    {
        -webkit-transform: rotate(-90deg);
        -moz-transform:rotate(-90deg);
        filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
    }
</style> -->

<aside class="right-side page" >

    <!-- Main content -->
    <?php 
		$general	 	= get_general_setting();
		$general->gst 	= 0;
	?>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <!-- /.box -->

                <div class="box box-primary">

<!--<a class="print" style="float: right; cursor: pointer;"><img src="<?php echo base_url(); ?>assets/images/print.jpg" width="70px" height="35px;"/></a>-->

                    <input type="hidden" name="hidden_print" class="hidden_print" value="<?php echo (!empty($search_date)) ? 1 : 0; ?>" />

                    <div class="box-body table-responsive" style="clear:both;" id="print_data_container">
                    
                   
                        <div>
                            <?php
                            if (!IS_KSK) :
                                $basic = get_basic_setting();
                                $general = get_general_setting();
                                $design = get_design_setting();
                                ?>
                                <table border="0" width="100%" style="border-collapse:collapse;">
                                    <iframe name="report" id="report" src="#" style="display:none;"></iframe>
                                    <tr>
                                        <td width="10%" style="border-right:1px solid #FFF;">
                                            <?php
                                            if ((!empty($design->logo)) && (file_exists(FCPATH . DIR_COMPANY_LOGO . $design->logo))) {
                                                $image_url = base_url() . DIR_COMPANY_LOGO . $design->logo;
                                                $alt = $basic->temple_name;
                                            } else {
                                                $image_url = base_url() . 'assets/images/logo.png';
                                                $alt = 'Logo not found!';
                                            }
                                            ?>
                                            <div style="font-size: 14px;">
                                                <div><span style="float:right;margin:2px;"><img src="<?php echo $image_url; ?>" alt="<?php echo $alt; ?>" width="216" height="96" /></span></div>
                                            </div>
                                        </td>
                                        <td width="60%" align="center">
                                            <span style="font-family:Arial, Helvetica, sans-serif;font-weight:bold; margin-bottom: 20px;"><span style="font-size:21px;" class="lang-tamil"><?php echo $basic->tamil_name; ?></span><br/><span style="font-size:13px;"><?php echo $basic->temple_name; ?></span><br/><br/><span style="font-size:12px;"><?php echo nl2br($basic->address); ?></span><br/><span style="font-size:12px;">Tel: <?php echo $basic->contact_no; ?><?php echo (!empty($basic->fax)) ? '&nbsp; Fax: ' . $basic->fax : ''; ?></span> <br/><span style="font-size:12px;">Email: <?php echo $basic->comp_email; ?></span><br/><span style="font-size:12px;"><?php echo $basic->website_url; ?></span><br/></span>
                                        </td>
                                        <td width="30%"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="3" align="center" style="font-size:16px; font-weight:bold;"><?php if ($dataType == 'Print Sort Summary Data') { ?>Daily Sort Summary Report<?php }else{ ?>Daily Summary Report<?php } ?> - <?php echo date('d-m-Y', strtotime($search_date)); ?></td>
                                    </tr>
                                </table>
                            <?php else : ?>

                                <div class="clear" style="clear: both;"></div>
                                <table border="0" width="100%" style="border-collapse:collapse;">
                                    

                                <?php endif; ?>
                            </table>
                            <br/>

                            <!-- Filtered Columns to send JS - Start -->
                            <div class="col-xs-12" style="margin-bottom:4%; display: none;">
                                <div class="col-xs-12 blck" style="margin-bottom: -35px;">
                                    <div class="sub-title" style="color:#0B45B3; background:#f3f3f3 !important;" ><h4><i class="fa fa-fire" style="font-size: 14px;"></i> Filter Columns</h4><i class="ctrl opener opened fa fa-chevron-up" style="float: right; margin-top: -25px;"></i></div>
                                    <div class="blck-content col-xs-12" style="border-bottom: 1px inset rgba(209, 216, 216, 0.6); background: rgba(3, 12, 11, 0.05); margin-top: -15px;">
                                        <div id="grpChkBox" class="grpChkBox">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php foreach ($filters as $key => $val) : ?>
                                <input type="hidden" name="hidden_filter_array[]" class="hidden_filter_array" value="<?php echo $val; ?>" />
                            <?php endforeach; ?>
                            <!-- Filtered Columns to send JS - End -->

                            <?php if ($dataType == 'Print Summary Data' || $dataType == 'Pdf Summary Data') { ?>
 <?php 
                                    if($dataType == 'Print Summary Data'):
                                    $fontsize="font-size:18px";
                                    else:
                                     $fontsize="font-size:14px";
                                    endif;
                                    ?>
                                <table width="100%" border="1" cellpadding="3" cellspacing="0" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:17px; width: 100%; border-collapse:collapse;" class="filterTable" id="filterTable">
                                    <thead>
                                        <tr>
                                            <th align="left" style="padding:1.5%;<?php echo $fontsize; ?>" width="5%">S.No</th>
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="12%">Receipt No</th>
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="20%">Name</th>
                                            <!--<th width="10%" style="padding:1%;">Payment Type</th>-->
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="6%">Qty</th>
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="8%">Unit Price</th>
                                            <!--
											<?php if ($general_data->gst > 0) { ?>
                                                <th style="padding:1.5%; <?php echo $fontsize; ?>" width="8%">Before GST</th>
                                                <th style="padding:1.5%; <?php echo $fontsize; ?>" width="8%">GST Amount</th>
                                            <?php } ?>
                                            -->
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="8%">Total</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $total_amt = 0;
                                        $beforegstamt=0;
                                          $totgstamount=0;
                                        $search_date = (!empty($search_date)) ? $search_date : date('d-m-Y');
                                        if (count($results) > 0) {
                                            ?>
                                            <?php
                                            $i = 0;
//                                            print_r($results);
//                                            die;
                                            foreach ($results as $key => $row) :
                                                //Refund Amount
                                                $Refund = $this->daily_summary_model->get_refund_amt_by_ids($row['type_id'], $row['service_id'], $row['id'], $search_date);
                                                $gstval = 100 + $general_data->gst;
                                                if (!empty($Refund)) {
                                                    $AmtwithGst1 = (100 / $gstval) * $recentAmt;
                                                    $recentAmt = $row['amount'] - $Refund;
                                                } else {
                                                    $recentAmt = $row['amount'];
                                                    $AmtwithGst1 = $recentAmt;
                                                }



                                                if (!empty($row['gst'])) {
                                                    $AmtwithGst1 = (100 / $gstval) * $recentAmt;
                                                    $AmtwithGst = $recentAmt - $AmtwithGst1;
//                                                    $AmtwithGst = $recentAmt * ($row['gst'] / 100);
                                                    $amountval = $recentAmt - $AmtwithGst;
                                                } else {
                                                    $AmtwithGst = 0;
                                                    $amountval = $row['amount'];
                                                }
                                                $total_amt += $recentAmt;
                                                ?>
                                                <?php
                                                $mem_card_id = (!empty($row['mem_card_id'])) ? $row['mem_card_id'] : '';
                                                $auto_id = (empty($row['mem_card_id'])) ? $row['id'] : '';
                                                $emp_id = ''; // not necessary to send auto id
                                                $paymentType = $this->daily_summary_model->get_payment_details($row['type_id'], $emp_id, $search_date, $mem_card_id);
                                                ?>

                                                <?php
                                                if ((!empty($row['amount_type'])) && $row['amount_type'] == 2) {
                                                    $payType = '-';
                                                } elseif ((!empty($row['amount_type'])) && $row['amount_type'] != 2) {
                                                    $payType = $paymentType[0]['payment'];
                                                } else {
                                                    $payType = $paymentType[0]['payment'];
                                                }
                                                ?>

                                                <tr>
                                                    <td align="center" style="padding:1%; <?php echo $fontsize; ?>"><?php echo ++$i; ?></td>
                                                    <td style="padding:1%; <?php echo $fontsize; ?>"><?php echo $row['rec_no']; ?></td>
                                                    <td width="20%" style="padding:1%; <?php echo $fontsize; ?>"><?php echo $row['name']; ?>
                                                        <?php if (!empty($row['paystr'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>;font-style: italic"><?php echo $row['paystr']; ?></span>
                                                        <?php endif; ?>
                                                        <br>
                                                        <?php if (!empty($row['fn_date'])): ?>
                                                            <span style="<?php echo $fontsize; ?>;">[<?php echo $row['fn_date']; ?>]</span>
                                                        <?php endif; ?>
                                                    </td>
                                                    <!--<td width="10%" style="padding:1%;"><?php echo $payType; ?></td>-->
                                                    <td align="center" style="padding:1%; <?php echo $fontsize; ?>;"><?php echo $row['qty']; ?></td>
                                                    <td align="right" style="padding:1%; <?php echo $fontsize; ?>;"><?php echo $row['price']; ?></td>                                                        <?php if (!empty($row['name1'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>"><?php echo $row['name1']; ?></span>
                                                        <?php endif; ?>
                                                        <?php if (!empty($row['t_name'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>" class="lang-tamil"><?php echo ($row['t_name']); ?></span>
                                                        <?php endif; ?></td>
													<!--
                                                    <?php
                                                    if ($general_data->gst > 0) {
                                                        if ($row['ser_gst'] == 2) {
//                                                            echo $row['gst'];
                                                            $addval = 100 + $row['gst'];
                                                            $gstamount = $recentAmt * 100;
                                                            $gstamount = $gstamount / $addval;
//                                                            echo $gstamount;
                                                            $before_gst = $recentAmt - $gstamount;
                                                            $beforegstamt +=$gstamount;
                                                            $totgstamount +=$before_gst;
                                                            ?>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($recentAmt)) ? number_format($gstamount, 2) : '0.00'; ?></td>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($row['gst'])) ? number_format($before_gst, 2) : '0.00'; ?></td>
                                                        <?php } else {
                                                         $beforegstamt +=$amountval;
                                                         $totgstamount +=$AmtwithGst;
                                                        ?>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($recentAmt)) ? number_format($amountval, 2) : '0.00'; ?></td>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($row['gst'])) ? number_format($AmtwithGst, 2) : '0.00'; ?></td>
                                                            <?php
                                                        }
                                                    }
                                                    ?>
                                                    -->
                                                    <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo number_format($amountval + $AmtwithGst, 2); ?></td>
                                                </tr>

                                            <?php endforeach; ?>

                                        <?php } else { ?>
                                            <tr>
                                                <td colspan="6" style="color: #0B6CCB;"><center>No Records Found!</center></td>
                                        </tr>
                                    <?php } ?>
                                    </tbody>
                                </table>
                                <?php } elseif ($dataType == 'Print Sort Summary Data') { ?>
 <?php 
                                    if($dataType == 'Print Sort Summary Data'):
                                    $fontsize="font-size:14px";
                                    else:
                                     $fontsize="font-size:14px";
                                    endif;
                                    ?>
                                <table width="100%" border="1" cellpadding="3" cellspacing="0" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:17px; width: 100%; border-collapse:collapse;" class="filterTable" id="filterTable">
                                    <thead>
                                        <tr>
                                            <th align="left" style="padding:1%;<?php echo $fontsize; ?>" width="5%">S.No</th>
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="8%">Acc Code</th>
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="10%">Receipt No</th>
                                            <th align="left" style="padding:1.5%; <?php echo $fontsize; ?>" width="18%">Name</th>
                                            <!--<th width="10%" style="padding:1%;">Payment Type</th>-->
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="5%">Qty</th>
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="6%">Unit Price</th>
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="15%">Desc</th>
                                           <!--
                                            <?php if ($general_data->gst > 0) { ?>
                                                <th style="padding:1%; <?php echo $fontsize; ?>" width="6%">Before GST</th>
                                                <th style="padding:1%; <?php echo $fontsize; ?>" width="6%">GST Amount</th>
                                            <?php } ?>
                                            -->
                                            <th align="left" style="padding:1%; <?php echo $fontsize; ?>" width="6%">Total</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $total_amt = 0;
                                        $beforegstamt=0;
                                          $totgstamount=0;
                                        $search_date = (!empty($search_date)) ? $search_date : date('d-m-Y');
                                        if (count($results) > 0) {
                                            ?>
                                            <?php
                                            $i = 0;
//                                            print_r($results);
//                                            die;
                                            foreach ($results as $key => $row) :
                                                //Refund Amount
                                                $Refund = $this->daily_summary_model->get_refund_amt_by_ids($row['type_id'], $row['service_id'], $row['id'], $search_date);
                                                $gstval = 100 + $general_data->gst;
                                                if (!empty($Refund)) {
                                                    $AmtwithGst1 = (100 / $gstval) * $recentAmt;
                                                    $recentAmt = $row['amount'] - $Refund;
                                                } else {
                                                    $recentAmt = $row['amount'];
                                                    $AmtwithGst1 = $recentAmt;
                                                }



                                                if (!empty($row['gst'])) {
                                                    $AmtwithGst1 = (100 / $gstval) * $recentAmt;
                                                    $AmtwithGst = $recentAmt - $AmtwithGst1;
//                                                    $AmtwithGst = $recentAmt * ($row['gst'] / 100);
                                                    $amountval = $recentAmt - $AmtwithGst;
                                                } else {
                                                    $AmtwithGst = 0;
                                                    $amountval = $row['amount'];
                                                }
                                                $total_amt += $recentAmt;
                                                ?>
                                                <?php
                                                $mem_card_id = (!empty($row['mem_card_id'])) ? $row['mem_card_id'] : '';
                                                $auto_id = (empty($row['mem_card_id'])) ? $row['id'] : '';
                                                $emp_id = ''; // not necessary to send auto id
                                                $paymentType = $this->daily_summary_model->get_payment_details($row['type_id'], $emp_id, $search_date, $mem_card_id);
                                                ?>

                                                <?php
                                                if ((!empty($row['amount_type'])) && $row['amount_type'] == 2) {
                                                    $payType = '-';
                                                } elseif ((!empty($row['amount_type'])) && $row['amount_type'] != 2) {
                                                    $payType = $paymentType[0]['payment'];
                                                } else {
                                                    $payType = $paymentType[0]['payment'];
                                                }
                                                ?>

                                                <tr>
                                                    <td align="center" style="padding:1%; <?php echo $fontsize; ?>"><?php echo ++$i; ?></td>
                                                    <td align="center" style="padding:1%; <?php echo $fontsize; ?>"><?php echo text($row['account_code']); ?></td>
                                                    <td style="padding:1%; <?php echo $fontsize; ?>"><?php echo $row['rec_no']; ?></td>
                                                    <td width="20%" style="padding:1%; <?php echo $fontsize; ?>"><?php echo $row['name']; ?>
                                                        <?php if (!empty($row['paystr'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>;font-style: italic"><?php echo $row['paystr']; ?></span>
                                                        <?php endif; ?>
                                                        <br>
                                                        <?php if (!empty($row['fn_date'])): ?>
                                                            <span style="<?php echo $fontsize; ?>;">[<?php echo $row['fn_date']; ?>]</span>
                                                        <?php endif; ?>
                                                    </td>
                                                    <!--<td width="10%" style="padding:1%;"><?php echo $payType; ?></td>-->
                                                    <td align="center" style="padding:1%; <?php echo $fontsize; ?>;"><?php echo $row['qty']; ?></td>
                                                    <td align="right" style="padding:1%; <?php echo $fontsize; ?>;"><?php echo $row['price']; ?></td>
                                                    <td style="padding:1%; <?php echo $fontsize; ?>;"><?php echo ($row['descrip']); ?>
                                                        <?php if (!empty($row['name1'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>"><?php echo $row['name1']; ?></span>
                                                        <?php endif; ?>
                                                        <?php if (!empty($row['t_name'])): ?>
                                                            <br>
                                                            <span style="<?php echo $fontsize; ?>" class="lang-tamil"><?php echo ($row['t_name']); ?></span>
                                                        <?php endif; ?></td>
													<!--
                                                    <?php
                                                    if ($general_data->gst > 0) {
                                                        if ($row['ser_gst'] == 2) {
//                                                            echo $row['gst'];
                                                            $addval = 100 + $row['gst'];
                                                            $gstamount = $recentAmt * 100;
                                                            $gstamount = $gstamount / $addval;
//                                                            echo $gstamount;
                                                            $before_gst = $recentAmt - $gstamount;
                                                            $beforegstamt +=$gstamount;
                                                            $totgstamount +=$before_gst;
                                                            ?>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($recentAmt)) ? number_format($gstamount, 2) : '0.00'; ?></td>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($row['gst'])) ? number_format($before_gst, 2) : '0.00'; ?></td>
                                                        <?php } else {
                                                         $beforegstamt +=$amountval;
                                                         $totgstamount +=$AmtwithGst;
                                                        ?>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($recentAmt)) ? number_format($amountval, 2) : '0.00'; ?></td>
                                                            <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo (!empty($row['gst'])) ? number_format($AmtwithGst, 2) : '0.00'; ?></td>
                                                            <?php
                                                        }
                                                    }
                                                    ?>
                                                    -->
                                                    <td class="align-right" align="right" style="<?php echo $fontsize; ?>"><?php echo number_format($amountval + $AmtwithGst, 2); ?></td>
                                                </tr>

                                            <?php endforeach; ?>

                                        <?php } else { ?>
                                            <tr>
                                                <td colspan="8" style="color: #0B6CCB;"><center>No Records Found!</center></td>
                                        </tr>
                                    <?php } ?>
                                    </tbody>
                                </table>
                            <?php } else if ($dataType == 'Print Details Data' || $dataType == 'Pdf Details Data') { ?>
                                <table width="100%" border="1" cellpadding="3" cellspacing="0" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:17px; width: 100%; border-collapse:collapse;" class="filterTable" id="filterTable">
                                    <thead>
                                        <tr>
                                            <th width="6%" align="center" style="padding:1.5%; font-size: 20px;">S.No</th>
                                            <th width="13%" align="center" style="padding:1.5%; font-size: 20px;">Recpt No</th>
                                            <th width="23%" align="center" style="padding:1.5%; font-size: 20px;">Cat Name</th>
                                            <th width="20%" align="center" style="padding:1.5%; font-size: 20px;">Sub Cat Name</th>
                                            <th width="15%" align="center" style="padding:1.5%; font-size: 20px;">Payment Type</th>
                                            <th width="14%" align="center" style="padding:1.5%; font-size: 20px;">Total</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        $total_amt = 0;
                                        $search_datee = (!empty($search_date)) ? $search_date : date('d-m-Y');
                                        if (count($results) > 0) {
                                            ?>
                                            <?php
                                            $i = 0;
//                                            print_r($results);
//                                            die;
                                            foreach ($results as $key => $row) :
                                                //Refund Amount
                                                $Refund = $this->daily_summary_model->get_refund_amt_by_ids($row['type_id'], $row['service_id'], $row['id'], $search_date);

                                                if (!empty($Refund)) {
                                                    $recentAmt = $row['amount'] - $Refund;
                                                } else {
                                                    $recentAmt = $row['amount'];
                                                }
                                                $total_amt += $recentAmt;
                                                ?>
                                                <?php
                                                $mem_card_id = (!empty($row['mem_card_id'])) ? $row['mem_card_id'] : '';
                                                $auto_id = (empty($row['mem_card_id'])) ? $row['id'] : '';
                                                $paymentType = $this->daily_summary_model->get_payment_details($row['type_id'], $auto_id, $search_date, $mem_card_id);
                                                ?>

                                                <?php
                                                if ((!empty($row['amount_type'])) && $row['amount_type'] == 2) {
                                                    $payType = '-';
                                                } elseif ((!empty($row['amount_type'])) && $row['amount_type'] != 2) {
                                                    $payType = $paymentType[0]['payment'];
                                                } else {
                                                    $payType = $paymentType[0]['payment'];
                                                }
                                                ?>

                                                <tr>
                                                    <td align="center" style="padding:1.5%; font-size: 20px;"><?php echo ++$i; ?></td>
                                                    <td style="padding:1.5%; font-size: 20px;"><?php echo $row['rec_no']; ?></td>
                                                    <td width="25%" style="padding:1.5%; font-size: 20px;"><?php echo $row['cat_name']; ?></td>
                                                    <td style="padding:1.5%; font-size: 20px;"><?php echo $row['name']; ?></td>
                                                    <td style="padding:1.5%; font-size: 20px;"><?php echo $payType; ?></td>
                                                    <td align="right" style="padding:1.5%; font-size: 20px;"><?php echo number_format($recentAmt, 2); ?></td>
                                                </tr>

                                            <?php endforeach; ?>
                                        <?php } else { ?>
                                            <tr>
                                                <td colspan="6" style="color: #0B6CCB;"><center>No Records Found!</center></td>
                                        </tr>
                                    <?php } ?>
                                    </tbody>
                                </table>
                            <?php } ?>

                            <br/>

                            <table width="100%" style="font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:17px;<?php if ($dataType == 'Pdf Details Data' || $dataType == 'Pdf Summary Data'): ?><?php endif; ?> float: right;  border-collapse:collapse;" border="0" cellpadding="5" cellspacing="0">
                                <?php if($dataType == 'Print Summary Data'):
                                $font_size="font-size:18px";
                                else:
                                $font_size="font-size:14px";
                                endif;
                                ?>
                                <tbody>
                                     <tr>
                                        <td width="60%">&nbsp;</td>
                                        <td align="left" style="padding:1%; <?php echo $font_size; ?>; border:1px solid #000;">Total <?php echo ($general_data->gst > 0) ? '(with GST)' : ''; ?></td>
                                        <td style="padding:1%; <?php echo $font_size; ?>; border:1px solid #000;" align="right"><?php echo number_format($total_amt, 2); ?></td>
                                    </tr>
                                    
                                    <!--<tr>
                                        <td align="left" style="padding:1%;">Refund Amount</td>
                                    <?php #$refundAmount = $this->daily_summary_model->get_refund_amount($search_date);   ?>
                                        <td style="padding:1%;" align="right"><?php #echo $refundAmount;                                                                                                                 ?></td>
                                    </tr>-->
                                    <?php foreach($mode as $key=>$value) { ?>
                                        <?php $paidAmount = $this->daily_summary_model->get_total_paid_amt_by_type($value->id,$search_date);?>
                                        <?php if($value->payment_mode == 'cash') { 
                                                $refundAmt = $this->daily_summary_model->get_refund_amount($search_date);
                                            } else { 
                                                $refundAmt = '0.00';
                                            }
                                        ?>
                                        <tr>
                                        	<td width="60%">&nbsp;</td>
                                            <td align="left" style="padding:1%; <?php echo $font_size; ?>; border:1px solid #000;"><?php echo ucfirst($value->name);?></td>
                                            <td style="padding:1%; <?php echo $font_size; ?>; border:1px solid #000;" align="right"><?php echo (!empty($paidAmount->amount)) ? (($value->payment_mode == 'cash') ? number_format($paidAmount->amount - $refundAmt,2,'.','') :  $paidAmount->amount ) : '0.00';?></td>
                                        </tr>
                                    <?php } ?>
                                   
                                </tbody>
                            </table>
							<!--
                            <div style="clear:both;height:2em"></div>
                            <table border="0">
                                <tr>
                                    <td colspan="3">Verified By : ______________________</td>

                                    <td colspan="3">Deposited By : _______________________</td>
                                </tr>
                            </table>
                        </div>
                        -->
                    </div>


                </div><!-- /.box -->
            </div>
        </div>
    </section><!-- /.content -->
</aside><!-- /.right-side -->
<!-- ./wrapper -->
<?php if (!IS_KSK) : ?>
    <script type="text/javascript">
        window.onload = function () {
            print_layout();
        }

        $(document).ready(function () {
            $('.print').click(function () {
                print_layout();
            });
        });

        function print_layout() {
            var body = $('#print_data_container').html();
            var newWin = document.getElementById('report').contentWindow;
            newWin.document.write(body);
            newWin.document.close(); //important!
            newWin.focus(); //IE fix
            newWin.print();
            window.location.href = "<?php echo base_url(); ?>daily_summary_report"
        }

    </script>
    <?php
endif;
?>