<? global $vis_language; ?>
<div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title"><? echo $title; ?></h4>
         </div>
        <div class="modal-body">
            <div class="panel" id="credit_table">
              <?php include(VIS_PATH_TEMPLATE.'manage_credit_table.php');?>
            </div>
        </div>
      
    </div>
</div>
<script>
function delete_credit(credit_id)
{
	  $.ajax({
			url: 'index.php',
			data: {'vis_module':"billing", 'vis_operation':"delete_credits",'vis_credit_type':'<?= $operation['credit_type']; ?>','vis_client_id':'<?= $operation['vis_client_id']; ?>', 'credit_id':credit_id },
			type: "POST",
			success: function(data) {
				 $("#vis_global_msg_div").visInterface("load_global_message", "<?=$vis_language['MSGSUCCOPRT'];?>");
				 $("#short_summary").visExecution("load_area",{"vis_module":"client", "vis_operation":"display_short_summary", "vis_client_id": "<?= $operation['vis_client_id']; ?>"});	
				 if(data != -1)
				 { $('#credit_table').html(data);
				 }
				 else
				 {
					$(".modal").modal("toggle");
					window.location.reload();
				 }
				
			}
		});
}

</script>
