Department,Config Screen and Company Master screen added:
This commit is contained in:
parent
c1231a44dd
commit
3a91a90962
618
application/views/addconfig.php
Normal file
618
application/views/addconfig.php
Normal file
@ -0,0 +1,618 @@
|
||||
<script>
|
||||
$(function() {
|
||||
var d = new Date();
|
||||
|
||||
var month = d.getMonth();
|
||||
var day = d.getDate();
|
||||
var year = d.getFullYear() ;
|
||||
var SIAStartYear = year - 2015;
|
||||
var mindt = year-70;
|
||||
var maxdt = year-15;
|
||||
|
||||
|
||||
$("#AddYear").datepicker({
|
||||
minDate : new Date(year-SIAStartYear,1,1),
|
||||
maxDate :new Date(year+3,1,1),
|
||||
dateFormat: 'yy', changeYear: true,
|
||||
|
||||
});
|
||||
$("#EditYear").datepicker({
|
||||
minDate : new Date(year-SIAStartYear,1,1),
|
||||
maxDate :new Date(year+3,1,1),
|
||||
dateFormat: 'yy', changeYear: true,
|
||||
|
||||
|
||||
});
|
||||
|
||||
//$('#selectDistriList').multiSelect();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.ui-datepicker-month {
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker-prev{
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker-next{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height: 537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Add Configuration List</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-primary" value="Back">Back</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left addconfig ','name' => 'addconfig','id' => 'addconfig');
|
||||
|
||||
echo form_open($this->config->base_url().'addNewconfig/',$attributes); ?>
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Configuration ID</label>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid'),'id'=>'Configid', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Configuration Name</label>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'configurationname','value' => set_value('configurationname'),'id'=>'configurationname', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Comments</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Comments','value' => set_value('Comments'),'id'=>'Comments', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div col="row">
|
||||
<div style="text-align:right">
|
||||
<a data-toggle="modal" href="#AddConfiguration" style="margin-right: 10px;" class="btn btn-primary"><i class="fa fa-plus"></i> Add Configuration</a>
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="AddConfiguration" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">
|
||||
<center> Add Configuration</center>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
Configuration Value :
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
|
||||
<input class="form-control" name="ConfigValue" class="form-control" id="ConfigValue" type="text">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal Footer -->
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary font tempClick" ID="tempClick" style="margin-top: -24px;"><i class="fa fa-plus"></i> <span class="bold">Add</span></a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table id="configtable" class="table table-striped responsive-utilities jambo_table" >
|
||||
<thead style="background-color: #CFCFCF;">
|
||||
|
||||
<th>S.NO</th>
|
||||
<th>Configuration Value</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
|
||||
<tbody id="tempAppend">
|
||||
|
||||
<!--<tr>
|
||||
<td>001</td>
|
||||
<td>100</td>
|
||||
|
||||
<td>
|
||||
<a data-toggle="modal" href="#Edit"><i class="fa fa-pencil"></i> </a>
|
||||
<a><i class="fa fa-trash"></i> </a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>-->
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<input type="hidden" name="newhidden" id="newhidden" />
|
||||
|
||||
<!-- Modal For edit -->
|
||||
<div class="modal fade" id="Edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">
|
||||
<center> Edit Configuration</center>
|
||||
</h4>
|
||||
</div>
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
Budget Amount :
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<?php
|
||||
$data = array('name' => 'ConfigValue', 'value' => set_value('ConfigValue'),'id'=>'ConfigValue', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal Footer -->
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary font tempClickEdit" ID="tempClickEdit" style="margin-top: -24px;"><i class="fa fa-plus"></i> <span class="bold">Edit</span></a>
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content"></div>
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<!--<input type="text" name="txtRowCount" id="txtRowCount" />-->
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||||
|
||||
<a href="" class="btn btn-primary" id="cancel" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script type="text/html" id="tempList">
|
||||
<tr id="<%=index%>">
|
||||
|
||||
<?php
|
||||
$data = array('name' => '"ConfigValue[<%=index%>][index]"', 'value' => set_value('<%=index%>'),'id'=>'"ConfigValue[<%=index%>][index]"', 'class' => 'form-control','type'=>'hidden');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<td align="left"><%=index%></td>
|
||||
<td align="left"><%=ConfigValue%></td>
|
||||
|
||||
|
||||
<td>
|
||||
<a data-target='#Edit' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#Edit"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ConfigValue%> Budget details"></i> </a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
<script>
|
||||
var index = '1';
|
||||
var numbers = /^[0-9]+$/;
|
||||
var userid = '';
|
||||
|
||||
$("#Edit").on("shown.bs.modal", function(e) {
|
||||
//alert();
|
||||
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
|
||||
var s = $('#ConfigValue').val($('#configtable tr:eq('+ userid +') td:eq(0)').text());
|
||||
alert(s);
|
||||
});
|
||||
|
||||
|
||||
$('.tempClick').click(function(){
|
||||
|
||||
// if ($("#Addbudget option:selected").val() =='-1' )
|
||||
// {
|
||||
// alert('Please Select the Budget Type ');
|
||||
// //return;
|
||||
// }
|
||||
|
||||
// if(document.getElementById('AddYear').value == '' )
|
||||
// {
|
||||
// alert('Please Enter the Budget Year');
|
||||
// //return;
|
||||
// }
|
||||
// if(document.getElementById('AddAmout').value == '' )
|
||||
// {
|
||||
// alert('Please Enter the Budget Amount');
|
||||
// // return;
|
||||
// }
|
||||
|
||||
|
||||
if ($("#ConfigValue").val() !='-1')
|
||||
{
|
||||
|
||||
$('#ConfigValue').show();
|
||||
var temp = index;
|
||||
var ConfigValue = $("#ConfigValue").val();
|
||||
|
||||
|
||||
|
||||
$('#ConfigValue').val('');
|
||||
|
||||
|
||||
index = parseInt(index)+1;
|
||||
|
||||
|
||||
|
||||
var template = jQuery("#tempList").html();
|
||||
|
||||
|
||||
$('#tempAppend').append(_.template(template,{index:temp,ConfigValue:ConfigValue}));
|
||||
|
||||
|
||||
var theForm = $(".addconfig");
|
||||
|
||||
addHidden(theForm,"ConfigValue"+temp,ConfigValue);
|
||||
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
|
||||
//CountRows();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please enter all the values');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function addHidden(theForm, key, value) {
|
||||
// Create a hidden input element, and append it to the form:
|
||||
var input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = key;'name-as-seen-at-the-server';
|
||||
input.value = value;
|
||||
theForm.append(input);
|
||||
}
|
||||
|
||||
|
||||
$('.tempClickEdit').click(function(){
|
||||
|
||||
|
||||
|
||||
// if(document.getElementById('EditYear').value == '' )
|
||||
// {
|
||||
// alert('Please Enter the Budget Year');
|
||||
// //return;
|
||||
// }
|
||||
// if(document.getElementById('EditAmout').value == '' )
|
||||
// {
|
||||
// alert('Please Enter the Budget Amount');
|
||||
// // return;
|
||||
// }
|
||||
|
||||
|
||||
if ( $('#EditAmout').val() != '' && $('#EditYear').val() != '' )
|
||||
{
|
||||
|
||||
var temp = index;
|
||||
var ConfigValue = $("#ConfigValue").val();
|
||||
|
||||
|
||||
$('#configtable tr:eq('+ userid +') td:eq(1)').text(ConfigValue);
|
||||
|
||||
|
||||
$('#ConfigValue'+userid).val(ConfigValue);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please enter all the values');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function ConfirmDelete()
|
||||
{
|
||||
var x = confirm("Are you sure you want to delete?");
|
||||
if (x)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function Rowcount()
|
||||
{
|
||||
var rowCount = $('#configtable').length;
|
||||
if(rowCount=='4')
|
||||
{
|
||||
$("#AddConfiguration").modal('hide');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$("#AddConfiguration").modal('show');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var totalRowCount = 0;
|
||||
var rowCount = 0;
|
||||
var table = document.getElementById("configtable");
|
||||
var rows = table.getElementsByTagName("tr");
|
||||
|
||||
function CountRows() {
|
||||
totalRowCount = 0;
|
||||
rowCount = 0;
|
||||
table = document.getElementById("ConfigValue");
|
||||
rows = table.getElementsByTagName("tr")
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
totalRowCount++;
|
||||
if (rows[i].getElementsByTagName("td").length > 0) {
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var message = "Total Row Count: " + totalRowCount;
|
||||
message += "\nRow Count: " + rowCount;
|
||||
//alert(message);
|
||||
if(totalRowCount>"4")
|
||||
{
|
||||
$("#AddConfiguration").modal('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#addPop').click(function () {
|
||||
if ($('#distriList option:selected').val() != null) {
|
||||
var tempSelect = $('#distriList option:selected').val();
|
||||
var tempText = $('#distriList option:selected').text();
|
||||
|
||||
var o = new Option(tempText,tempSelect);
|
||||
var hidval = tempSelect;
|
||||
var orgVal = $('#txtSelectedDepartment').val();
|
||||
var Selectedval = ''
|
||||
|
||||
if(orgVal != '')
|
||||
{
|
||||
Selectedval = orgVal + ':' + hidval;
|
||||
}
|
||||
else
|
||||
{
|
||||
Selectedval = hidval
|
||||
}
|
||||
$('#txtSelectedDepartment').val(Selectedval);
|
||||
|
||||
$(o).html(tempText);
|
||||
$("#selectDistriList").append(o);
|
||||
|
||||
|
||||
$('#distriList option:selected').remove();
|
||||
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||
|
||||
tempSelect = '';
|
||||
tempText = '';
|
||||
Selectedval = '';
|
||||
} else {
|
||||
alert("Before add please select any position.");
|
||||
}
|
||||
});
|
||||
|
||||
$('#removePop').click(function () {
|
||||
if ($('#selectDistriList option:selected').val() != null) {
|
||||
|
||||
Selectedval ='';
|
||||
$('#txtSelectedDepartment').val(Selectedval);
|
||||
|
||||
var tempSelect = $('#selectDistriList option:selected').val();
|
||||
$('#selectDistriList option:selected').remove().appendTo('#distriList');
|
||||
$("#selectDistriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||
$("#distriList").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected");
|
||||
|
||||
$("#distriList").val(tempSelect);
|
||||
tempSelect = '';
|
||||
} else {
|
||||
alert("Before remove please select any position.");
|
||||
}
|
||||
});
|
||||
|
||||
var baseurl = "<?php print base_url(); ?>";
|
||||
$(".addCost").submit(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
if(validate())
|
||||
{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.addCost').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>configurationctrl/addNewconfig",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtSelectedDepartment').val('');
|
||||
$('#txtRowCount').val('');
|
||||
|
||||
window.location = baseurl + 'CostCenter/CostListing';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function validate()
|
||||
{
|
||||
|
||||
|
||||
if($("#txtSelectedDepartment").val().length < 1)
|
||||
{
|
||||
alert('Please Select Department');
|
||||
return false;
|
||||
}
|
||||
else if($("#txtRowCount").val().length < 1)
|
||||
{
|
||||
alert('Please Add Budget');
|
||||
return false;
|
||||
}
|
||||
else if($("option:selected", $("#ApprovedBy")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Approver Names');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
235
application/views/adddepartment.php
Normal file
235
application/views/adddepartment.php
Normal file
@ -0,0 +1,235 @@
|
||||
|
||||
<script>
|
||||
|
||||
//Email Validate
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function blockKeyPress(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
alert(charCode);
|
||||
if(charCode == 8 || charCode == 46 )
|
||||
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//PAN Validate
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function onlyAlphabets(evt) {
|
||||
var charCode;
|
||||
if (window.event)
|
||||
charCode = window.event.keyCode; //for IE
|
||||
else
|
||||
charCode = evt.which; //for firefox
|
||||
if (charCode == 32) //for <space> symbol
|
||||
return true;
|
||||
if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
return false;
|
||||
if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
return false;
|
||||
if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var d = new Date();
|
||||
|
||||
var month = d.getMonth();
|
||||
var day = d.getDate();
|
||||
var year = d.getFullYear() ;
|
||||
var SIAStartYear = year - 2015;
|
||||
var mindt = year-70;
|
||||
var maxdt = year-15;
|
||||
|
||||
$("#dateofCST").datepicker({
|
||||
//minDate : new Date(year-30,1,1),
|
||||
maxDate :'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
legend{
|
||||
color:#00c0ef ! important;
|
||||
}
|
||||
|
||||
.pad{
|
||||
padding-bottom:1%;
|
||||
}
|
||||
.badge
|
||||
{
|
||||
color:red; background-color:#fff;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center> Siddharth Industries - New Department Details</center>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>departmentListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<!-- form start -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1" style="border:3px solid #3c8dbc;">
|
||||
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewdepartment" method="post" role="form">
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Department Information</legend>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<span for="DepartmentName">Department Name</span><span class="badge">*</span>
|
||||
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required>
|
||||
|
||||
</div>
|
||||
|
||||
<!--div class="col-md-3 pad">
|
||||
<span for="DEPCode">Department Code</span><span class="badge">*</span>
|
||||
<input type="text" name="DEPCode" id="DEPCode" class="form-control" >
|
||||
</div>-->
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<span for="HeadDept">Head Department</span>
|
||||
<select class="form-control required" id="HeadDept" name="HeadDept">
|
||||
<option value="-1" required>Select Department Code</option>
|
||||
<?php
|
||||
if(!empty($depcode))
|
||||
{
|
||||
foreach ($depcode as $DC)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $DC->HeadDept?>"><?php echo $DC->HeadDept ?> </option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-offset-1 col-md-2">
|
||||
<div class="form-group">
|
||||
<span for="Active">IsActive</span> <br>
|
||||
<input type="checkbox" id="IsActive" name="IsActive" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Address Section -->
|
||||
<!-- Form Name -->
|
||||
|
||||
<!-- Text input-->
|
||||
<!-- <div class="col-md-3 pad">
|
||||
<span for="EmailAddress">CreatedBY</span><span class="badge">*</span>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="EmailAddress">CreatedDate</span><span class="badge">*</span>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
|
||||
</div>-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
<input type="submit" onclick="return Validat();" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
658
application/views/companyview.php
Normal file
658
application/views/companyview.php
Normal file
@ -0,0 +1,658 @@
|
||||
<?php
|
||||
$CompID = '';
|
||||
$CompanyName= '';
|
||||
$Address = '';
|
||||
$ContactNumber = '';
|
||||
$AlternateContactNumber = '';
|
||||
$EmailAddress = '';
|
||||
$Exiseregistration = '';
|
||||
$TIN = '';
|
||||
$PAN = '';
|
||||
$GSTNO = '';
|
||||
$GSTRange = '';
|
||||
$CollectrateAddress = '';
|
||||
$UANumber = '';
|
||||
$PaymentTerms = '';
|
||||
$PaymentDays = '';
|
||||
$PayableAT = '';
|
||||
$Createdby = '';
|
||||
$CreatedDate = '';
|
||||
$UpdatedBy = '';
|
||||
$Updatedon = '';
|
||||
$ProfilePic = '';
|
||||
$companywebsite ='';
|
||||
$ceoname='';
|
||||
$companystartedon='';
|
||||
$partnerdetails='';
|
||||
$firstname = '';
|
||||
//$files ='';
|
||||
$financialyear='';
|
||||
$filename='';
|
||||
$ID='';
|
||||
$filedescription1='';
|
||||
$financialstart='';
|
||||
$financialend='';
|
||||
//print_r($userRecords);die();
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
foreach ($userRecords as $uf)
|
||||
{
|
||||
$CompID = $uf->CompID;
|
||||
$CompanyName = $uf->CompanyName;
|
||||
$Address = $uf->Address;
|
||||
$ContactNumber = $uf->ContactNumber;
|
||||
$AlternateContactNumber = $uf->AlternateContactNumber;
|
||||
$EmailAddress= $uf->EmailAddress;
|
||||
$Exiseregistration= $uf->Exiseregistration;
|
||||
$TIN = $uf->TIN;
|
||||
$PAN= $uf->PAN;
|
||||
$GSTNO = $uf->GSTNO;
|
||||
$GSTRange = $uf->GSTRange;
|
||||
$CollectrateAddress = $uf->CollectrateAddress;
|
||||
$UANumber = $uf->UANumber;
|
||||
$PaymentTerms = $uf->PaymentTerms ;
|
||||
$PaymentDays = $uf->PaymentDays ;
|
||||
$PayableAT = $uf->PayableAT ;
|
||||
$Createdby = $uf->Createdby;
|
||||
//$CreatedDate = $uf->CreatedDate;
|
||||
$UpdatedBy = $uf->UpdatedBy;
|
||||
$Updatedon = $uf->Updatedon;
|
||||
$ProfilePic = $uf->ProfilePic;
|
||||
//$companywebsite = $uf->companywebsite;
|
||||
//$ceoname = $uf->ceoname;
|
||||
//$mdname = $uf->mdname;
|
||||
//$companystartedon = $uf->companystartedon;
|
||||
//$partnerdetails = $uf->partnerdetails;
|
||||
$firstname = $uf->firstname;
|
||||
$financialstart= $uf->FiscalYearStartOn;
|
||||
$financialend= $uf->FiscalYearEndsOn;
|
||||
//$files = $uf->files;
|
||||
//$financialyear = $uf->financialyear;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($filenames))
|
||||
{
|
||||
foreach ($filenames as $uf)
|
||||
{
|
||||
$filedescription1=$uf->filedescription;
|
||||
$filename=$uf->filename;
|
||||
$createdDate=$uf->createdDate;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
function readURL(input,num) {
|
||||
|
||||
if (num==0)
|
||||
{
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#profilepicture')
|
||||
.attr('src', e.target.result)
|
||||
.width(166)
|
||||
.height(166);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function (e) {
|
||||
$('#file')
|
||||
.attr('src', e.target.result)
|
||||
.width(166)
|
||||
.height(166);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
function validateEmail() {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
|
||||
var email = $('#EmailAddress').val();
|
||||
if(email != "")
|
||||
{
|
||||
if (reg.test(email) == false)
|
||||
{
|
||||
alert('Please Enter Valid Email Address');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function validatePAN() {
|
||||
var reg = /(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}$/;
|
||||
|
||||
var PAN = $('#PAN').val();
|
||||
|
||||
if(PAN != '')
|
||||
{
|
||||
if (reg.test(PAN) == false)
|
||||
{
|
||||
alert('Please Enter Valid PAN Number');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function validateGST() {
|
||||
var reg = /(?=.*[0-9]).{2}(?=.*[A-Z]).{5}(?=.*[0-9]).{4}(?=.*[A-Z]).{1}(?=.*[0-9]).{1}(?=.*[Z]).{1}(?=.*[0-9]).{1}$/;
|
||||
//alert('gst');
|
||||
var GST = $('#GSTNO').val();
|
||||
|
||||
if(GST != '')
|
||||
{
|
||||
if (reg.test(GST) == false)
|
||||
{
|
||||
alert('Please Enter Valid GST Number Format should be 22AAAAA1111S1Z1');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please Enter GST Number');
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var selDiv = "";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", init, false);
|
||||
|
||||
function getMobileValidation()
|
||||
{
|
||||
var contactNumber = $('#ContactNumber').val().length;
|
||||
if(contactNumber < 10)
|
||||
{
|
||||
alert('Please Enter valid Contact Number');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
legend{
|
||||
color:#00c0ef ! important;
|
||||
}
|
||||
.form-group
|
||||
{
|
||||
padding-bottom:4%;
|
||||
}
|
||||
.pad{
|
||||
padding-bottom:1%;
|
||||
}
|
||||
.badge
|
||||
{
|
||||
color:red; background-color:#fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<CENTER>Siddharth Industries Company Profile</CENTER>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<br/>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
<div class="box box-primary">
|
||||
<!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
|
||||
<form role="form" id="addemployee" action="<?php echo base_url()?>Updatecompany" method="post" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1" style="border:3px solid #3c8dbc;">
|
||||
<form class="form-horizontal" role="form" >
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Company Information</legend>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="box-header">
|
||||
<img id="profilepicture" src="<?php echo base_url().'uploads/images/'.$ProfilePic ; ?>" alt="your image" style="width: 139px;"/><br/>
|
||||
<input type='file' input accept=".JPG,.PNG" onchange="readURL(this,0);" id="photo" value="<?php echo $ProfilePic ;?>" name="photo"/>
|
||||
<label for="photo">Select Company Logo<br/><small>(only .jpg or .png)</small></label>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<span>CompanyID</span><span class="badge">*</span>
|
||||
<input type="text" name="CompanyID" maxlength="100" id="CompanyID" value="<?php echo $CompID;?>" class="form-control" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 pad"><span>CompanyName</span><span class="badge">*</span>
|
||||
<input type="text" name="CompanyName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="CompanyName" class="form-control" required value="<?php echo $CompanyName;?>">
|
||||
</div>
|
||||
|
||||
<!--<div class="col-md-6 pad"><span>Address</span><span class="badge">*</span>
|
||||
<input type="text" name="Address" onkeypress="return onlyAlphabets(event);" maxlength="100" id="Address" class="form-control" required>
|
||||
</div>-->
|
||||
|
||||
<div class="col-md-6 pad"><span>ContactNumber</span><span class="badge">*</span>
|
||||
<input type="text" name="ContactNumber" onchange="getMobileValidation();" id="ContactNumber" maxlength="200"
|
||||
class="form-control" value="<?php echo $ContactNumber;?>" required>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 pad"><span>AlternateContactNumber</span><span class="badge">*</span>
|
||||
<input type="text" name="AlternateContactNumber" onchange="getMobileValidation();" id="AlternateContactNumber" maxlength="200"
|
||||
class="form-control" value="<?php echo $AlternateContactNumber;?>" required>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 pad"><span>Email Address</span>
|
||||
<input type="email" name="EmailAddress" onchange="validateEmail();"id="EmailAddress" class="form-control" value="<?php echo $EmailAddress;?>" required>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 pad"><span>ExiseRegistration</span><span class="badge">*</span>
|
||||
<input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $Exiseregistration ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Financial Year StartON</span><span class="badge">*</span>
|
||||
<input type="date" name="financialstart" id="financialstart" maxlength="100" class="form-control" value="<?php echo $financialstart ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Financial Year EndON</span><span class="badge">*</span>
|
||||
<input type="date" name="financialend" id="financialend" maxlength="100" class="form-control" value="<?php echo $financialend ;?>" required>
|
||||
</div>
|
||||
<!--<div class="col-md-6 pad"><span>Companywebsite</span><span class="badge">*</span>
|
||||
<input type="text" name="companywebsite" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $companywebsite ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>CEO Name</span><span class="badge">*</span>
|
||||
<input type="text" name="ceoname" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $ceoname ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>MD Name</span><span class="badge">*</span>
|
||||
<input type="text" name="mdname" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $mdname ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Company Started ON</span><span class="badge">*</span>
|
||||
<input type="text" name="companystartedon" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $companystartedon ;?>" required>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Partner Details</span><span class="badge">*</span>
|
||||
<input type="text" name="partnerdetails" id="ExiseRegistration1" maxlength="100" class="form-control" value="<?php echo $partnerdetails ;?>" required>
|
||||
</div>-->
|
||||
|
||||
<!-- <div class="col-md-6 pad">
|
||||
<div class="row">
|
||||
<div class="col-md-6"><span>Financial Year StartOn</span><span class="badge">*</span> <input type="date" name="financialyear" id="financialyear" maxlength="100" class="form-control" value="<?php echo $financialyear ;?>" required></div>
|
||||
<div class="col-md-6"><span>Financial Year EndOn</span><span class="badge">*</span> <input type="date" name="financialyear" id="financialyear" maxlength="100" class="form-control" value="<?php echo $financialyear ;?>" required></div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Address Section -->
|
||||
<!-- Form Name -->
|
||||
<legend>Address Details</legend>
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<div class="col-md-12"><span>Address</span><span class="badge">*</span>
|
||||
<input type="text" id="Address" required name="Address" maxlength="500" class="form-control" value="<?php echo $Address;?>" required>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Text input-->
|
||||
|
||||
<!-- Text input-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- profile Section -->
|
||||
<!-- Form Name -->
|
||||
<legend>Tax Related Data</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-3">
|
||||
<span for="payablefrom" style="width =25%";>Payable Terms</span>
|
||||
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||
<option value="Date of invoice" >Select Payment method</option>
|
||||
<?php
|
||||
if(!empty($payment))
|
||||
{
|
||||
foreach ($payment as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-md-3">
|
||||
<span for="PayableAT">Payable AT</span>
|
||||
<input type="text" class="form-control required" id="PayableAT" name="PayableAT" value="<?php echo $PayableAT;?>" required>
|
||||
</div>-->
|
||||
|
||||
<!-- <div class="col-md-3"><span>Payment Date</span><br/>
|
||||
<label class="radio-inline"><input type="radio" name="PaymentDays" value="Before">Before</label>
|
||||
<label class="radio-inline"><input type="radio" name="PaymentDays" value="After">After</label>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--<div class="form-group">
|
||||
<div class="col-md-3"><span>Created BY</span>
|
||||
<input type="text" id="Createdby" name="createdname" maxlength="10" onkeypress="return isNumberKey(event)" class="form-control" value="<?php echo $firstname;?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-3"><span>Create date</span>
|
||||
<input type="text" id="CreatedDate" name="CreatedDate" maxlength="100" class="form-control" value="<?php echo $CreatedDate;?>" readonly>
|
||||
</div>-->
|
||||
|
||||
|
||||
<legend>ID Proof</legend>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3"><span>UANumber</span>
|
||||
<input type="text" id="UANumber" name="UANumber" maxlength="10" onkeypress="return isNumberKey(event)" class="form-control" value="<?php echo $UANumber;?>" required>
|
||||
</div>
|
||||
<div class="col-md-3"><span>TIN Number</span>
|
||||
<input type="text" id="TIN" name="TIN" maxlength="12" class="form-control" value="<?php echo $TIN;?>" required>
|
||||
</div>
|
||||
<div class="col-md-3"><span>PAN Number</span>
|
||||
<input type="text" id="PAN" maxlength="10" name="PAN" onchange="validatePAN();" class="form-control" value="<?php echo $PAN;?>" required>
|
||||
</div>
|
||||
<div class="col-md-3"><span>GST NO</span>
|
||||
<input type="text" id="GSTNO" maxlength="15" onchange="validateGST();" name="GSTNO" class="form-control" value="<?php echo $GSTNO;?>" required pattern="(?=.*[0-9]).{2}(?=.*[A-Z]).{5}(?=.*[0-9]).{4}(?=.*[A-Z]).{1}(?=.*[0-9]).{1}(?=.*[Z]).{1}(?=.*[0-9]).{1}" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and should be 'Z' only and 1 Number">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"><span>GST Range</span>
|
||||
<input type="text" id="addqualification" name="GSTRange" maxlength="100" class="form-control" value="<?php echo $GSTRange;?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9"><span>Collectrate Address</span><span class="badge">*</span>
|
||||
<input type="text" id="permanentaddress" required name="CollectrateAddress" maxlength="500" class="form-control" value="<?php echo $CollectrateAddress;?>" required >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<legend>Upload File</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-3"><span>File Description</span>
|
||||
|
||||
<select class="form-control required" id="filedescription" name="filedescription">
|
||||
<option value="CERTIFICATION" >Select File Type</option>
|
||||
<?php
|
||||
if(!empty($filetype))
|
||||
{
|
||||
foreach ($filetype as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<div class="col-md-3" "box-header">
|
||||
|
||||
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG" onchange="readURL(this,1);" id="images" name="images"/>
|
||||
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
|
||||
<input type="submit" onclick="valid();" class="btn btn-info" value="Submit" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>filedescription</th>
|
||||
<th>filename</th>
|
||||
<th>uploadedby</th>
|
||||
<th>uploadedon</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($filenames))
|
||||
{
|
||||
|
||||
foreach ($filenames as $uf)
|
||||
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td ><?php echo $uf->filedescription ?></td>
|
||||
<td><?php echo $uf->filename ?></a></td>
|
||||
<td><?php echo $firstname;?></td>
|
||||
<td><?php echo $uf->createdDate ?></td>
|
||||
<td>
|
||||
<!--<a href="<?php echo base_url().'user/editOld?UID='.$uf->filename;?>"><i class="fa fa-pencil"></i> </a>-->
|
||||
<a onclick="deletefile(<?php echo $uf->ID;?>)"><i class="fa fa-trash"></i> </a>
|
||||
<a href=<?php echo base_url().'uploads/files/'?><?php echo $uf->filename ?>><i class="fa fa-download" ></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
|
||||
<script>
|
||||
function deletefile(filename)
|
||||
{
|
||||
var answer = confirm(" Do you want to delete the user from the List?")
|
||||
if (answer)
|
||||
{
|
||||
$.ajax({
|
||||
data:{id:filename},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>companycontroller/deletefile",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
|
||||
location.reload();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
||||
function valid(){
|
||||
|
||||
|
||||
if($("#EmailAddress").val().length < 1)
|
||||
{
|
||||
alert('Please Enter Email ID');
|
||||
return false;
|
||||
}
|
||||
else if(!validateEmail())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if($("#PAN").val().length < 1)
|
||||
{
|
||||
alert('Please Enter PAN ID');
|
||||
return false;
|
||||
}
|
||||
else if(!validatePAN())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( $('#ContactNumber').val().length < 1 )
|
||||
{
|
||||
alert('Please Enter Contact Number');
|
||||
return false;
|
||||
}
|
||||
else if(!getMobileValidation())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( $('#AlternateContactNumber').val().length < 1 )
|
||||
{
|
||||
alert('Please Enter AlternateContactNumber Number');
|
||||
return false;
|
||||
}
|
||||
else if(!getMobileValidation())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if(!validateGST())
|
||||
{
|
||||
$('#GSTNO').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
74
application/views/configlisting.php
Normal file
74
application/views/configlisting.php
Normal file
@ -0,0 +1,74 @@
|
||||
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Configuration Details</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Configuration ID</th>
|
||||
<th>Configuration Name</th>
|
||||
<th>Description</th>
|
||||
<th>Create Date</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
foreach($userRecords as $record)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><?php echo $record->Config_ID?></td>
|
||||
<td><?php echo $record->ConfigName ?></td>
|
||||
<td><?php echo $record->Comments ?> </td>
|
||||
<td><?php echo $record->CreatedDate?></td>
|
||||
<td><a href="<?php echo base_url().'Configurationctrl/editOldconfig?ConfigID='.$record->Config_ID; ?>"><i class="fa fa-pencil"></i> </a>
|
||||
<a><i class="fa fa-trash"></i> </a></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#configtable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
85
application/views/departmentListing.php
Normal file
85
application/views/departmentListing.php
Normal file
@ -0,0 +1,85 @@
|
||||
<script>
|
||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-8'i><'col-sm-4'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries -Department Details</center>
|
||||
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-info" href="<?php echo base_url(); ?>adddepartment">Add New department</a>
|
||||
<!--<a class="btn btn-info" href="<?php echo base_url(); ?>supplier/export_supplierdetails">Export department details <i class="fa fa-download"aira-hidden="true"></i></a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>department code</th>
|
||||
<th >Dapartmentname</th>
|
||||
<th>head deapartment</th>
|
||||
<th>IsActive</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
foreach($userRecords as $record)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td title="<?php echo $record->DEPCode; ?> - Click here to view department details"><?php echo $record->DEPCode ?> </td>
|
||||
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<td><?php echo $record->HeadDept ?></td>
|
||||
<td><?php echo $record->IsActive ?></td>
|
||||
|
||||
<td><a href="<?php echo base_url().'editOlddepartment/?SID='.$record->DEPCode?>" data-toggle="tooltip" - Click here to view department details"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i> </a></td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
428
application/views/editconfig.php
Normal file
428
application/views/editconfig.php
Normal file
@ -0,0 +1,428 @@
|
||||
<?php
|
||||
|
||||
$Configid = '';
|
||||
$ConfigName = '';
|
||||
$Comments = '';
|
||||
$ConfigValue ='';
|
||||
$Key = '';
|
||||
|
||||
|
||||
if(!empty($master))
|
||||
{
|
||||
foreach ($master as $con)
|
||||
{
|
||||
//print_r($config);die();
|
||||
$Configid= $con->Config_ID;
|
||||
|
||||
$ConfigName = $con->ConfigName;
|
||||
$Comments = $con->Comments;
|
||||
//$ConfigValue = $con->ConfigValue;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($master))
|
||||
{
|
||||
foreach ($child as $con)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.ui-datepicker-month {
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker-prev{
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker-next{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height: 537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Config Details</center>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-primary" value="Back">Back</a>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<!-- form start -->
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left EditConfig ','name' => 'EditConfig','id' => 'EditConfig');
|
||||
|
||||
echo form_open($this->config->base_url().'configedit/',$attributes); ?>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="CostName">Configuration ID </label><font color="Red">*</font>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid',$Configid),'id'=>'Configid', 'class' => 'form-control' ,'required' => 'true','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="Description">Configuration Name</label><font color="Red">*</font>
|
||||
<div class="form-group" >
|
||||
<?php
|
||||
$data = array('name' => 'ConfigName','value' => set_value('ConfigName',$ConfigName),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="Description">Comments</label><font color="Red">*</font>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks',$Comments),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
<!-- Modal Footer -->
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table id="configtable" class="table table-striped responsive-utilities jambo_table" >
|
||||
<thead style="background-color: #CFCFCF;">
|
||||
|
||||
<th>S.NO</th>
|
||||
<th>Config ID</th>
|
||||
<th>Config Value</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody id="tempAppend">
|
||||
<?php if(!empty($master && $child))
|
||||
{
|
||||
$index =0;
|
||||
foreach ($child as $con)
|
||||
|
||||
|
||||
{
|
||||
?>
|
||||
<?php $index=$index+1;?>
|
||||
<input type="hidden" name ="Key<?php echo $index?>" id="<?php echo $index?>" value="<?php echo $index?>">
|
||||
<input type="hidden" name ="DbKey<?php echo $index?>" id="DbKey<?php echo $index?>" value="<?php echo $con->Key?>">
|
||||
<input type="hidden" name ="configID<?php echo $index?>" id="configID<?php echo $index?>" value="<?php echo $con->Config_ID?>">
|
||||
<input type="hidden" name ="configVal<?php echo $index?>" id="configVal<?php echo $index?>" value="<?php echo $con->ConfigValue?>">
|
||||
|
||||
|
||||
<tr><td><?php echo $index;?></td><td><?php echo $con->Config_ID;?></td><td><?php echo $con->ConfigValue;?></td><td><a data-target='#Edit' data-id="<?php echo $index;?>" data-userid="<?php echo $index;?>" data-toggle="modal" href="#Edit"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the Budget details"></i> </a></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index ?>" />
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<!-- Modal For edit -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="Edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">
|
||||
<center> Edit Config</center>
|
||||
</h4>
|
||||
</div>
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
S.NO :
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<?php
|
||||
$data = array('name' => 'key', 'value' => set_value('key'),'id'=>'key', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
Config ID :
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<?php
|
||||
$data = array('name' => 'Config_ID', 'value' => set_value('Config_ID'),'id'=>'Config_ID', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
Config Value :
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<?php
|
||||
$data = array('name' => 'ConfigValue', 'value' => set_value('ConfigValue'),'id'=>'ConfigValue', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- Modal Footer -->
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary font tempClickEdit" ID="tempClickEdit" style="margin-top: -24px;"><i class="fa fa-plus"></i> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="hidden" name="txtSelectedDepartment" id="txtSelectedDepartment" />
|
||||
<input type="submit" class="btn btn-primary" value="Update" />
|
||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-primary" id="cancel" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var index = $('#txtRowCount').val();
|
||||
var userid = '';
|
||||
|
||||
$("#Edit").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
//alert(userid);
|
||||
$('#key').val($('#configtable tr:eq('+ userid +') td:eq(0)').text());
|
||||
$('#Config_ID').val($('#configtable tr:eq('+ userid +') td:eq(1)').text());
|
||||
$('#ConfigValue').val($('#configtable tr:eq('+ userid +') td:eq(2)').text());
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function addHidden(theForm, key, value) {
|
||||
// Create a hidden input element, and append it to the form:
|
||||
var input = document.createElement('input');
|
||||
input.type = 'hidden';
|
||||
input.name = key;'name-as-seen-at-the-server';
|
||||
input.value = value;
|
||||
theForm.append(input);
|
||||
}
|
||||
|
||||
|
||||
$('.tempClickEdit').click(function()
|
||||
{
|
||||
if ( $('#Config_ID').val() != '' && $('#ConfigValue').val() != '' )
|
||||
{
|
||||
|
||||
var temp = index;
|
||||
|
||||
var ConfigID = $("#Config_ID").val();
|
||||
var ConfigValue = $("#ConfigValue").val();
|
||||
//alert(ConfigValue);
|
||||
$('#configVal'+userid).val(ConfigValue);
|
||||
$('#configtable tr:eq('+ userid +') td:eq(1)').text(ConfigID);
|
||||
$('#configtable tr:eq('+ userid +') td:eq(2)').text(ConfigValue);
|
||||
//$('#configtable tr:eq('+ userid +') td:eq(3)').text(BudRemarks);
|
||||
|
||||
$('#Config_ID'+userid).val(ConfigID);
|
||||
$('#ConfigValue'+userid).val(ConfigValue);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// alert('Please enter all the values');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function ConfirmDelete()
|
||||
{
|
||||
var x = confirm("Are you sure you want to delete?");
|
||||
if (x)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31
|
||||
&& (charCode < 48 || charCode > 57))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
//var baseurl = "<?php print base_url(); ?>";
|
||||
$(".EditConfig").submit(function(e)
|
||||
{
|
||||
if(validate())
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.EditConfig').serialize(),
|
||||
type:'POST',
|
||||
url:"<?php echo base_url(); ?>configurationctrl/configedit",
|
||||
success:function(data) {
|
||||
//alert(data);
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
//alert(data);
|
||||
$('#txtSelectedDepartment').val('');
|
||||
$('#txtRowCount').val('');
|
||||
|
||||
//window.location = baseurl + 'CostCenter/CostListing';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//$('#content').loader('hide');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function validate()
|
||||
{
|
||||
if($("option:selected", $("#ApprovedBy")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Approver Names');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user