worked on business settings in master -vadivel J
This commit is contained in:
parent
6d46208131
commit
a9a71139f1
@ -132,29 +132,31 @@ class Companycontroller extends BaseController
|
|||||||
// {
|
// {
|
||||||
|
|
||||||
|
|
||||||
|
$file=$this->request->getFile('files');
|
||||||
|
|
||||||
$PictureName = $this->request->getPost('Image');
|
$PictureName = $this->request->getPost('Image');
|
||||||
|
|
||||||
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
||||||
$Picture = "";
|
$Picture = "";
|
||||||
$file = $this->request->getFile('ModifyImage');
|
$ProfilePicPhoto = $this->request->getFile('photo');
|
||||||
|
|
||||||
|
|
||||||
if ($PictureName != '') {
|
if ($PictureName != '') {
|
||||||
if ($file !== null && $file->isValid() && !$file->hasMoved()) {
|
if ($ProfilePicPhoto !== null && $ProfilePicPhoto->isValid() && !$ProfilePicPhoto->hasMoved()) {
|
||||||
$path = ROOTPATH.'public/uploads/images/';
|
$path = ROOTPATH.'public/uploads/images/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
$Picture = $file->getName();
|
$Picture = $ProfilePicPhoto->getName();
|
||||||
$file->move($path,$Picture);
|
$ProfilePicPhoto->move($path,$Picture);
|
||||||
}else{
|
}else{
|
||||||
$Picture = $PictureName;
|
$Picture = $PictureName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($file !== null && $file->isValid() && !$file->hasMoved()) {
|
if ($ProfilePicPhoto !== null && $ProfilePicPhoto->isValid() && !$ProfilePicPhoto->hasMoved()) {
|
||||||
$path = ROOTPATH.'public/uploads/images/';
|
$path = ROOTPATH.'public/uploads/images/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
$Picture = $file->getName();
|
$Picture = $ProfilePicPhoto->getName();
|
||||||
$file->move($path,$Picture);
|
$ProfilePicPhoto->move($path,$Picture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,11 +204,21 @@ class Companycontroller extends BaseController
|
|||||||
$ID = $this->request->getPost('ID');
|
$ID = $this->request->getPost('ID');
|
||||||
//$createdDate=$this->request->getPost('createdDate');
|
//$createdDate=$this->request->getPost('createdDate');
|
||||||
|
|
||||||
//$Company = array('CompID'=>$CompID,'CompanyName'=>$CompanyName,'Address'=>$Address,'ContactNumber'=>$ContactNumber,'AlternateContactNumber'=>$AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNO'=>$GSTNO,'GSTRange'=>$GSTRange,'UANumber'=>$UANumber,'PaymentTerms'=>$Payment ,'PaymentDays'=>$PaymentDays ,'PayableAT'=>$PayableAT ,'Createdby'=>$createdby,'ProfilePic'=>$Picture,'Exiseregistration'=>$Exiseregistration,'CollectrateAddress'=>$CollectrateAddress,'FiscalYearStartOn'=>$financialstart,'FiscalYearEndsOn'=> $financialend);
|
//$Company = array('CompID'=>$CompID,'CompanyName'=>$CompanyName,'Address'=>$Address,'ContactNumber'=>$ContactNumber,
|
||||||
$Company = array('CompID' => $CompID, 'CompanyName' => $CompanyName, 'Address' => $Address, 'ContactNumber' => $ContactNumber, 'AlternateContactNumber' => $AlternateContactNumber, 'EmailAddress' => $EmailAddress, 'TIN' => $TIN, 'PAN' => $PAN, 'GSTNO' => $GSTNO, 'GSTRange' => $GSTRange, 'UANumber' => $UANumber, 'MSME' => $MSME , 'Createdby' => $createdby, 'ProfilePic' => $Picture, 'Exiseregistration' => $Exiseregistration, 'CollectrateAddress' => $CollectrateAddress, 'FiscalYearStartOn' => $financialstart, 'FiscalYearEndsOn' => $financialend, 'paymentID' => $PaymentId, 'companyWebsite' => $companywebsite, 'UpdatedBY' => $updatedby, 'Updatedon' => $updateddt);
|
//'AlternateContactNumber'=>$AlternateContactNumber,'EmailAddress'=>$EmailAddress,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNO'=>$GSTNO,
|
||||||
|
//'GSTRange'=>$GSTRange,'UANumber'=>$UANumber,'PaymentTerms'=>$Payment ,'PaymentDays'=>$PaymentDays ,'PayableAT'=>$PayableAT ,
|
||||||
|
//'Createdby'=>$createdby,'ProfilePic'=>$Picture,'Exiseregistration'=>$Exiseregistration,'CollectrateAddress'=>$CollectrateAddress,
|
||||||
|
//'FiscalYearStartOn'=>$financialstart,'FiscalYearEndsOn'=> $financialend);
|
||||||
|
$Company = array('CompID' => $CompID, 'CompanyName' => $CompanyName, 'Address' => $Address, 'ContactNumber' => $ContactNumber,
|
||||||
|
'AlternateContactNumber' => $AlternateContactNumber, 'EmailAddress' => $EmailAddress, 'TIN' => $TIN, 'PAN' => $PAN,
|
||||||
|
'GSTNO' => $GSTNO, 'GSTRange' => $GSTRange, 'UANumber' => $UANumber, 'MSME' => $MSME , 'Createdby' => $createdby,
|
||||||
|
'ProfilePic' => $Picture, 'Exiseregistration' => $Exiseregistration, 'CollectrateAddress' => $CollectrateAddress,
|
||||||
|
'FiscalYearStartOn' => $financialstart, 'FiscalYearEndsOn' => $financialend, 'paymentID' => $PaymentId,
|
||||||
|
'companyWebsite' => $companywebsite, 'UpdatedBY' => $updatedby, 'Updatedon' => $updateddt);
|
||||||
|
|
||||||
if (!empty($file)) {
|
if (!empty($file) && $file->getSize()){
|
||||||
$myfile = array('CompID' => $CompID, 'filename' => $file, 'ID' => $ID, 'filedescription' => $filedescription1, 'createdDate' => $createddt);
|
$fileName = $file->getName();
|
||||||
|
$myfile = array('CompID' => $CompID, 'filename' => $fileName, 'uploadedby' => $ID, 'filedescription' => $filedescription1, 'createdDate' => $createddt);
|
||||||
|
|
||||||
$result2 = $this->companydetailsmodel->filedetails($myfile);
|
$result2 = $this->companydetailsmodel->filedetails($myfile);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,9 +78,9 @@ class Companydetails_model extends Model
|
|||||||
function companylisting()
|
function companylisting()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_company_details com')
|
$builder = $this->db->table('t_company_details com')
|
||||||
->select('com.*,emp.firstname,pmt.PaymentTerms')
|
->select('com.*,emp.firstname,pmt.PaymentTerms,tbl.userId')
|
||||||
->join('t_paymentterms pmt', 'com.paymentID = pmt.PaymentID', 'left')
|
->join('t_paymentterms pmt', 'com.paymentID = pmt.PaymentID', 'left')
|
||||||
->join('tbl_users as tbl', ' com.createdby = tbl.userid', 'left')
|
->join('tbl_users as tbl', ' com.Createdby = tbl.userId', 'left')
|
||||||
->join('t_employee_details as emp', 'emp.empid=tbl.empid', 'left');
|
->join('t_employee_details as emp', 'emp.empid=tbl.empid', 'left');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
|||||||
@ -59,6 +59,7 @@ if(!empty($userRecords))
|
|||||||
$PaymentTerms = $uf->PaymentTerms ;
|
$PaymentTerms = $uf->PaymentTerms ;
|
||||||
$PaymentId = $uf->paymentID;
|
$PaymentId = $uf->paymentID;
|
||||||
$MSME = $uf->MSME;
|
$MSME = $uf->MSME;
|
||||||
|
$userId=$uf->userId;
|
||||||
//$PaymentDays = $uf->PaymentDays ;
|
//$PaymentDays = $uf->PaymentDays ;
|
||||||
//$PayableAT = $uf->PayableAT ;
|
//$PayableAT = $uf->PayableAT ;
|
||||||
$Createdby = $uf->Createdby;
|
$Createdby = $uf->Createdby;
|
||||||
@ -172,7 +173,8 @@ function readURL(input,num) {
|
|||||||
reader.readAsDataURL(input.files[0]);
|
reader.readAsDataURL(input.files[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function isNumberKey(evt){
|
function isNumberKey(evt){
|
||||||
@ -501,10 +503,25 @@ function ValidateUA() {
|
|||||||
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
|
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
|
||||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
<div class="form-row">
|
<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">
|
<div class=" col-md-3">
|
||||||
<img id="profilepicture" src="<?= base_url().'public/uploads/images/avatar.png'; ?>" alt="your image" style="width: 139px;"/><br/>
|
<img id="profilepicture" src="<?= base_url().'public/uploads/images/avatar.png' ?>" 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"/>
|
<br>
|
||||||
<label for="photo">Select Company Logo<br/><small>(only .jpg or .png)</small></label>
|
<?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="Image" id="Image" value="<?php echo $ProfilePic ; ?>" class="form-control" readonly>
|
||||||
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
|
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
@ -718,8 +735,8 @@ function ValidateUA() {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label style="margin-bottom:0px !important;" for="images">Select Company file<small> (only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
<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="images" name="images"/>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
@ -791,7 +808,14 @@ function ValidateUA() {
|
|||||||
</div> <!-- content -->
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function payment_hidden()
|
function payment_hidden()
|
||||||
@ -921,9 +945,17 @@ if ( $('#companywebsite').val().length < 1 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@ -951,10 +983,15 @@ if ( $('#companywebsite').val().length < 1 )
|
|||||||
<td style="width: 10%;" align="left" contenteditable="true"><%=IsActive%></td>
|
<td style="width: 10%;" align="left" contenteditable="true"><%=IsActive%></td>
|
||||||
</tr>
|
</tr>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var index = '1';
|
var index = '1';
|
||||||
$('.Add').click(function(){
|
$('#Add').click(function(){
|
||||||
//alert("addonclick");
|
// alert("addonclick");
|
||||||
var temp = index;
|
var temp = index;
|
||||||
var bankname = $('#BankName').val();
|
var bankname = $('#BankName').val();
|
||||||
var ifsccode = $('#IFSC').val();
|
var ifsccode = $('#IFSC').val();
|
||||||
@ -997,7 +1034,18 @@ $('.Add').click(function(){
|
|||||||
|
|
||||||
var template = jQuery("#addList").html();
|
var template = jQuery("#addList").html();
|
||||||
index = parseInt(index)+1;
|
index = parseInt(index)+1;
|
||||||
$('#databaseAppend').append(_.template(template,{index:temp,BankName:bankname,IFSC:ifsccode,BankAccountNumber:bankaccno,BankAddress:bankaddress,IsActive:isactive}));
|
// $('#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
|
}//else closed
|
||||||
}//if closed
|
}//if closed
|
||||||
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
|
||||||
@ -1005,7 +1053,7 @@ $('.Add').click(function(){
|
|||||||
|
|
||||||
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||||||
//{
|
//{
|
||||||
$('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
||||||
data:{id:value},
|
data:{id:value},
|
||||||
@ -1014,7 +1062,7 @@ $('.Add').click(function(){
|
|||||||
|
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
$('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user