changes in master details-1 vadivel J 21-11-2024
This commit is contained in:
parent
bfa496329f
commit
36a8ac8ccc
@ -81,8 +81,10 @@ $routes->get('assetListing', 'Assetdetails::assetListing');
|
|||||||
$routes->get('addasset', 'Assetdetails::addasset');
|
$routes->get('addasset', 'Assetdetails::addasset');
|
||||||
$routes->post('assetdetails/getpodetails','Assetdetails::getpodetails');
|
$routes->post('assetdetails/getpodetails','Assetdetails::getpodetails');
|
||||||
$routes->post('assetdetails/getline','Assetdetails::getline');
|
$routes->post('assetdetails/getline','Assetdetails::getline');
|
||||||
|
|
||||||
$routes->get('assetdetails/editOldasset', 'Assetdetails::editOldasset');
|
$routes->get('assetdetails/editOldasset', 'Assetdetails::editOldasset');
|
||||||
|
$routes->get('assetdetails/deleteAsset', 'Assetdetails::deleteAsset');
|
||||||
|
$routes->get('assetdetails/reActivateAsset', 'Assetdetails::reActivateAsset');
|
||||||
|
|
||||||
//uncommenting addNewAsset
|
//uncommenting addNewAsset
|
||||||
$routes->post('addNewasset', 'Assetdetails::addNewasset');
|
$routes->post('addNewasset', 'Assetdetails::addNewasset');
|
||||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset', 'Assetdetails::editasset');
|
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset', 'Assetdetails::editasset');
|
||||||
|
|||||||
@ -8,6 +8,7 @@ use App\Models\Assetdetails_model;
|
|||||||
use CodeIgniter\Validation\Exceptions\ValidationException;
|
use CodeIgniter\Validation\Exceptions\ValidationException;
|
||||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||||
|
use DateTime;
|
||||||
/**
|
/**
|
||||||
* Module : Asset
|
* Module : Asset
|
||||||
* Assetdetails Class to control all asset related operations.
|
* Assetdetails Class to control all asset related operations.
|
||||||
@ -316,6 +317,32 @@ class Assetdetails extends BaseController
|
|||||||
$this->loadViews("editOldasset", $this->global, $data, NULL);
|
$this->loadViews("editOldasset", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteAsset(){
|
||||||
|
|
||||||
|
$assetCode = $this->request->getGet('AssetID');
|
||||||
|
$updatedBy = $this->session->get('userId');
|
||||||
|
$updatedDate = new DateTime();
|
||||||
|
$updatedDate = $updatedDate->format('Y-m-d H:i:s');
|
||||||
|
$assetInfo = array('IsActive' => 0 , 'UpdatedDate' => $updatedDate , 'UpdatedBy' => $updatedBy );
|
||||||
|
$result = $this->assetdetails_model->deleteAsset($assetCode , $assetInfo);
|
||||||
|
|
||||||
|
return redirect()->route('assetListing');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function reActivateAsset(){
|
||||||
|
|
||||||
|
$assetCode = $this->request->getGet('AssetID');
|
||||||
|
$updatedBy = $this->session->get('userId');
|
||||||
|
$updatedDate = new DateTime();
|
||||||
|
$updatedDate = $updatedDate->format('Y-m-d H:i:s');
|
||||||
|
$assetInfo = array('IsActive' => 1 , 'UpdatedDate' => $updatedDate , 'UpdatedBy' => $updatedBy );
|
||||||
|
$result = $this->assetdetails_model->deleteAsset($assetCode , $assetInfo);
|
||||||
|
|
||||||
|
return redirect()->route('assetListing');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to edit the user information
|
* This function is used to edit the user information
|
||||||
|
|||||||
@ -137,11 +137,8 @@ class CostCenter extends BaseController
|
|||||||
function checkCostCenter(){
|
function checkCostCenter(){
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$result = $this->costcenter_model->checkCostCenter( $data['CostCenterName']);
|
$result = $this->costcenter_model->checkCostCenter( $data['CostCenterName']);
|
||||||
if(empty($result)){
|
|
||||||
echo false;
|
return $this->response->setJSON($result);
|
||||||
}else{
|
|
||||||
echo true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -473,11 +473,7 @@ class Supplier extends BaseController
|
|||||||
|
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$message = $this->supplier_model->checkTransporter($data['transportername']);
|
$message = $this->supplier_model->checkTransporter($data['transportername']);
|
||||||
if(!empty($message)){
|
return $this->response->setJSON($message);
|
||||||
echo true;
|
|
||||||
}else{
|
|
||||||
echo false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -245,6 +245,27 @@ class Assetdetails_model extends Model
|
|||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteAsset ($assetCode , $assetInfo){
|
||||||
|
|
||||||
|
$this->db->table('t_asset_details')
|
||||||
|
->where('AssetCode', $assetCode)
|
||||||
|
->update($assetInfo);
|
||||||
|
$count = $this->db->affectedRows();
|
||||||
|
return $count;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function reActivateAsset ($assetCode , $assetInfo){
|
||||||
|
|
||||||
|
$this->db->table('t_asset_details')
|
||||||
|
->where('AssetCode', $assetCode)
|
||||||
|
->update($assetInfo);
|
||||||
|
$count = $this->db->affectedRows();
|
||||||
|
return $count;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function viewasset($asset, $Asset_Code)
|
function viewasset($asset, $Asset_Code)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -431,7 +431,7 @@ where Dept.DEPCode not in
|
|||||||
|
|
||||||
function checkCostCenter($CostCenterName){
|
function checkCostCenter($CostCenterName){
|
||||||
$builder = $this->db->table('t_costcenter_master')
|
$builder = $this->db->table('t_costcenter_master')
|
||||||
->where('IsActive',1)
|
->select('CostCenterName,IsActive')
|
||||||
->where('CostCenterName', $CostCenterName);
|
->where('CostCenterName', $CostCenterName);
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
|
|||||||
@ -292,7 +292,7 @@ class Rawmaterialdetails_model extends Model
|
|||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
->select('MaterialCode,MaterialName,MaterialType,Category')
|
->select('MaterialCode,MaterialName,MaterialType,Category,IsActive')
|
||||||
->like('REPLACE(MaterialName, " ", "")', $material);
|
->like('REPLACE(MaterialName, " ", "")', $material);
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|||||||
@ -55,8 +55,7 @@ class Supplier_model extends Model
|
|||||||
|
|
||||||
function checkTransporter($transporterName){
|
function checkTransporter($transporterName){
|
||||||
$builder = $this->db->table('t_transporter')
|
$builder = $this->db->table('t_transporter')
|
||||||
->where('name', $transporterName)
|
->where('name', $transporterName);
|
||||||
->where('isactive',1);
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
|
|||||||
@ -308,10 +308,15 @@
|
|||||||
success: function(data) {
|
success: function(data) {
|
||||||
var count = data.length;
|
var count = data.length;
|
||||||
//alert(count);
|
//alert(count);
|
||||||
|
console.log(data[0].IsActive);
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
if(data[0].IsActive == 1){
|
||||||
alert('Material name already existed ! ');
|
alert('Material name already existed ! ');
|
||||||
|
}else{
|
||||||
|
alert('Material name already existing in the deleted section.!!');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var related_name = "";
|
var related_name = "";
|
||||||
$.each(data, function(i, obj) {
|
$.each(data, function(i, obj) {
|
||||||
|
|||||||
@ -268,11 +268,15 @@
|
|||||||
id: supplier
|
id: supplier
|
||||||
},
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var count = data.length;
|
var count = data?data.length:0;
|
||||||
console.log(data);
|
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert('supplier already existed ! ');
|
if(data[0].IsActive == 1){
|
||||||
|
alert('supplier already existed ! ');
|
||||||
|
}else{
|
||||||
|
alert('supplier already existing in the deleted section..!! ');
|
||||||
|
}
|
||||||
|
|
||||||
var related_supplier = "";
|
var related_supplier = "";
|
||||||
$.each(data, function(i, obj) {
|
$.each(data, function(i, obj) {
|
||||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||||
|
|||||||
@ -71,6 +71,19 @@
|
|||||||
|
|
||||||
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
|
||||||
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
|
||||||
|
<div style="margin-left:auto">
|
||||||
|
<div class="form-check" style="margin-right: 25px;">
|
||||||
|
<input class="form-check-input" type="checkbox" id="showArchiveId" name="showArchive"
|
||||||
|
value="1" onchange="showArchiveList()" style="width: 18px; height: 18px;">
|
||||||
|
<label class="form-check-label" for="showArchiveId" style="font-size: 1rem; margin-left: 8px;">
|
||||||
|
Show Archive
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="error" id="error"></div>
|
<div class="error" id="error"></div>
|
||||||
</form>
|
</form>
|
||||||
<div class="card-body" style="overflow-x:scroll;">
|
<div class="card-body" style="overflow-x:scroll;">
|
||||||
@ -89,6 +102,7 @@
|
|||||||
<th>Received Date</th>
|
<th>Received Date</th>
|
||||||
<th>Asset Value</th>
|
<th>Asset Value</th>
|
||||||
<th>Asset Status</th>
|
<th>Asset Status</th>
|
||||||
|
<th>Action</th>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -98,14 +112,23 @@
|
|||||||
if (!empty($userRecords)) {
|
if (!empty($userRecords)) {
|
||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr
|
||||||
|
class="<?php if($record->IsActive == 0){echo"deactivatedRow";}?>"
|
||||||
|
style="<?php if($record->IsActive == 0){echo"display:none";}?>"
|
||||||
|
>
|
||||||
|
|
||||||
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
|
||||||
$cdate = '00-00-0000';
|
$cdate = '00-00-0000';
|
||||||
} else {
|
} else {
|
||||||
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
|
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
|
||||||
} ?>
|
} ?>
|
||||||
<td><?php echo $cdate; ?></td>
|
<td><?php echo $cdate; ?></td>
|
||||||
<td><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
|
<td>
|
||||||
|
<a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>"
|
||||||
|
data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details">
|
||||||
|
<?php echo substr($record->AssetCode, 5) ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td><?php echo $record->AssetName ?></td>
|
<td><?php echo $record->AssetName ?></td>
|
||||||
<td><?php echo $record->Description ?></td>
|
<td><?php echo $record->Description ?></td>
|
||||||
<td><?php echo $record->DepartmentName ?></td>
|
<td><?php echo $record->DepartmentName ?></td>
|
||||||
@ -118,6 +141,34 @@
|
|||||||
echo $DOPurchase ?></td>
|
echo $DOPurchase ?></td>
|
||||||
<td><?php echo number_format($record->AssetValue, 2); ?></td>
|
<td><?php echo number_format($record->AssetValue, 2); ?></td>
|
||||||
<td><?php echo $record->AssetStatus ?></td>
|
<td><?php echo $record->AssetStatus ?></td>
|
||||||
|
<td>
|
||||||
|
<?php if ($record->IsActive == 0) { ?>
|
||||||
|
|
||||||
|
<a
|
||||||
|
onclick ="confirmReActivatingAsset()"
|
||||||
|
href="<?php echo base_url() . 'assetdetails/reActivateAsset/?AssetID=' . $record->AssetCode ?>"
|
||||||
|
data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to Re-Activate Asset Details">
|
||||||
|
<i class="fa fa-key" ></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
<a
|
||||||
|
onclick ="confirmDeleteAsset()"
|
||||||
|
href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>"
|
||||||
|
data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to View Asset Details">
|
||||||
|
<i class="fa fa-edit" ></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="<?php echo base_url() . 'assetdetails/deleteAsset/?AssetID=' . $record->AssetCode ?>"
|
||||||
|
data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to Delete Asset Details">
|
||||||
|
<i class="fa fa-trash" ></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@ -126,7 +177,11 @@
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<p>( Note :The entries count includes archived data... )</p>
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
|
<br>
|
||||||
|
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
</div>
|
</div>
|
||||||
@ -223,4 +278,32 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function showArchiveList() {
|
||||||
|
let isChecked = $("#showArchiveId").prop('checked');
|
||||||
|
|
||||||
|
// Show or hide the rows based on checkbox status
|
||||||
|
$(".deactivatedRow").each(function() {
|
||||||
|
if (isChecked) {
|
||||||
|
$(this).show();
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
showArchiveList();
|
||||||
|
});
|
||||||
|
|
||||||
|
function confirmReActivatingAsset(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmDeleteAsset(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -225,13 +225,19 @@
|
|||||||
data: {
|
data: {
|
||||||
CostCenterName: $('#CostCenterName').val()
|
CostCenterName: $('#CostCenterName').val()
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
let isactive =data[0].IsActive;
|
||||||
|
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
|
||||||
if (response) {
|
if(isactive == 1){
|
||||||
alert("Cost Center Name Already Exists..!!");
|
alert("Cost Center Name Exists..!!");
|
||||||
|
}else{
|
||||||
|
alert("Cost Center Name Existing in the deleted section ..!!");
|
||||||
|
}
|
||||||
$('#ccwizard').modal('hide');
|
$('#ccwizard').modal('hide');
|
||||||
location.reload();
|
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|||||||
@ -458,8 +458,11 @@ if ($total <= $reorder) {
|
|||||||
|
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
if(data[0].IsActive == 1){
|
||||||
alert('Material name already existed ! ');
|
alert('Material name already existed ! ');
|
||||||
|
}else{
|
||||||
|
alert('Material name already existing in the deleted section.!!');
|
||||||
|
}
|
||||||
var related_name = "";
|
var related_name = "";
|
||||||
$.each(data, function(i, obj) {
|
$.each(data, function(i, obj) {
|
||||||
|
|
||||||
|
|||||||
@ -582,7 +582,11 @@ if (!empty($supplier)) {
|
|||||||
var count = data.length;
|
var count = data.length;
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert('supplier already existed ! ');
|
if(data[0].IsActive == 1){
|
||||||
|
alert('supplier already existed ! ');
|
||||||
|
}else{
|
||||||
|
alert('supplier already existing in the deleted section..!! ');
|
||||||
|
}
|
||||||
var related_supplier = "";
|
var related_supplier = "";
|
||||||
$.each(data, function (i, obj) {
|
$.each(data, function (i, obj) {
|
||||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<a class="a_tag_link"
|
<a class="a_tag_link"
|
||||||
href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>"
|
href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><i class="fa fa-edit" style="color:#02a8b5;"></i>
|
title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><i class="fa fa-edit" style="color:#02a8b5;"></i>
|
||||||
@ -151,7 +151,7 @@
|
|||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="<?= $record->MaterialCode ?> - Click here to delete material details"
|
title="<?= $record->MaterialCode ?> - Click here to delete material details"
|
||||||
onclick="deleteMaterial('<?php echo $record->MaterialCode; ?>')"><i class="fa fa-trash" style="color:#02a8b5;"></i>
|
onclick="deleteMaterial('<?php echo $record->MaterialCode; ?>')"><i class="fa fa-trash" style="color:#02a8b5;"></i>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -247,6 +247,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#tempClick').click(function () {
|
$('#tempClick').click(function () {
|
||||||
|
//loader is initiated
|
||||||
|
$('#loader').show();
|
||||||
|
|
||||||
if ($('#transportername').val() === '') {
|
if ($('#transportername').val() === '') {
|
||||||
alert('Please Enter the Transporter Name');
|
alert('Please Enter the Transporter Name');
|
||||||
return;
|
return;
|
||||||
@ -266,12 +269,15 @@
|
|||||||
data: {
|
data: {
|
||||||
transportername
|
transportername
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (data) {
|
||||||
console.log("response", response);
|
|
||||||
if (response) {
|
if (data && data.length > 0) {
|
||||||
alert("Already Transporter with this Name Exists..!!");
|
let isactive = data[0].isactive;
|
||||||
window.location.href = "transporterListing";
|
if (isactive == 1 ) { alert(" Transporter with this Name Exists..!!"); }
|
||||||
return true;
|
else { alert(" Transporter with this Name Existing in deleted section ..!!"); }
|
||||||
|
|
||||||
|
$('#transporterwizard').modal('hide');
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@ -289,12 +295,22 @@
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
alert('An error occurred: ' + error);
|
alert('An error occurred: ' + error);
|
||||||
|
},
|
||||||
|
complete: function () {
|
||||||
|
//loader is stopped
|
||||||
|
$('#loader').hide();
|
||||||
|
console.log('second ajax call completed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
alert('An error occurred inside Check transporterExsits: ' + error);
|
alert('An error occurred inside Check transporterExsits: ' + error);
|
||||||
|
},
|
||||||
|
complete: function () {
|
||||||
|
//loader is stopped
|
||||||
|
$('#loader').hide();
|
||||||
|
console.log('first ajax call completed')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user