1083 lines
36 KiB
PHP
Executable File
1083 lines
36 KiB
PHP
Executable File
<?php
|
||
$CompID = '';
|
||
$CompanyName= '';
|
||
$Address = '';
|
||
$ContactNumber = '';
|
||
$AlternateContactNumber = '';
|
||
$EmailAddress = '';
|
||
$Exiseregistration = '';
|
||
$TIN = '';
|
||
$PAN = '';
|
||
$GSTNO = '';
|
||
$GSTRange = '';
|
||
$CollectrateAddress = '';
|
||
$UANumber = '';
|
||
$PaymentTerms = '';
|
||
$PaymentId = '';
|
||
//$PaymentDays = '';
|
||
//$PayableAT = '';
|
||
$Createdby = '';
|
||
$CreatedDate = '';
|
||
$UpdatedBy = '';
|
||
$Updatedon = '';
|
||
$ProfilePic = '';
|
||
$companywebsite ='';
|
||
//$ceoname='';
|
||
//$companystartedon='';
|
||
//$partnerdetails='';
|
||
$firstname = '';
|
||
//$files ='';
|
||
$financialyear='';
|
||
$filename='';
|
||
$ID='';
|
||
$filedescription1='';
|
||
$financialstart='';
|
||
$financialend='';
|
||
$bankname='';
|
||
$bankifsc='';
|
||
$bankaddress='';
|
||
$bank_isactive = 1 ;
|
||
//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 ;
|
||
$PaymentId = $uf->paymentID;
|
||
//$PaymentDays = $uf->PaymentDays ;
|
||
//$PayableAT = $uf->PayableAT ;
|
||
$Createdby = $uf->Createdby;
|
||
//$CreatedDate = $uf->CreatedDate;
|
||
$UpdatedBy = $uf->UpdatedBy;
|
||
$Updatedon = $uf->Updatedon;
|
||
$ProfilePic = $uf->ProfilePic;
|
||
$companywebsite = $uf->companyWebsite;
|
||
//$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;
|
||
|
||
|
||
$FStartDt = $uf->FiscalYearStartOn;
|
||
if($FStartDt != '' && $FStartDt != '0000-00-00 00:00:00' )
|
||
{
|
||
$FSdate = new DateTime($FStartDt);
|
||
$financialstart = $FSdate->format('d-m-Y');
|
||
}
|
||
else
|
||
{
|
||
$financialstart = "";
|
||
}
|
||
|
||
$FEndDt = $uf->FiscalYearEndsOn;
|
||
if($FEndDt != '' && $FEndDt != '0000-00-00 00:00:00' )
|
||
{
|
||
$FEdate = new DateTime($FEndDt);
|
||
$financialend = $FEdate ->format('d-m-Y');
|
||
}
|
||
else
|
||
{
|
||
$financialend = "";
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
|
||
if(!empty($filenames))
|
||
{
|
||
foreach ($filenames as $uf)
|
||
{
|
||
$filedescription1=$uf->filedescription;
|
||
$filename=$uf->filename;
|
||
$createdDate=$uf->createdDate;
|
||
}
|
||
}
|
||
|
||
// if(!empty($bankdetails))
|
||
// {
|
||
// //print_r($bankdetails);
|
||
// foreach ($bankdetails as $bd)
|
||
// {
|
||
// $bankname=$bd->Bank_name;
|
||
// $bankifsc=$bd->IFSC;
|
||
// $bankaddress=$bd->Address;
|
||
// }
|
||
// }
|
||
|
||
?>
|
||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||
<script>
|
||
$(document).ready(function(){
|
||
$("#PaymentTerms").select2();
|
||
$("#filedescription").select2();
|
||
|
||
});
|
||
</script>
|
||
|
||
<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);
|
||
//alert(e.target.result);
|
||
};
|
||
|
||
reader.readAsDataURL(input.files[0]);
|
||
$('#ModifyImage').val(input.files[0]['name']);
|
||
}
|
||
}
|
||
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 isNumberKey(evt){
|
||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||
if (charCode != 46 && charCode != 45 &&charCode != 32 && charCode >= 33
|
||
&& (charCode < 48 || charCode > 57))
|
||
return false;
|
||
|
||
return true;
|
||
}
|
||
|
||
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 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 reg = /(?=.*[a-zA-Z]).{5}(?=.*[0-9]).{4}(?=.*[a-zA-Z]).{1}$/;
|
||
var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
|
||
var PAN = $('#PAN').val();
|
||
|
||
if(PAN != '')
|
||
{
|
||
if (regpan.test(PAN) == false)
|
||
{
|
||
alert('Please Enter Valid PAN Number');
|
||
return (false);
|
||
}
|
||
else
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
function validateGST() {
|
||
var reg = /^([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-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 or 22AAAAA1111S1ZA ');
|
||
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;
|
||
// }
|
||
// }
|
||
|
||
function getMobileValidation(){
|
||
// alert('mobile number and telephone phone');
|
||
|
||
var contactNumber = $('#ContactNumber').val();
|
||
var telephone =/^[0-9]{3,5}\s[0-9]{6,8}$/.test(contactNumber);
|
||
var mobilephone = /^[0-9]{10}$/.test(contactNumber);
|
||
|
||
// alert('telephone:'+telephone);//alert('other telephone:'+regex);
|
||
// alert('mobilephone:'+mobilephone);//alert('input value:'+contactNumber);
|
||
|
||
if(contactNumber!=''){
|
||
|
||
if(telephone){
|
||
// alert(' telephone number'+contactNumber);
|
||
return true;
|
||
}
|
||
else if(mobilephone){
|
||
// alert('mobile number'+contactNumber);
|
||
return true;
|
||
}
|
||
|
||
else{
|
||
alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210');//alert('need to change:'+contactNumber);
|
||
return false;
|
||
}
|
||
}
|
||
else{
|
||
|
||
alert(' Please enter correct format of contact number');
|
||
//alert('invalid'+contactNumber);
|
||
return false;
|
||
}
|
||
}
|
||
function ValidateExno() {
|
||
|
||
var regexno = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){3}([0-9]){3}?$/;
|
||
var ECC = $('#ExiseRegistration1').val();
|
||
|
||
if(ECC != '')
|
||
{
|
||
if (regexno.test(ECC) == false)
|
||
{
|
||
alert('Please Enter Valid Excise Control Code Number');
|
||
return (false);
|
||
}
|
||
else
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
|
||
function ValidateAlternateContact(){
|
||
// alert('phone');
|
||
|
||
var AlternateContactNumber = $('#AlternateContactNumber').val();
|
||
|
||
var telephone =/^[0-9]{3,5}\s[0-9]{6,8}$/.test(AlternateContactNumber);
|
||
var mobilephone = /^[0-9]{10}$/.test(AlternateContactNumber);
|
||
|
||
// alert('chennai telephone:'+telephone);//alert('other telephone:'+regex);
|
||
// alert('mobilephone:'+mobilephone);//alert('input value:'+contactNumber);
|
||
|
||
if(AlternateContactNumber!=''){
|
||
|
||
if(telephone){
|
||
// alert(' telephone number chennai district successfully inserted'+AlternateContactNumber);
|
||
return true;
|
||
}
|
||
else if(mobilephone){
|
||
// alert('mobile number successfully inserted'+AlternateContactNumber);
|
||
return true;
|
||
}
|
||
else{
|
||
alert('Please Enter valid Contact Number ex: 044 12345678 , 0444 1234567,04444 123456 and 9876543210');//alert('need to change:'+contactNumber);
|
||
return false;
|
||
}
|
||
}
|
||
else{
|
||
|
||
alert('Please enter correct format of contact number');
|
||
//alert('invalid'+AlternateContactNumber);
|
||
return false;
|
||
}
|
||
}
|
||
|
||
|
||
|
||
function ValidateUA() {
|
||
|
||
var reguano = /^([a-zA-Z]){5}([0-9]){10}?$/;
|
||
var UA = $('#UANumber').val();
|
||
|
||
if(UA != '')
|
||
{
|
||
if (reguano.test(UA) == false)
|
||
{
|
||
alert('Please Enter Valid UA Number');
|
||
return (false);
|
||
}
|
||
else
|
||
{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
</script>
|
||
<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;
|
||
|
||
$("#financialstart").datepicker({
|
||
maxDate :'now',
|
||
//maxDate : new Date(maxdt,1,1),
|
||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
||
|
||
|
||
});
|
||
|
||
$("#financialend").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-1:+1'
|
||
});
|
||
|
||
});
|
||
</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" id="content">
|
||
|
||
<br/>
|
||
<div class="row" style="font-size:12px">
|
||
<!-- 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>
|
||
<input type="hidden" name="Image" id="Image" value="<?php echo $ProfilePic ; ?>" class="form-control" readonly>
|
||
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-9">
|
||
|
||
<div class="col-md-12">
|
||
<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>
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-6 pad"><span>ContactNumber</span><span class="badge">*</span>
|
||
<input type="text" name="ContactNumber" onchange="getMobileValidation();" id="ContactNumber" maxlength="12" class="form-control" value="<?php echo $ContactNumber;?>" required onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
|
||
<div class="col-md-6 pad"><span>AlternateContactNumber</span><span class="badge">*</span>
|
||
<input type="text" name="AlternateContactNumber" onchange="ValidateAlternateContact();" id="AlternateContactNumber" maxlength="12" class="form-control" value="<?php echo $AlternateContactNumber;?>" required>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<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;?>">
|
||
</div>
|
||
|
||
<div class="col-md-6 pad"><span>Excise Registration</span><span class="badge">*</span>
|
||
<!-- <input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="15" class="form-control" value="<?php echo $Exiseregistration ;?>" pattern="(?=.*[A-Za-z]).{5}(?=.*[0-9]).{4}(?=.*[A-Za-z]).{1}(?=.*[A-Za-z]).{2}(?=.*[0-9]).{3}" required onchange="ValidateExno();" style="text-transform: uppercase"> -->
|
||
<input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="15" class="form-control" value="<?php echo $Exiseregistration ;?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([A-Za-z]){2}([0-9]){3}" required onchange="ValidateExno();" style="text-transform: uppercase">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-6 pad"><span>Company Website</span><span class="badge">*</span>
|
||
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite ;?>" required>
|
||
</div>
|
||
|
||
<div class="col-md-3 pad"><span>Financial Year StartON</span><span class="badge">*</span>
|
||
<input name="financialstart" id="financialstart" maxlength="10" class="form-control" value="<?php echo $financialstart ;?>" required>
|
||
</div>
|
||
|
||
<div class="col-md-3 pad"><span>Financial Year EndON</span><span class="badge">*</span>
|
||
<input name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialend ;?>" required>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Address Section -->
|
||
<!-- Form Name -->
|
||
<legend>Address Details</legend>
|
||
<!-- Text input-->
|
||
<!-- <div class="form-group"> -->
|
||
<div class="col-md-12">
|
||
<div class="col-md-12 pad"><span>Address</span><span class="badge">*</span>
|
||
<input type="text" id="Address" name="Address" maxlength="500" class="form-control" value="<?php echo $Address;?>" required>
|
||
</div>
|
||
</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-12">
|
||
<div class="col-md-3">
|
||
<span for="payablefrom" style="width =25%";>Payable Terms</span>
|
||
<select class="form-control required" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
|
||
<option value="<?php echo $PaymentTerms;?>" ><?php echo $PaymentTerms;?></option>
|
||
<?php
|
||
if(!empty($payment))
|
||
{
|
||
foreach ($payment as $rl)
|
||
{
|
||
?>
|
||
<option value="<?php echo $rl->PaymentID ?>"><?php echo $rl->PaymentTerms ?></option>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId;?>" >
|
||
</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>
|
||
|
||
|
||
<!--<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="col-md-12 pad">
|
||
|
||
<div class="col-md-3"><span>UA Number</span>
|
||
<input type="text" id="UANumber" name="UANumber" onchange="ValidateUA();" maxlength="15" class="form-control" value="<?php echo $UANumber;?>" pattern="([a-zA-Z]){5}([0-9]){10}" style="text-transform: uppercase">
|
||
</div>
|
||
<div class="col-md-3"><span>TIN Number</span>
|
||
<input type="text" id="TIN" name="TIN" maxlength="11" class="form-control" value="<?php echo $TIN;?>" pattern="(.){11,11}" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number">
|
||
</div>
|
||
<div class="col-md-3"><span>PAN Number</span><span class="badge">*</span>
|
||
<!-- <input type="text" id="PAN" maxlength="10" name="PAN" onchange="validatePAN();" class="form-control" style="text-transform: uppercase" value="<?php echo $PAN;?>" pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}" required> -->
|
||
<input type="text" id="PAN" maxlength="10" name="PAN" onchange="validatePAN();" class="form-control" style="text-transform: uppercase" value="<?php echo $PAN;?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" required>
|
||
|
||
</div>
|
||
<div class="col-md-3"><span>GST Number</span><span class="badge">*</span>
|
||
<!-- <input type="text" id="GSTNO" maxlength="15" onchange="validateGST();" name="GSTNO" class="form-control" style="text-transform: uppercase" value="<?php echo $GSTNO;?>" pattern="(?=.*[0-9]).{2}(?=.*[A-Za-z]).{5}(?=.*[0-9]).{4}(?=.*[A-Za-z]).{1}(?=.*[0-9]).{1}(?=.*[Zz]).{1}(?=.*[A-Za-z0-9]).{1}" required 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"> -->
|
||
<input type="text" id="GSTNO" maxlength="15" onchange="validateGST();" name="GSTNO" class="form-control" style="text-transform: uppercase" value="<?php echo $GSTNO;?>" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" required 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="col-md-12 pad">
|
||
<div class="col-md-3"><span>GST Range</span>
|
||
<input type="text" id="GSTRange" name="GSTRange" maxlength="100" class="form-control" value="<?php echo $GSTRange;?>">
|
||
</div>
|
||
<!-- <div class="form-group"> -->
|
||
<div class="col-md-9"><span>Collectrate Address</span><span class="badge">*</span>
|
||
<input type="text" id="CollectrateAddress" required name="CollectrateAddress" maxlength="500" class="form-control" value="<?php echo $CollectrateAddress;?>" required >
|
||
</div>
|
||
<!-- </div> -->
|
||
</div>
|
||
|
||
<!--bank details-->
|
||
<legend>Bank Details</legend>
|
||
|
||
<div class="col-md-12">
|
||
<div class="col-md-3"><span>Bank Name</span>
|
||
<input type="text" id="BankName" name="BankName" maxlength="500" class="form-control" value="<?php echo $bankname;?>">
|
||
</div>
|
||
<div class="col-md-3"><span>IFSC</span>
|
||
<input type="text" id="IFSC" name="IFSC" maxlength="500" class="form-control" value="<?php echo $bankifsc;?>">
|
||
</div>
|
||
<div class="col-md-3"><span>Bank Account Number</span>
|
||
<input type="text" id="BankAccno" name="BankAccno" maxlength="500" class="form-control" onkeypress="return isNumberKey(event)">
|
||
</div>
|
||
<div class="col-md-3"><span>Bank Address</span>
|
||
<input type="text" id="BankAddress" name="BankAddress" maxlength="500" class="form-control" value="<?php echo $bankaddress;?>">
|
||
</div>
|
||
<input type="hidden" id="BankState" name="BankState" class="form-control" value="Yes">
|
||
<div class="col-md-12 text-right" style="padding: 19px;">
|
||
<!-- <div class="col-md-6"><span>State</span><div>padding: 49px
|
||
<input type="radio" name="Bankstate" id="Bankstate" value="1" checked> Active<br>
|
||
<input type="radio" name="Bankstate" id="Bankstate" value="0">InActive<br></div>
|
||
</div>
|
||
<div class="col-md-6">-->
|
||
<a class="btn btn-primary font Add" ID="Add"> <span class="bold">Add/Update Bank Detail</span></a>
|
||
<!-- </div> -->
|
||
</div>
|
||
</div>
|
||
|
||
<br>
|
||
|
||
<div class="col-xs-12 pad" style="padding: 0px 30px 0px 30px;">
|
||
<table id="banktable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||
<thead style="background-color:#ddf">
|
||
<tr>
|
||
<th>BankName</th>
|
||
<th>IFSC</th>
|
||
<th>BankAccountNumber</th>
|
||
<th>BankAddress</th>
|
||
<th>IsActive</th>
|
||
<!-- <th>Action</th> -->
|
||
</tr>
|
||
</thead>
|
||
<!-- <tbody> -->
|
||
<tbody id="databaseAppend">
|
||
<?php if(!empty($bankdetails))
|
||
{
|
||
|
||
foreach ($bankdetails as $uf)
|
||
|
||
{
|
||
|
||
?>
|
||
<tr>
|
||
<td style="width: 15%;"><?php echo $uf->Bank_name ?></td>
|
||
<td style="width: 18%;" contenteditable='true'><?php echo $uf->IFSC ?></td>
|
||
<td style="width: 18%;" contenteditable='true'><?php echo $uf->Bank_AccNo ?></td>
|
||
<td style="width: 40%;" contenteditable='true'><?php echo $uf->Address ?></a></td>
|
||
<td style="width: 10%;" contenteditable='true'>
|
||
<?php if($uf->Is_Active == 1 )
|
||
{
|
||
echo 'Yes';
|
||
}
|
||
else
|
||
{
|
||
echo 'No';
|
||
}
|
||
?>
|
||
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<br>
|
||
<br>
|
||
<br>
|
||
<legend>Upload File</legend>
|
||
<div class="col-md-12 pad">
|
||
<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,.pdf,.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" id="submit" onclick="valid();" class="btn btn-primary" value="Submit" />
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-12">
|
||
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||
<thead style="background-color:#ddf">
|
||
|
||
<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"><3E></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"><3E></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"><3E></button></div>'); ?>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
|
||
<script src="<?php echo base_url(); ?>assets/js/addUser.js" type="text/javascript"></script>
|
||
<script>
|
||
|
||
function payment_hidden()
|
||
{
|
||
//alert("worked");
|
||
var term = document.getElementById("PaymentTerms");
|
||
var termid = term.options[term.selectedIndex].value;
|
||
$("#paymentid").val(termid);
|
||
}
|
||
|
||
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 ( $("#CompanyName").val().length < 1)
|
||
{
|
||
alert('Please Enter Company Name');
|
||
$('#CompanyName').focus();
|
||
return false;
|
||
}
|
||
if ( $('#ContactNumber').val().length < 1 )
|
||
{
|
||
alert('Please Enter Contact Number');
|
||
return false;
|
||
}
|
||
else if(!getMobileValidation())
|
||
{
|
||
return false;
|
||
}
|
||
if ( $('#AlternateContactNumber').val().length < 1 )
|
||
{
|
||
alert('Please Enter Alternate Contact Number');
|
||
return false;
|
||
}
|
||
else if(!ValidateAlternateContact())
|
||
{
|
||
return false;
|
||
}
|
||
// else if($("#EmailAddress").val().length < 1)
|
||
// {
|
||
// alert('Please Enter Email ID');
|
||
// $("#EmailAddress").focus();
|
||
// //return false;
|
||
// }
|
||
// else if(!validateEmail())
|
||
// {
|
||
// return false;
|
||
// }
|
||
if ( $('#ExiseRegistration1').val().length < 1 )
|
||
{
|
||
alert('Please Enter Excise Registration Number');
|
||
$('#ExiseRegistration1').focus();
|
||
return false;
|
||
}
|
||
else if(!ValidateExno())
|
||
{
|
||
$('#ExiseRegistration1').focus();
|
||
return false;
|
||
}
|
||
|
||
if ( $('#companywebsite').val().length < 1 )
|
||
{
|
||
alert('please Enter Company Website');
|
||
$('#companywebsite').focus();
|
||
return false;
|
||
}
|
||
if ( $('#Address').val().length < 1 )
|
||
{
|
||
alert('please Enter Address');
|
||
$('#Address').focus();
|
||
return false;
|
||
}
|
||
if($("#PAN").val().length < 1)
|
||
{
|
||
alert('Please Enter PAN ID');
|
||
$("#PAN").focus();
|
||
return false;
|
||
}
|
||
else if(!validatePAN())
|
||
{
|
||
//alert('validation');
|
||
$("#PAN").focus();
|
||
return false;
|
||
}
|
||
|
||
|
||
if(!validateGST())
|
||
{
|
||
$('#GSTNO').focus();
|
||
return false;
|
||
}
|
||
if( $('#CollectrateAddress').val().length < 1 )
|
||
{
|
||
alert('please Enter Collectrate Address');
|
||
$('#CollectrateAddress').focus();
|
||
return false;
|
||
}
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
</script>
|
||
<script type="text/javascript">
|
||
|
||
$(function () {
|
||
|
||
$('#datatable').DataTable({
|
||
"paging": true,
|
||
"lengthChange": true,
|
||
"searching": true,
|
||
"ordering": true,
|
||
"info": true,
|
||
"autoWidth": true
|
||
|
||
});
|
||
});
|
||
|
||
</script>
|
||
|
||
<script type="text/html" id="addList">
|
||
<tr id="<%=index%>">
|
||
<td style="width: 15%;" align="left"><%=BankName%></td>
|
||
<td style="width: 18%;" align="left" contenteditable="true"><%=IFSC%></td>
|
||
<td style="width: 18%;" align="left" contenteditable="true"><%=BankAccountNumber%></td>
|
||
<td style="width: 40%;" align="left" contenteditable="true"><%=BankAddress%></td>
|
||
<td style="width: 10%;" align="left" contenteditable="true"><%=IsActive%></td>
|
||
</tr>
|
||
</script>
|
||
<script>
|
||
var index = '1';
|
||
$('.Add').click(function(){
|
||
//alert("addonclick");
|
||
var temp = index;
|
||
var bankname = $('#BankName').val();
|
||
var ifsccode = $('#IFSC').val();
|
||
var bankaccno = $('#BankAccno').val();
|
||
var bankaddress = $('#BankAddress').val();
|
||
var isactive = $('#BankState').val();
|
||
// var isactive = <?php echo $bank_isactive ?>;
|
||
//alert(isactive);
|
||
|
||
if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||
{
|
||
//alert('both insert and update operation evaluated');
|
||
if(bankname == ''){
|
||
|
||
$("#BankName").focus();
|
||
return false;
|
||
|
||
}
|
||
else if (ifsccode == ''){
|
||
|
||
$('#IFSC').focus();
|
||
return false;
|
||
|
||
}
|
||
else if (bankaccno == ''){
|
||
|
||
$('#BankAccno').focus();
|
||
return false;
|
||
|
||
}
|
||
else if (bankaddress == ''){
|
||
|
||
$('#BankAddress').focus();
|
||
return false;
|
||
|
||
}
|
||
else{
|
||
//alert(isactive);
|
||
|
||
|
||
var template = jQuery("#addList").html();
|
||
index = parseInt(index)+1;
|
||
$('#databaseAppend').append(_.template(template,{index:temp,BankName:bankname,IFSC:ifsccode,BankAccountNumber:bankaccno,BankAddress:bankaddress,IsActive:isactive}));
|
||
}//else closed
|
||
}//if closed
|
||
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
||
var value = JSON.stringify(tablevalue);
|
||
|
||
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||
//{
|
||
$('#content').loader('show');
|
||
$.ajax({
|
||
|
||
data:{id:value},
|
||
type:"POST",
|
||
url:"<?php echo base_url() ?>companycontroller/bankdtl",
|
||
|
||
success:function(data){
|
||
|
||
$('#content').loader('hide');
|
||
alert(data);
|
||
|
||
|
||
}//success function closed
|
||
|
||
});//ajax function closed
|
||
|
||
$('#BankName').val('');
|
||
$('#IFSC').val('');
|
||
$('#BankAccno').val('');
|
||
$('#BankAddress').val('');
|
||
|
||
|
||
});//add click function closed
|
||
|
||
|
||
</script>
|