1024 lines
39 KiB
PHP
Executable File
1024 lines
39 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;
|
||
$MSME = '';
|
||
//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;
|
||
$MSME = $uf->MSME;
|
||
$userId = $uf->userId;
|
||
//$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() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||
<script src="<?php echo base_url() ?>public/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'
|
||
// });
|
||
|
||
// $("#financialstart").datepicker({
|
||
// dateFormat: 'dd-mm-yy',
|
||
// onSelect: function(selectedDate) {
|
||
// var minDate = $(this).datepicker("getDate");
|
||
// $("#toDate").datepicker("option", "minDate", minDate);
|
||
// }
|
||
// });
|
||
|
||
// $("#financialend").datepicker({
|
||
// dateFormat: 'dd-mm-yy',
|
||
// onSelect: function(selectedDate) {
|
||
// var maxDate = $(this).datepicker("getDate");
|
||
// $("#fromDate").datepicker("option", "maxDate", maxDate);
|
||
// }
|
||
// });
|
||
|
||
});
|
||
</script>
|
||
|
||
<style>
|
||
/* legend{
|
||
color:#00c0ef ! important;
|
||
} */
|
||
th {
|
||
background-color: #ddd;
|
||
}
|
||
|
||
.form-group {
|
||
padding-bottom: 4%;
|
||
}
|
||
|
||
.pad {
|
||
padding-bottom: 1%;
|
||
}
|
||
|
||
.badge {
|
||
color: red;
|
||
background-color: #fff;
|
||
}
|
||
</style>
|
||
|
||
|
||
<div class="content-page">
|
||
<div class="content">
|
||
<!-- Start Content-->
|
||
<div class="container-fluid">
|
||
<!-- start page title -->
|
||
<?php
|
||
helper('form');
|
||
$error = session()->getFlashdata('error');
|
||
if ($error) {
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = session()->getFlashdata('success');
|
||
if ($success) {
|
||
?>
|
||
<div class="alert alert-info alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo session()->getFlashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="page-title-box page-title-box-alt">
|
||
<div class="page-title-right">
|
||
<ol class="breadcrumb m-0">
|
||
<li class="breadcrumb-item"><a href="javascript: void(0);">Master Details</a></li>
|
||
<li class="breadcrumb-item active">
|
||
<h4 class="page-title">Business Settings</h4>
|
||
</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<!-- end page title -->
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
|
||
<div class="box-body">
|
||
<!-- Supplier Information -->
|
||
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<div class="form-row">
|
||
|
||
<input type="hidden" name="ID" class="form-control" readonly value="<?php echo $userId ?>">
|
||
|
||
|
||
<?php if (empty($ProfilePic)) { ?>
|
||
|
||
<div class=" col-md-3">
|
||
<img id="profilepicture" src="<?= base_url() . 'public/uploads/images/avatar.png' ?>" alt="your image" style="width: 139px;" /><br />
|
||
<br>
|
||
<?php } else { ?>
|
||
<div class=" col-md-3">
|
||
<img id="profilepicture" src="<?= base_url() . 'public/uploads/images/' . $ProfilePic ?>" alt="your image" style="width: 139px;" /><br />
|
||
<br>
|
||
<?php } ?>
|
||
|
||
|
||
<input type='file' class="mb-1" input accept=".JPG,.PNG" onchange="readURL(this,0);"
|
||
id="photo" value="<?php base_url() . 'public/uploads/images/' . $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 class=" col-md-3">
|
||
<label class="col-form-label" for="CompanyID">CompanyID<span class="badge">*</span></label>
|
||
<input type="text" name="CompanyID" maxlength="100" id="CompanyID" value="<?php echo $CompID; ?>" class="form-control" readonly>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<label class="col-form-label" for="CompanyName">CompanyName</label>
|
||
<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-3">
|
||
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
|
||
<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>
|
||
<div class="form-row">
|
||
<div class="col-md-3" style="margin-top:20px">
|
||
<label for="AlternateContactNumber">Alternate Contact Number</label><!--<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 class="col-md-3" style="margin-top:20px">
|
||
<label for="EmailAddress">Email Address</label><!--<span class="badge">*</span>-->
|
||
<input type="email" name="EmailAddress" onchange="validateEmail();" id="EmailAddress" class="form-control" value="<?php echo $EmailAddress; ?>">
|
||
</div>
|
||
<div class="col-md-3" style="margin-top:20px">
|
||
<label for="ExciseRegistration">Excise Registration</label><!--<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">
|
||
</div>
|
||
<div class="col-md-3" style="margin-top:20px">
|
||
<label for="AlternateContactNumber">Company Website</label><!--<span class="badge">*</span>-->
|
||
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite; ?>" required>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
$financialstartFormatted = date('Y-m-d', strtotime($financialstart));
|
||
$financialendFormatted = date('Y-m-d', strtotime($financialend));
|
||
?>
|
||
|
||
<div class="form-row">
|
||
<div class="col-md-3" style="margin-top:20px">
|
||
<label for="FinancialYearStartON">Financial Year StartON</label><!--<span class="badge">*</span>-->
|
||
<input type="date" name="financialstart" id="financialstart" class="form-control" value="<?php echo $financialstartFormatted; ?>" required>
|
||
</div>
|
||
<div class="col-md-3" style="margin-top:20px">
|
||
<label for="FinancialYearEndON">Financial Year EndON</label><!--<span class="badge">*</span>-->
|
||
<input type="date" name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialendFormatted; ?>" required>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Address Section -->
|
||
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<div class="form-row">
|
||
<div class=" col-md-6">
|
||
<label class="col-form-label" for="Address">Address<span class="badge">*</span></label>
|
||
<textarea id="Address" name="Address" maxlength="500" class="form-control" rows="3" required><?php echo $Address; ?></textarea>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Tax Related Data -->
|
||
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
|
||
<!-- Text input-->
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<div class="form-row" style="margin-bottom: 20px;">
|
||
<div class=" col-md-4">
|
||
<label class="col-form-label" for="GSTNo">Payable Terms</label>
|
||
<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>
|
||
|
||
|
||
</div>
|
||
|
||
<!-- Bank Details-->
|
||
<legend style="margin-left:-10px;color: #4f7c97;">ID Proof</legend>
|
||
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<div class="form-row" style="margin-bottom: 20px;">
|
||
<div class=" col-md-4">
|
||
<label class="col-form-label" for="UANumber">UA Number<span class="badge">*</span></label>
|
||
<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-4">
|
||
<label class="col-form-label" for="TINNumber">TIN Number<span class="badge">*</span></label>
|
||
<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-4">
|
||
<label class="col-form-label" for="MSMENumber">MSME Number</label>
|
||
<input type="text" id="MSME" name="MSME" class="form-control" value="<?php echo $MSME; ?>" title="Please Enter MSME" style="text-transform: uppercase">
|
||
</div>
|
||
</div>
|
||
<div class="form-row" style="margin-top:20px">
|
||
<div class=" col-md-4">
|
||
<label class="col-form-label" for="GSTRange">GST Range<span class="badge">*</span></label>
|
||
<input type="text" id="GSTRange" name="GSTRange" maxlength="100" class="form-control" value="<?php echo $GSTRange; ?>">
|
||
</div>
|
||
<div class=" col-md-4">
|
||
<label class="col-form-label" for="GSTNumber">GST Number<span class="badge">*</span></label>
|
||
<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 class=" col-md-4">
|
||
<label class="col-form-label" for="PANNumber">PAN Number<span class="badge">*</span></label>
|
||
<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-4">
|
||
<label class="col-form-label" for="CollectrateAddress">Collectrate Address<span class="badge">*</span></label>
|
||
<input type="text" id="CollectrateAddress" required name="CollectrateAddress" maxlength="500" class="form-control" value="<?php echo $CollectrateAddress; ?>" required>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<!-- Text input-->
|
||
<div class="form-row" style="margin-bottom: 27px;">
|
||
<div class="col-md-3">
|
||
<span for="BankName">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 for="IFSC">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 for="BankAccountNumber">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 for="BankName">Bank Address</span>
|
||
<input type="text" id="BankAddress" name="BankAddress" maxlength="500" class="form-control" value="<?php echo $bankaddress; ?>">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<input type="hidden" id="BankState" name="BankState" class="form-control" value="Yes">
|
||
<div class="form-row">
|
||
<div class="col-md-12 text-right">
|
||
<a class="btn btn-success font Add" ID="Add"> <span class="bold">Add/Update Bank Detail</span></a>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="col-md-12">
|
||
<table id="banktable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
||
<thead>
|
||
<tr>
|
||
<th>BankName</th>
|
||
<th>IFSC</th>
|
||
<th>BankAccountNumber</th>
|
||
<th>BankAddress</th>
|
||
<th>IsActive</th>
|
||
<!-- <th>Action</th> -->
|
||
</tr>
|
||
</thead>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
|
||
<legend style="margin-left:0px;color: #4f7c97;">Upload File</legend>
|
||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||
<div class="form-row">
|
||
<div class="col-md-4">
|
||
<span for="FileDescription">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>
|
||
<div class="col-md-4">
|
||
<label style="margin-bottom:0px !important;" for="files">Select file<small> (only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||
<input style="margin-top: 5px;" type="file" size="20" input accept=".docx,.pdf,.doc.JPG,.PNG" onchange="readURL(this,1);" id="files" name="files" />
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
|
||
<!-- <div class="form-row" >
|
||
<div class="col-md-12 text-right">
|
||
<input type="submit" id="submit" onclick="valid();" class="btn btn-success" value="Submit" />
|
||
</div>
|
||
</div> -->
|
||
|
||
<div class="form-row">
|
||
<div class="col-md-12">
|
||
<table id="datatable" class="table table-hover table-bordered" 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() . 'public/uploads/files/' ?><?php echo $uf->filename ?>"><i class="fa fa-download"></i></a>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-12 text-right">
|
||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||
<!-- <input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success"> -->
|
||
<input type="submit" value="Submit" class="btn btn-success">
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<!-- end row -->
|
||
</div>
|
||
</div> <!-- end card -->
|
||
</div><!-- end col -->
|
||
</div>
|
||
<!-- end row -->
|
||
</div> <!-- container -->
|
||
</div> <!-- content -->
|
||
</div>
|
||
|
||
<script src="<?php echo base_url(); ?>public/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) {
|
||
$('#loader').show();
|
||
$.ajax({
|
||
data: {
|
||
id: filename
|
||
},
|
||
type: "POST",
|
||
url: "<?php echo base_url() ?>companycontroller/deletefile",
|
||
success: function(data) {
|
||
$('#loader').hide();
|
||
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>
|
||
|
||
</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,{index:temp,BankName:bankname,IFSC:ifsccode,BankAccountNumber:bankaccno,BankAddress:bankaddress,IsActive:isactive}));
|
||
var html = `
|
||
<tr>
|
||
<td>${bankname}</td>
|
||
<td>${ifsccode}</td>
|
||
<td>${bankaccno}</td>
|
||
<td>${bankaddress}</td>
|
||
<td>${isactive}</td>
|
||
</tr>
|
||
`;
|
||
$('#databaseAppend').append(html);
|
||
|
||
} //else closed
|
||
} //if closed
|
||
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
||
var value = JSON.stringify(tablevalue);
|
||
|
||
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||
//{
|
||
$('#loader').show();
|
||
$.ajax({
|
||
|
||
data: {
|
||
id: value
|
||
},
|
||
type: "POST",
|
||
url: "<?php echo base_url() ?>companycontroller/bankdtl",
|
||
|
||
success: function(data) {
|
||
|
||
$('#loader').hide();
|
||
alert(data);
|
||
|
||
|
||
} //success function closed
|
||
|
||
}); //ajax function closed
|
||
|
||
$('#BankName').val('');
|
||
$('#IFSC').val('');
|
||
$('#BankAccno').val('');
|
||
$('#BankAddress').val('');
|
||
|
||
|
||
}); //add click function closed
|
||
</script>
|