worked on asset section in master -vadivel J
This commit is contained in:
parent
85fdc8d705
commit
018c48aab8
@ -73,8 +73,12 @@ $routes->get('exportcost', 'CostCenter::exportcost');
|
||||
// Asset Detail Routes
|
||||
$routes->get('assetListing', 'Assetdetails::assetListing');
|
||||
$routes->get('addasset', 'Assetdetails::addasset');
|
||||
$routes->post('assetdetails/getpodetails','Assetdetails::getpodetails');
|
||||
$routes->post('assetdetails/getline','Assetdetails::getline');
|
||||
|
||||
$routes->get('assetdetails/editOldasset', 'Assetdetails::editOldasset');
|
||||
// $routes->post('addNewasset', 'Assetdetails::addNewasset');
|
||||
//uncommenting addNewAsset
|
||||
$routes->post('addNewasset', 'Assetdetails::addNewasset');
|
||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset', 'Assetdetails::editasset');
|
||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editOldasset/(:num)', 'Assetdetails::editasset/$1');
|
||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'],'editasset', 'Assetdetails::editasset');
|
||||
|
||||
@ -66,13 +66,11 @@ class Assetdetails extends BaseController
|
||||
$data['AssetStatus'] = $this->assetdetails_model->getConfigValue('C015');
|
||||
$data['po'] = $this->assetdetails_model->getPO();
|
||||
|
||||
// print_r($data);die();
|
||||
$this->global['pageTitle'] = 'Add Asset';
|
||||
|
||||
$this->loadViews("addasset", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
function getpodetails()
|
||||
{
|
||||
$PO = $this->request->getPost('PONO');
|
||||
@ -83,12 +81,10 @@ class Assetdetails extends BaseController
|
||||
$HTML = "<option value='0'>SelectMaterialCode</option>";
|
||||
if (count($data) > 0) {
|
||||
for ($j = 0; $j < count($data); $j++) {
|
||||
$Code = $data[$j]->LineItemNo;
|
||||
$Name = $data[$j]->MaterialCode;
|
||||
$lineItem = $data[$j]->LineItemNo;
|
||||
$materialCode= $data[$j]->MaterialCode;
|
||||
|
||||
|
||||
|
||||
$HTML .= "<option value='" . $Code . "'>" . $Code . "-" . $Name . "</option>";
|
||||
$HTML .= "<option value='" . $materialCode . "'>" . $lineItem . "-" . $materialCode . "</option>";
|
||||
}
|
||||
}
|
||||
//echo $HTML;
|
||||
@ -268,7 +264,12 @@ class Assetdetails extends BaseController
|
||||
$asset = array();
|
||||
|
||||
|
||||
$asset = array('AssetName' => $AssetName, 'Description' => $Description, 'DEPCode' => $Department, 'Location' => $Location, 'UserName' => $User, 'SupplierCode' => $SupplierName, 'DateOfPurchase' => $DOpurchase, 'DateOfCommison' => $DOCommission, 'AssetValue' => $AssetValue, 'AssetStatus' => $AssetStatus, 'IsActive' => $IsActive, 'Remarks' => $Remarks, 'CreatedBy' => $CreatedBy, 'PONO' => $PONO, 'POLineItem' => $lineitem, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity);
|
||||
$asset = array('AssetName' => $AssetName, 'Description' => $Description, 'DEPCode' => $Department, 'Location' => $Location,
|
||||
'UserName' => $User, 'SupplierCode' => $SupplierName, 'DateOfPurchase' => $DOpurchase, 'DateOfCommison' => $DOCommission,
|
||||
'AssetValue' => $AssetValue, 'AssetStatus' => $AssetStatus, 'IsActive' => $IsActive, 'Remarks' => $Remarks,
|
||||
'CreatedBy' => $CreatedBy, 'PONO' => $PONO, 'POLineItem' => $lineitem, 'MaterialCode' => $MaterialCode,
|
||||
'Quantity' => $Quantity);
|
||||
|
||||
$result = $this->assetdetails_model->addNewasset($asset);
|
||||
|
||||
if ($result > 0) {
|
||||
@ -310,7 +311,7 @@ class Assetdetails extends BaseController
|
||||
// $data['DepartmentList'] = $this->assetdetails_model->getDepartment($Department);
|
||||
$data['AssetStatusList'] = $this->assetdetails_model->getConfigValue('C015');
|
||||
$data['PO'] = $this->assetdetails_model->getPO($PO);
|
||||
//print_r($data);die();
|
||||
// print_r($data);die();
|
||||
$this->global['pageTitle'] = 'Edit Asset';
|
||||
|
||||
$this->loadViews("editOldasset", $this->global, $data, NULL);
|
||||
@ -376,7 +377,7 @@ class Assetdetails extends BaseController
|
||||
$Asset_Code = $this->request->getPost('AssetCode');
|
||||
$assetName = $this->request->getPost('AssetName');
|
||||
$AssetName = (!empty($assetName)) ? strtoupper((string)$assetName) : '';
|
||||
$Description = $this->request->getPost('Description');
|
||||
$Description = $this->request->getPost('PODescription');
|
||||
$Department = $this->request->getPost('AssetDept');
|
||||
$Location = $this->request->getPost('Location');
|
||||
$User = $this->request->getPost('User');
|
||||
@ -411,11 +412,28 @@ class Assetdetails extends BaseController
|
||||
$IsActive = '0';
|
||||
}
|
||||
|
||||
|
||||
$asset = array();
|
||||
|
||||
|
||||
$asset = array('AssetName' => $AssetName, 'Description' => $Description, 'DEPCode' => $Department, 'Location' => $Location, 'UserName' => $User, 'SupplierCode' => $SupplierName, 'DateOfPurchase' => $DOpurchase, 'DateOfCommison' => $DOCommission, 'AssetValue' => $Assetvalue, 'AssetStatus' => $AssetStatus, 'IsActive' => $IsActive, 'Remarks' => $Remarks, 'UpdatedBy' => $UpdatedBy, 'PONO' => $PONO, 'POLineItem' => $lineitem, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity);
|
||||
$asset = array(
|
||||
'AssetName' => $AssetName,
|
||||
'Description' => $Description,
|
||||
'DEPCode' => $Department,
|
||||
'Location' => $Location,
|
||||
'UserName' => $User,
|
||||
'SupplierCode' => $SupplierName,
|
||||
'DateOfPurchase' => $DOpurchase,
|
||||
'DateOfCommison' => $DOCommission,
|
||||
'AssetValue' => $Assetvalue,
|
||||
'AssetStatus' => $AssetStatus,
|
||||
'IsActive' => $IsActive,
|
||||
'Remarks' => $Remarks,
|
||||
'UpdatedBy' => $UpdatedBy,
|
||||
'PONO' => $PONO,
|
||||
'POLineItem' => $lineitem,
|
||||
'MaterialCode' => $MaterialCode,
|
||||
'Quantity' => $Quantity);
|
||||
|
||||
|
||||
$result = $this->assetdetails_model->editasset($asset, $Asset_Code);
|
||||
|
||||
|
||||
@ -88,7 +88,10 @@ class Assetdetails_model extends Model
|
||||
function getlineitemre($line)
|
||||
{
|
||||
$builder = $this->db->table('t_purchaseorder_lineitem POL')
|
||||
->select('POL.LineItemNo,POL.MaterialCode,MM.MaterialName,MM.UOM,POL.Quantity,POM.POType,re.TotalValue,req.ReqNo,emp.firstname,emp.Departmentcode,dep.DepartmentName,sup.SupplierName,date(POM.DeliveryDate) as DeliveryDate,POM.PODate,POM.SupplierID')
|
||||
->select('POL.LineItemNo,POL.MaterialCode,MM.MaterialName,MM.UOM,POL.Quantity,POM.POType,re.TotalValue,
|
||||
req.ReqNo,emp.firstname,emp.Departmentcode,dep.DepartmentName,sup.SupplierName,
|
||||
date(POM.DeliveryDate) as DeliveryDate,POM.PODate,POM.SupplierID')
|
||||
|
||||
->join('t_requestion_master req', 'req.ReqNo = POL.ReqNo', 'left')
|
||||
->join('t_purchaseorder_master POM', 'POM.PONO=POL.PONO', 'left')
|
||||
->join('t_materialmaster MM', 'MM.MaterialCode = POL.MaterialCode', 'left')
|
||||
|
||||
@ -52,7 +52,7 @@ class Department_model extends Model
|
||||
{
|
||||
$builder = $this->db->table('t_departmentdetails as BaseT')
|
||||
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
||||
->orderBy("BaseT.DEPCode", "asc");
|
||||
->orderBy("BaseT.DEPCode", "desc");
|
||||
$query =$builder->get();
|
||||
$result = $query->getResult();
|
||||
return $result;
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
<label class="col-form-label" for="AssetName">Asset Name<span class="badge">*</span></label>
|
||||
<input type="text" class="form-control " required style="text-transform:uppercase;" id="AssetName" name="AssetName" value="<?php echo isset($_POST['AssetName']) ? $_POST['AssetName'] : '' ?>">
|
||||
</div>
|
||||
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="AssetDescription">Asset Description<span class="badge">*</span></label>
|
||||
<input type="text" class="form-control required" id="Description" required name="Description" value="<?php echo isset($_POST['Description']) ? $_POST['Description'] : '' ?>">
|
||||
@ -44,7 +45,7 @@
|
||||
</div>
|
||||
<div class="form-row" style="margin-top:20px">
|
||||
<div class="col-md-3">
|
||||
<label for="PurchaseOrderNumber">Purchase Order Number<span class="badge">*</span></label>
|
||||
<label for="PONO">Purchase Order Number<span class="badge">*</span></label>
|
||||
<select class="form-control required " required id="PONO" required name="PONO">
|
||||
<option value="">Select PO Number</option>
|
||||
<?php
|
||||
@ -68,9 +69,15 @@
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="text" class="form-control required" id="lineitem" name="lineitem" value="-1" hidden>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="SelectMaterialCode">Select Material Code</label>
|
||||
<select class="form-control required select2" required="" id="SelectMaterialCode" name="lineitem">
|
||||
<label for="MaterialCode">Select Material Code</label>
|
||||
<select class="form-control required select2" required="" id="MaterialCode" name="MaterialCode">
|
||||
<option value="-1">Select Material Code</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -97,7 +104,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="Quantity">Purchase Date<span style="color:red">*</span></label>
|
||||
<input type="date" id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>">
|
||||
<input id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="SupplierName">Supplier Name</label>
|
||||
@ -112,7 +119,7 @@
|
||||
<div class="form-row" style="margin-top:20px">
|
||||
<div class="col-md-3">
|
||||
<label for="DateOfCommission">Date Of Commission<span style="color:red">*</span></label>
|
||||
<input type="date" id="DateOfCommission" required name="DateOfCommission" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfCommission']) ? $_POST['DateOfCommission'] : '' ?>">
|
||||
<input id="DateOfCommission" required name="DateOfCommission" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfCommission']) ? $_POST['DateOfCommission'] : '' ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="AssetValue">Asset Value</label>
|
||||
@ -147,7 +154,7 @@
|
||||
</div>
|
||||
<div class="form-row" style="margin-top:20px">
|
||||
<div class="col-md-3">
|
||||
<input type="checkbox" id="isactive" name="isactive" <?php echo (isset($_POST['isactive']) ? 'checked' : '') ?>> <label for="">IsActive</label>
|
||||
<input type="checkbox" id="isactive" name="isactive" <?php echo (isset($_POST['isactive']) ? 'checked' : '') ?>> <label for="isactive">IsActive</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -228,26 +235,18 @@
|
||||
data: 'PONO=' + PONO,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
//alert(data);
|
||||
|
||||
console.log(data);
|
||||
var line = '';
|
||||
$('#SelectMaterialCode').empty();
|
||||
//alert('before');
|
||||
$('#MaterialCode').empty();
|
||||
|
||||
$.each(data, function(i, item) {
|
||||
//alert(item);
|
||||
|
||||
//line ='<option>select Material Code</option>';
|
||||
//line +='<option value='+item.LineItemNo+'>'+item.LineItemNo+'-'+item.MaterialCode+'</option>';
|
||||
//line +='<option value='+item.MaterialCode+'>'+item.LineItemNo+'-'+item.MaterialCode+'</option>';
|
||||
//$('#DeliveryDate').val(item.DeliveryDate);
|
||||
line += item;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#SelectMaterialCode').append(line);
|
||||
$('#MaterialCode').append(line);
|
||||
|
||||
});
|
||||
|
||||
@ -261,10 +260,16 @@
|
||||
});
|
||||
|
||||
|
||||
$('#SelectMaterialCode').on('change', function() {
|
||||
$('#MaterialCode').on('change', function() {
|
||||
|
||||
var selectedText = $('#MaterialCode option:selected').text();
|
||||
|
||||
var line = $(this).val();
|
||||
var lineItemNo = selectedText.split('-')[0];
|
||||
|
||||
var id = lineItemNo
|
||||
|
||||
var line = id;
|
||||
|
||||
//line +='<option>select Material Code</option>'
|
||||
if (line) {
|
||||
$.ajax({
|
||||
@ -272,12 +277,14 @@
|
||||
url: "<?php echo base_url() ?>assetdetails/getline",
|
||||
data: 'line=' + line,
|
||||
success: function(data) {
|
||||
// alert(data);
|
||||
|
||||
var id = $('#SelectMaterialCode').val();
|
||||
|
||||
|
||||
$.each(JSON.parse(data), function(i, item) {
|
||||
if (id == item.LineItemNo) {
|
||||
|
||||
alert(item.LineItemNo);
|
||||
// alert(item.MaterialCode);
|
||||
$('#DateOfPurchase').val(item.PODate);
|
||||
|
||||
if (item.DeliveryDate != null) {
|
||||
@ -300,7 +307,8 @@
|
||||
}
|
||||
$('#SupplierName').val(item.SupplierName);
|
||||
$('#SupID').val(item.SupplierID);
|
||||
$('#MaterialCode').val(item.MaterialCode);
|
||||
// $('#MaterialCode').val(item.MaterialCode);
|
||||
$('#lineitem').val(item.LineItemNo);
|
||||
$('#UOM').val(item.UOM);
|
||||
$('#Quantity').val(item.Quantity);
|
||||
$('#depcode').val(item.Departmentcode);
|
||||
@ -358,7 +366,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("option:selected", $("#SelectMaterialCode")).val() == '-1') {
|
||||
if ($("option:selected", $("#MaterialCode")).val() == '-1') {
|
||||
alert('Please Select MaterialCode');
|
||||
return false;
|
||||
}
|
||||
@ -392,7 +400,7 @@
|
||||
var maxdt = year - 15;
|
||||
|
||||
// $("#PONO").select2();
|
||||
// $("#SelectMaterialCode").select2();
|
||||
// $("#MaterialCode").select2();
|
||||
//$("#AssetStatus").select2();
|
||||
|
||||
$("#DateOfCommission").datepicker({
|
||||
@ -402,8 +410,6 @@
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
|
||||
|
||||
|
||||
});
|
||||
$("#DateOfPurchase").datepicker({
|
||||
minDate: new Date(year - SIAStartYear, 1, 1),
|
||||
@ -412,12 +418,8 @@
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function isNumberKey(evt) {
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
</form>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;">
|
||||
<table class="table dt-responsive nowrap w-100" id="asset_list_table" style="background-color:#fff;">
|
||||
<thead >
|
||||
<tr>
|
||||
<th>Created Date</th>
|
||||
@ -99,7 +99,7 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
|
||||
} ?>
|
||||
<td align="right"><?php echo $cdate; ?></td>
|
||||
<td ><?php echo $cdate; ?></td>
|
||||
<td><u><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><?php echo $record->AssetName ?></td>
|
||||
<td><?php echo $record->Description ?></td>
|
||||
|
||||
@ -90,6 +90,8 @@
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table class="table dt-responsive nowrap w-100" id="datatable" >
|
||||
|
||||
<table id="config_list_table" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -111,7 +113,7 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
|
||||
} ?>
|
||||
<td align="right"><?php echo $cdate; ?> </td>
|
||||
<td ><?php echo $cdate; ?> </td>
|
||||
<td><?php echo $record->Config_ID ?></td>
|
||||
<td><?php echo $record->ConfigName ?></td>
|
||||
<td><?php echo $record->Comments ?> </td>
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
|
||||
} ?>
|
||||
<td align="right"><?php echo $cdate; ?> </td>
|
||||
<td ><?php echo $cdate; ?> </td>
|
||||
<td><u><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<td><?php echo $record->HeadDept ?></td>
|
||||
|
||||
@ -160,6 +160,9 @@ if (!empty($assetList)) {
|
||||
<div class="card-body">
|
||||
<form role="form" id="addAsset" action="<?php echo base_url() ?>editasset" method="post">
|
||||
<div class="form-row">
|
||||
|
||||
<input type="text" class="form-control" id="AssetCode" name="AssetCode" value="<?php echo $AssetCode; ?>" hidden>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="AssetName">Asset Name <span class="badge">*</span></label>
|
||||
<input type="text" class="form-control" id="AssetName" name="AssetName" value="<?php echo $AssetName; ?>" style="text-transform:uppercase;" required>
|
||||
@ -191,11 +194,15 @@ if (!empty($assetList)) {
|
||||
}
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
<input type="text" class="form-control required" id="lineitem"
|
||||
name="lineitem" value="<?php echo $POLineItem; ?>" hidden>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="SelectMaterialCode">Select Material Code</label>
|
||||
<select class="form-control select2" id="SelectMaterialCode" name="lineitem">
|
||||
<option value="<?php echo $POLineItem; ?>"><?php echo $POLineItem; ?></option>
|
||||
<select class="form-control select2" id="MaterialCode" name="MaterialCode">
|
||||
<option value="<?php echo $MaterialCode; ?>"><?php echo $POLineItem."-".$MaterialCode; ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@ -213,16 +220,18 @@ if (!empty($assetList)) {
|
||||
<input type="text" class="form-control" id="PODescription" name="PODescription" value="<?php echo $MaterialName; ?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="hidden" name="AssetDept" id="depcode">
|
||||
<label for="AssetDept">Asset Department</label>
|
||||
<input type="text" class="form-control" id="AssetDept" name="AssetDept" value="<?php echo $DepartmentName; ?>" readonly>
|
||||
<input type="text" class="form-control" id="AssetDept" name="" value="<?php echo $DepartmentName; ?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="DateOfPurchase">Purchase Date</label>
|
||||
<input type="text" class="form-control" id="DateOfPurchase" name="DateOfPurchase" value="<?php echo $DateOfPurchase; ?>" required onkeypress="return false;">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="hidden" name="SupplierName" id="SupID">
|
||||
<label for="SupplierName">Supplier Name</label>
|
||||
<input type="text" class="form-control" id="SupplierName" name="SupplierName" value="<?php echo $SupplierName; ?>" readonly>
|
||||
<input type="text" class="form-control" id="SupplierName" name="" value="<?php echo $SupplierName; ?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row mt-3">
|
||||
@ -306,7 +315,7 @@ if (!empty($assetList)) {
|
||||
//alert(data);
|
||||
|
||||
var line = '';
|
||||
$('#SelectMaterialCode').empty();
|
||||
$('#MaterialCode').empty();
|
||||
//alert('before');
|
||||
$.each(data, function(i, item) {
|
||||
//alert(item);
|
||||
@ -321,9 +330,7 @@ if (!empty($assetList)) {
|
||||
|
||||
|
||||
|
||||
|
||||
$('#SelectMaterialCode').append(line);
|
||||
|
||||
$('#MaterialCode').append(line);
|
||||
});
|
||||
|
||||
|
||||
@ -335,10 +342,17 @@ if (!empty($assetList)) {
|
||||
});
|
||||
|
||||
|
||||
$('#SelectMaterialCode').on('change', function() {
|
||||
$('#MaterialCode').on('change', function() {
|
||||
|
||||
|
||||
var line = $(this).val();
|
||||
var selectedText = $('#MaterialCode option:selected').text();
|
||||
|
||||
var lineItemNo = selectedText.split('-')[0];
|
||||
|
||||
var id = lineItemNo
|
||||
|
||||
var line = id;
|
||||
|
||||
//line +='<option>select Material Code</option>'
|
||||
if (line) {
|
||||
$.ajax({
|
||||
@ -348,7 +362,6 @@ if (!empty($assetList)) {
|
||||
success: function(data) {
|
||||
//alert(data);
|
||||
|
||||
var id = $('#SelectMaterialCode').val();
|
||||
$.each(JSON.parse(data), function(i, item) {
|
||||
if (id == item.LineItemNo) {
|
||||
|
||||
@ -373,12 +386,21 @@ if (!empty($assetList)) {
|
||||
}
|
||||
$('#SupplierName').val(item.SupplierName);
|
||||
$('#SupID').val(item.SupplierID);
|
||||
|
||||
$('#MaterialCode').val(item.MaterialCode);
|
||||
$('#lineitem').val(item.LineItemNo);
|
||||
//$('#MaterialCode').val(item.MaterialCode);
|
||||
$('#UOM').val(item.UOM);
|
||||
$('#Quantity').val(item.Quantity);
|
||||
$('#depcode').val(item.Departmentcode);
|
||||
$('#AssetDept').val(item.DepartmentName);
|
||||
|
||||
console.log("supplier information");
|
||||
console.log(item.SupplierName);
|
||||
console.log(item.SupplierID);
|
||||
|
||||
console.log("department information");
|
||||
console.log(item.DepartmentName);
|
||||
console.log(item.Departmentcode);
|
||||
|
||||
$('#PODescription').val(item.MaterialName);
|
||||
|
||||
$('#Assetvalue').val(item.TotalValue);
|
||||
@ -389,7 +411,8 @@ if (!empty($assetList)) {
|
||||
|
||||
var date = new Date(item.PODate);
|
||||
var date3 = (date.getDate() + '-' + (date.getMonth() + 1) + '-' + date.getFullYear());
|
||||
$("#DateOfPurchase").val(date3);
|
||||
$("#DateOfPurchase").val(date3);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,98 +34,108 @@
|
||||
|
||||
<body class="loading auth-fluid-pages pb-0">
|
||||
|
||||
<div class="login-bg">
|
||||
<div class="auth-fluid">
|
||||
<!-- Auth fluid right content -->
|
||||
<div class="auth-fluid-right">
|
||||
<div class="auth-user-testimonial">
|
||||
<h3 class="mb-3 text-white">Welcome to Resico!</h3>
|
||||
<p class="lead font-weight-normal">
|
||||
<i class="mdi mdi-format-quote-open"></i>
|
||||
Resico (India) Pvt Ltd has marked its presence in the domestic market
|
||||
as one of the renowned Manufacturers and Suppliers of washed graded dry Silica sand.
|
||||
Backed by the modern technology, our company has gained the trust of the clients present all across the country.
|
||||
Our washed graded dry Silica sand is extensively used in various industrial applications.
|
||||
<i class="mdi mdi-format-quote-close"></i>
|
||||
</p>
|
||||
|
||||
</div> <!-- end auth-user-testimonial-->
|
||||
</div>
|
||||
<!-- end Auth fluid right content -->
|
||||
<div class="login-bg">
|
||||
<div class="auth-fluid">
|
||||
<!-- Auth fluid right content -->
|
||||
<div class="auth-fluid-right">
|
||||
<div class="auth-user-testimonial">
|
||||
<h3 class="mb-3 text-white">Welcome to Resico!</h3>
|
||||
<p class="lead font-weight-normal">
|
||||
<i class="mdi mdi-format-quote-open"></i>
|
||||
Resico (India) Pvt Ltd has marked its presence in the domestic market
|
||||
as one of the renowned Manufacturers and Suppliers of washed graded dry Silica sand.
|
||||
Backed by the modern technology, our company has gained the trust of the clients present all
|
||||
across the country.
|
||||
Our washed graded dry Silica sand is extensively used in various industrial applications.
|
||||
<i class="mdi mdi-format-quote-close"></i>
|
||||
</p>
|
||||
|
||||
<!--Auth fluid left content -->
|
||||
<div class="auth-fluid-form-box">
|
||||
<div class="align-items-center d-flex h-100">
|
||||
<div class="card-body">
|
||||
</div> <!-- end auth-user-testimonial-->
|
||||
</div>
|
||||
<!-- end Auth fluid right content -->
|
||||
|
||||
<!-- Logo -->
|
||||
<div class="auth-brand text-center text-lg-left">
|
||||
<div class="auth-logo">
|
||||
<a href="index.html" class="logo logo-dark text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> " alt=""
|
||||
height="100">
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!--Auth fluid left content -->
|
||||
<div class="auth-fluid-form-box">
|
||||
<div class="align-items-center d-flex h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<a href="index.html" class="logo logo-light text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> " alt=""
|
||||
height="100">
|
||||
</span>
|
||||
</a>
|
||||
<a href="index.html" class="logo logo-light text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url(); ?> " alt="" height="22">
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Logo -->
|
||||
<div class="auth-brand text-center text-lg-left">
|
||||
<div class="auth-logo">
|
||||
<a href="index.html" class="logo logo-dark text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> "
|
||||
alt="" height="100">
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!-- title-->
|
||||
<!-- <h4 class="mt-0">Sign In</h4> -->
|
||||
|
||||
|
||||
<!-- form -->
|
||||
<form action="<?php echo base_url(); ?>loginMe" method="post">
|
||||
<div class="form-group">
|
||||
<label for="emailaddress">Email address</label>
|
||||
<input type="email" class="form-control" placeholder="Enter your email" name="email"
|
||||
required="" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="auth-recoverpw-2.html" class="text-muted float-right"><small>Forgot your
|
||||
password?</small></a>
|
||||
<label for="password">Password</label>
|
||||
<div class="input-group input-group-merge">
|
||||
<input type="password" class="form-control" placeholder="Enter your password"
|
||||
name="password" id="password" required />
|
||||
<div class="input-group-append" data-password="false">
|
||||
<div class="input-group-text">
|
||||
<span class="password-eye"></span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="index.html" class="logo logo-light text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> "
|
||||
alt="" height="100">
|
||||
</span>
|
||||
</a>
|
||||
<a href="index.html" class="logo logo-light text-center">
|
||||
<span class="logo-lg">
|
||||
<img src="<?php echo base_url(); ?> " alt="" height="22">
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- title-->
|
||||
<!-- <h4 class="mt-0">Sign In</h4> -->
|
||||
|
||||
<div class="form-group mb-0 text-center">
|
||||
<button class="btn btn-primary btn-block" type="submit">Log In </button>
|
||||
</div>
|
||||
<!-- development-change-02/09/2024 -->
|
||||
<!-- displaying error message in the form -->
|
||||
|
||||
<?php if (session()->has('error')): ?>
|
||||
<div class="alert alert-danger">
|
||||
<?= session('error') ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</form>
|
||||
<!-- end form-->
|
||||
<!-- form -->
|
||||
<form action="<?php echo base_url(); ?>loginMe" method="post">
|
||||
<div class="form-group">
|
||||
<label for="emailaddress">Email address</label>
|
||||
<input type="email" class="form-control" placeholder="Enter your email" name="email"
|
||||
required="" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="auth-recoverpw-2.html" class="text-muted float-right"><small>Forgot your
|
||||
password?</small></a>
|
||||
<label for="password">Password</label>
|
||||
<div class="input-group input-group-merge">
|
||||
<input type="password" class="form-control" placeholder="Enter your password"
|
||||
name="password" id="password" required />
|
||||
<div class="input-group-append" data-password="false">
|
||||
<div class="input-group-text">
|
||||
<span class="password-eye"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group mb-0 text-center">
|
||||
<button class="btn btn-primary btn-block" type="submit">Log In </button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
<!-- end form-->
|
||||
|
||||
|
||||
|
||||
</div> <!-- end .card-body -->
|
||||
</div> <!-- end .align-items-center.d-flex.h-100-->
|
||||
</div> <!-- end .card-body -->
|
||||
</div> <!-- end .align-items-center.d-flex.h-100-->
|
||||
</div>
|
||||
<!-- end auth-fluid-form-box-->
|
||||
</div>
|
||||
<!-- end auth-fluid-form-box-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end auth-fluid-->
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
<div class="card-body">
|
||||
<table id="raw_material_list_table" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Created Date</th>
|
||||
<th>Material Code</th>
|
||||
@ -110,7 +110,7 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
|
||||
} ?>
|
||||
<td style="width:8%;" align="right"><?php echo $cdate; ?></td>
|
||||
<td style="width:8%;" ><?php echo $cdate; ?></td>
|
||||
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
|
||||
<td style="width:12%;"><?php echo $record->MaterialName ?></td>
|
||||
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
|
||||
|
||||
@ -113,7 +113,16 @@
|
||||
$cdate = date('d-m-Y', strtotime($record->CreatedOn));
|
||||
} ?>
|
||||
<td style="width:75px" align="right"><?php echo $cdate; ?></td>
|
||||
<td><u><a class="a-tag-link" href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>" data-toggle="tooltip" title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?></a></u></td>
|
||||
|
||||
<td>
|
||||
<u>
|
||||
<a class="a-tag-link"
|
||||
href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>"
|
||||
data-toggle="tooltip"
|
||||
title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?>
|
||||
</a>
|
||||
</u>
|
||||
</td>
|
||||
<td><?php echo $record->SupplierName ?></td>
|
||||
<td><?php echo $record->Address ?></td>
|
||||
<td><?php echo $record->ContactNumber ?></td>
|
||||
|
||||
@ -109,6 +109,7 @@
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
|
||||
<table id="transporter_list" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -83,6 +83,7 @@
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table id="user_list_table" class="table dt-responsive nowrap w-100">
|
||||
|
||||
<thead>
|
||||
<tr> <th>Created Date</th>
|
||||
<!-- <th>User Id</th> -->
|
||||
@ -106,7 +107,7 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->createdDtm));
|
||||
} ?>
|
||||
<td align="right"><?php echo $cdate; ?> </td>
|
||||
<td ><?php echo $cdate; ?> </td>
|
||||
<!-- <td><?php echo $record->userId ?></td> -->
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
<td><?php echo $record->EmailId ?></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user