minor changes-2 -vadivel J
This commit is contained in:
parent
24fe5d41c1
commit
407249994e
@ -129,12 +129,14 @@ $routes->get('exportdepartment', 'Department::exportdepartment');
|
|||||||
$routes->get('batchcard/getHistListing', 'Batchcard::getHistListing');
|
$routes->get('batchcard/getHistListing', 'Batchcard::getHistListing');
|
||||||
|
|
||||||
//Complaint Routes
|
//Complaint Routes
|
||||||
|
|
||||||
$routes->get('purchaseorder/AddComplaint','Purchaseorder::AddComplaint');
|
$routes->get('purchaseorder/AddComplaint','Purchaseorder::AddComplaint');
|
||||||
$routes->post('purchaseorder/SaveComplaint','Purchaseorder::SaveComplaint');
|
$routes->post('purchaseorder/SaveComplaint','Purchaseorder::SaveComplaint');
|
||||||
$routes->get('purchaseorder/EditComplaint', 'Purchaseorder::EditComplaint');
|
$routes->get('purchaseorder/EditComplaint', 'Purchaseorder::EditComplaint');
|
||||||
$routes->post('purchaseorder/UpdateComplaint', 'Purchaseorder::UpdateComplaint');
|
$routes->post('purchaseorder/UpdateComplaint', 'Purchaseorder::UpdateComplaint');
|
||||||
$routes->get('purchaseorder/Savencrlist', 'Purchaseorder::Savencrlist');
|
$routes->get('purchaseorder/Savencrlist', 'Purchaseorder::Savencrlist');
|
||||||
$routes->get('purchaseorder/Nonconfirmativelist','Purchaseorder::Nonconfirmativelist');
|
$routes->get('purchaseorder/Nonconfirmativelist','Purchaseorder::Nonconfirmativelist');
|
||||||
|
$routes->post('purchaseorder/addloadfile','Purchaseorder::addloadfile');
|
||||||
|
|
||||||
//Zohobooks sync
|
//Zohobooks sync
|
||||||
$routes->match(['GET', 'POST'],'user/zohobooks_api_fetch_all','User::zohobooks_api_fetch_all');
|
$routes->match(['GET', 'POST'],'user/zohobooks_api_fetch_all','User::zohobooks_api_fetch_all');
|
||||||
|
|||||||
@ -4216,7 +4216,7 @@ class Purchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*--------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------*/
|
||||||
function addloadfile()
|
public function addloadfile()
|
||||||
{
|
{
|
||||||
|
|
||||||
$pono = $this->request->getPost('PONO');
|
$pono = $this->request->getPost('PONO');
|
||||||
|
|||||||
@ -2503,7 +2503,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
<div class="col-md-offset-10 col-md-8">
|
<div class="col-md-offset-10 col-md-8">
|
||||||
|
|
||||||
<input type="button" class="btn btn-success" id="addmorebutton" value=" ADD FILES.."><br>
|
<input type="button" class="btn btn-success" id="addmorebutton" value=" ADD FILES "><br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -5367,12 +5367,10 @@ if (!empty($getlogpodtl)) {
|
|||||||
function fileupload(counter) {
|
function fileupload(counter) {
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
var file = $("#images" + counter).prop('files')[0];
|
var file = $("#images" + counter).prop('files')[0];
|
||||||
// console.log(file);
|
|
||||||
|
|
||||||
var PONO = $('#txtPONO').val();
|
var PONO = $('#txtPONO').val();
|
||||||
var igr = $('#hiddenIGRNO').val();
|
var igr = $('#hiddenIGRNO').val();
|
||||||
|
|
||||||
|
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
formData.append('PONO', PONO);
|
formData.append('PONO', PONO);
|
||||||
formData.append('count', counter);
|
formData.append('count', counter);
|
||||||
@ -5390,12 +5388,22 @@ if (!empty($getlogpodtl)) {
|
|||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert(data);
|
alert(data);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
// $('#spl').find('td').eq(5).text(filename[2]);
|
|
||||||
$('#billModel').modal('hide');
|
$('#billModel').modal('hide');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
// Handle errors here
|
||||||
|
$('#loader').hide();
|
||||||
|
console.error("AJAX Error: ", textStatus, errorThrown);
|
||||||
|
alert("An error occurred: " + textStatus + " - " + errorThrown);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
// Actions that should always happen regardless of success or error
|
||||||
|
console.log("AJAX request completed.");
|
||||||
|
$('#loader').hide(); // Hide the loader in any case
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function filecheck() {
|
function filecheck() {
|
||||||
@ -5417,8 +5425,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
|
|
||||||
//var a = document.getElementById("addmorebutton").innerHTML = counter;
|
|
||||||
|
|
||||||
|
|
||||||
var bill = <?php echo json_encode($billfile) ?>;
|
var bill = <?php echo json_encode($billfile) ?>;
|
||||||
//alert(bill.length);
|
//alert(bill.length);
|
||||||
@ -5427,31 +5433,16 @@ if (!empty($getlogpodtl)) {
|
|||||||
alert("You have to upload five files only"); //this allows only 5 files;
|
alert("You have to upload five files only"); //this allows only 5 files;
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = "divid";
|
div.id = `divid${counter}`;
|
||||||
div.className = "row";
|
div.className = "row";
|
||||||
//alert(counter);
|
div.innerHTML = `<div class="form-row px-4">
|
||||||
div.innerHTML = '<div class="form-row">' +
|
<div class="form-group col-md-3">
|
||||||
// '<div class="form-group col-md-3">'+
|
<label>Upload File</label>
|
||||||
// '<label>File Name</label>'+
|
<input type="file" name="browseFiles" id="images${counter}" onchange="Copyfilename(${this.name}); "><br>
|
||||||
// '<input type="text" id="maint_filename'+counterConstant+'" name="filename'+counterConstant+'" class="form-control" onkeypress="return false;" readonly/>'+
|
<span><button class="btn btn-success btn-small add add_this" id="addbtn" onclick="addRow(${counter})">ADD</button></span>
|
||||||
// '</div>'+
|
</div>
|
||||||
'<div class="form-group col-md-3">' +
|
</div>`;
|
||||||
'<label><br></label>' +
|
|
||||||
'<input type="file" name="browseFiles" id="images' + counter + '" onchange="Copyfilename(this.name); "><br>' +
|
|
||||||
'</div>' +
|
|
||||||
// '<div class="form-group col-md-3">'
|
|
||||||
// '<label><br><br></label>'+
|
|
||||||
// '<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstant+'" onclick="removeRow(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
|
|
||||||
'<div class="form-group col-md-2">' +
|
|
||||||
'<label><br><br></label>' +
|
|
||||||
'<button class="btn btn-success add add_this" id="addbtn" onclick="addRow()">ADD</button></div>' +
|
|
||||||
'</div>' +
|
|
||||||
|
|
||||||
'</div>';
|
|
||||||
|
|
||||||
$('#newdiv').append(div);
|
$('#newdiv').append(div);
|
||||||
$('#hidecounter').val(counter);
|
$('#hidecounter').val(counter);
|
||||||
@ -5466,13 +5457,13 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function addRow() {
|
function addRow(counter) {
|
||||||
//var file = $('#imag').val();
|
|
||||||
|
|
||||||
var file = $('#images').val();
|
var file = $(`#images${counter}`).val();
|
||||||
|
|
||||||
if (file == '') {
|
if (file == '') {
|
||||||
alert('File not found');
|
alert('File not found');
|
||||||
|
return false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fileupload(counter);
|
fileupload(counter);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user