<?
   global $vis_language;
   $paging_list='';
   for($i=0;$i<$view_info['page_count'];$i++) $paging_list.='<option value="'.$i.'" '.(($depreciation_type_info['page']==$i)?'selected="selected"':'').'>'.($i+1).'</option>';
?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6" id="url_header">
      <h3 class="m-b-xs text-black"><? echo $operation['view_title']; ?><span id="total_cnt"> (<? echo $depreciation_type_info['total']; ?>)</span></h3>
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSETTINGS'];?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li class="active"><? echo $operation['view_title']; ?></li>
      </ul>
   </div>
   <div class="col-sm-6 text-right text-left-xs m-t-lg">
	  <div class="btn-group pull-right">
			<a title="<?= $vis_language['TXTFILTERLIST']; ?>" href="javascript:void(0);" class="btn btn-default btn-sm dropdown-toggle" onclick="$('#vis_filter_list').slideToggle();"><i style="font-size:10px;" class="vh vh-filter"></i></a>
	  </div>
      <div class="btn-group pull-right">&nbsp;
         <a class="btn btn-rounded btn-primary btn-sm dropdown-toggle" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTADDDEPRECIATIONTYPE']; ?>',{'vis_module':'setting','vis_operation':'new_depreciation_type', 'cache':'true'});"><i style="font-size:10px;" class="vh vh-plus"></i>  <? echo $vis_language['TXTADD']; ?></a>
      </div>
   </div>
</section>
<div class="col-lg-12">
  <? include_once(VIS_PATH_TEMPLATE.'depreciation_type_search.php');?>
</div>
<? if($view_info['page_count']>0){
   ?>
<div  class="col-lg-12">
   <form name="vis_depreciation_type_form" id="vis_depreciation_type_form">
	   <input type="hidden" value="" name="vis_filter_enable" id="vis_filter_enable">
      <section class="panel panel-default">
         <div class="row wrapper clr" id="view_action">
            <div class="col-sm-9 tkt_left_menu">
               <div class="vis_mass_action">
                  <div class="btn-group">
                     <button class="btn bg-empty btn-sm dropdown-toggle action_btn" data-toggle="dropdown">
                     <i class="vh vh-action"></i> <span class="caret"></span>
                     </button>
                     <ul class="dropdown-menu">
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_depreciation_type_form', 'vis_switch':'depreciation_type','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_is_enable':'1'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_depreciation_type_form', 'vis_switch':'depreciation_type','vis_current_module':'<?php echo $operation['vis_current_module']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_is_enable':'0'})"><? echo $vis_language['TXTDISABLE']; ?></a></li>
                     </ul>
                  </div>
               </div>
            </div>
            <div  class="col-sm-3 text-right text-center-xs tkt_right_menu" id="paging">
               <select name="pageing" class="form-control input-sm selectpicker pull-right paging v-middle" onchange="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'setting', 'vis_operation':'view_depreciation_type', 'vis_page':this.value})">
               <? echo $paging_list;?>
               </select>
               <div class="text-muted pull-right label_page"><? echo $vis_language['TXTPAGE']; ?>:</div>
            </div>
         </div>
         <div class="table-responsive scroll-x" id="vis_depreciation_type_list">
            <? include_once(VIS_PATH_TEMPLATE.'depreciation_type_list.php'); ?>
         </div>
         <footer class="wrapper panel-footer bg-white">
            <div class="row">
               <div class="col-sm-9 tkt_left_menu">
                  <div class="vis_mass_action_footer">
                     <div class="btn-group">
                        <button type="button" class="btn bg-empty btn-sm dropdown-toggle action_btn" data-toggle="dropdown">
                        <i class="vh vh-action"></i>
                        <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_depreciation_type_form', 'vis_switch':'depreciation_type','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_is_enable':'1'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_depreciation_type_form', 'vis_switch':'depreciation_type','vis_current_module':'<?php echo $operation['vis_current_module']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_is_enable':'0'})"><? echo $vis_language['TXTDISABLE']; ?></a></li>
                        </ul>
                     </div>
                  </div>
               </div>
               <div class="col-sm-3 text-right text-center-xs tkt_right_menu" id="paging">
                  <select name="pageing" class="form-control input-sm selectpicker pull-right paging v-middle" onchange="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'setting', 'vis_operation':'view_depreciation_type', 'vis_page':this.value})">
                  <? echo $paging_list;?>
                  </select>
                  <div class="text-muted pull-right label_page"><? echo $vis_language['TXTPAGE']; ?>:</div>
               </div>
            </div>
         </footer>
      </section>
   </form>
</div>
<section class="fullFrame m-n" id="vis_no_record_search1" style="display:none;">
</section>
<script src="<?= VIS_PATH_SCRIPT; ?>dropdown_dropup.js"></script>
<script>
function vis_apply_filter(vis_page){
	vis_page = (vis_page!=undefined && typeof(vis_page)!=undefined && vis_page != '') ? vis_page:'';
	var data = {'vis_filter_enable':'1', 'vis_page':vis_page, 'vis_action': $("#vis_filter_list input, #vis_filter_list select").serialize() };
    $.ajax({
		url: 'index.php?vis_module=setting&vis_operation=view_depreciation_type',
		data: data,
		type: "POST",
		dataType: "json",
		success: function(data) {
			$("#total_cnt").html('('+data.total_cnt+')');
			$(".tkt_right_menu").html(data.paging);
			$("#vis_depreciation_type_list").html(data.list);
			$('#url_header').html('<h3 class="m-b-xs text-black"><? echo $vis_language['TXTFILTERS']; ?></h3><div><ul class="breadcrumb bg-empty no-border m-b-xxs no-padder"><li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li> <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>"><? echo $vis_language['TXTSETTINGS'];?></a></li><li><a class="link" href="#/setting/view_depreciation_type/<? echo $vis_language['TXTDEPRECIATIONTYPE'];?>" onclick="location.reload();"><? echo $vis_language['TXTDEPRECIATIONTYPE'];?></a></li><li class="active"><? echo $vis_language['TXTFILTERRESULT']; ?></li></ul></div>').show();
			if(data.total_cnt==0){
				$("#vis_no_record_search1").show();
				$("#vis_no_record_search1").html(data.list);
			}else $("#vis_no_record_search1").hide();
            toggle_mass_actions(); // To disable header & footer mass actions on list pages
		},
		error: function(xhr, ajaxOptions, thrownError) {$("#vis_global_msg_div").visInterface("load_global_message", "Error: "+xhr.status+" - "+thrownError);}
	});

}
</script>
<?
}
else
{
	 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>
