Raised trackers issues 3
This commit is contained in:
parent
ea1aa1923c
commit
2040199888
@ -236,7 +236,7 @@ class Requisitionform extends BaseController
|
|||||||
$ReqType = $this->request->getPost('id');
|
$ReqType = $this->request->getPost('id');
|
||||||
$CatType = $this->request->getPost('cid');
|
$CatType = $this->request->getPost('cid');
|
||||||
|
|
||||||
$MaterialCode = $this->requistion_model->GetMaterialCode($ReqType,$CatType);
|
$MaterialCode = $this->requistion_model->GetMaterialCode($ReqType);
|
||||||
$MaterialName = "";
|
$MaterialName = "";
|
||||||
$UOM = "";
|
$UOM = "";
|
||||||
$HTML = "<option value='-1'>Select Material Type</option>";
|
$HTML = "<option value='-1'>Select Material Type</option>";
|
||||||
|
|||||||
@ -172,13 +172,14 @@ class Requistion_model extends Model
|
|||||||
* This function is used to get the Material details for the Request type
|
* This function is used to get the Material details for the Request type
|
||||||
* @return array $result : This is result of the query
|
* @return array $result : This is result of the query
|
||||||
*/
|
*/
|
||||||
function GetMaterialCode($ReqType,$CatType,$NotArray='')
|
function GetMaterialCode($ReqType,$NotArray='')
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
->select('MaterialCode, MaterialName,UOM,material_rate,HSNCODE')
|
->select('MaterialCode, MaterialName,UOM,material_rate,HSNCODE')
|
||||||
->where('IsActive',1)
|
|
||||||
->where('Category',$CatType);
|
->where('IsActive',1);
|
||||||
//->where('MaterialType',$ReqType );
|
//->where('MaterialType',$ReqType );
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
if($NotArray == '')
|
if($NotArray == '')
|
||||||
{
|
{
|
||||||
@ -189,6 +190,7 @@ class Requistion_model extends Model
|
|||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to get the Raw Material information
|
* This function is used to get the Raw Material information
|
||||||
* @return array $result : This is result of the query
|
* @return array $result : This is result of the query
|
||||||
|
|||||||
@ -2083,8 +2083,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#ServiceMaterialCode').change(function () {
|
$('#ServiceMaterialCode').change(function () {
|
||||||
|
|
||||||
var selectedMaterialCode = '';
|
var selectedMaterialCode = '';
|
||||||
selectedMaterialCode = $("#ServiceMaterialCode").val();
|
selectedMaterialCode = $("#ServiceMaterialCode").val(); // First I have get the data from materialcode dropdown
|
||||||
|
clearServiceModalFields(); // then Clear All Fields
|
||||||
|
$("#ServiceMaterialCode").val(selectedMaterialCode); // again i fetched the materialcode in that dropdown // konjam loose thaan
|
||||||
$.each(JSON.parse(materialData), function (index, value) {
|
$.each(JSON.parse(materialData), function (index, value) {
|
||||||
if (selectedMaterialCode == value.MaterialCode) {
|
if (selectedMaterialCode == value.MaterialCode) {
|
||||||
$("#ServiceDescription").val(value.MaterialName);
|
$("#ServiceDescription").val(value.MaterialName);
|
||||||
@ -2292,17 +2295,17 @@ if (!empty($INRSYMBOL)) {
|
|||||||
*/
|
*/
|
||||||
$('#MaterialCode').on('change', function () {
|
$('#MaterialCode').on('change', function () {
|
||||||
console.log("111111111111");
|
console.log("111111111111");
|
||||||
|
|
||||||
// $('#MaterialCode').change(function() {
|
|
||||||
var selectedRevenueMaterialCode = '';
|
var selectedRevenueMaterialCode = '';
|
||||||
selectedRevenueMaterialCode = $("#MaterialCode").val();
|
selectedRevenueMaterialCode = $("#MaterialCode").val();// First I have get the data from materialcode dropdown
|
||||||
console.log(materialData);
|
clearRevenueModalFields();// then Clear All Fields
|
||||||
console.log("materialData - 1111111");
|
// $('#MaterialCode').change(function() {
|
||||||
|
$("#MaterialCode").val(selectedRevenueMaterialCode); // again i fetched the materialcode in that dropdown // konjam loose thaan
|
||||||
$.each(JSON.parse(materialData), function (index, value) {
|
$.each(JSON.parse(materialData), function (index, value) {
|
||||||
if (selectedRevenueMaterialCode == value.MaterialCode) {
|
if (selectedRevenueMaterialCode == value.MaterialCode) {
|
||||||
$("#ItemName").val(value.MaterialName);
|
$("#ItemName").val(value.MaterialName);
|
||||||
$("#UOM").val(value.UOM);
|
$("#UOM").val(value.UOM);
|
||||||
$("#Rate").val(value.material_rate);
|
$("#Rate").val(value.material_rate);
|
||||||
|
$("#Quantity").val(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -3599,7 +3602,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<a class="btn btn-secondary" data-dismiss="modal" value="Cancel" style="margin:10px;">Cancel</a>
|
<a class="btn btn-secondary" data-dismiss="modal" value="Cancel" style="margin:10px;" onclick="clearRevenueModalFields()">Cancel</a>
|
||||||
<a class="btn btn-success font AddRevenue" ID="AddRevenue"> <span class="bold">Add Revenue</span></a>
|
<a class="btn btn-success font AddRevenue" ID="AddRevenue"> <span class="bold">Add Revenue</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3893,7 +3896,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-secondary" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-secondary" data-dismiss="modal" value="Cancel" onclick="clearServiceModalFields()">Cancel</a>
|
||||||
|
|
||||||
<a class="btn btn-success font AddService" ID="AddService"> <span class="bold">Add Service</span></a>
|
<a class="btn btn-success font AddService" ID="AddService"> <span class="bold">Add Service</span></a>
|
||||||
</div>
|
</div>
|
||||||
@ -6248,7 +6251,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#deptName').val('');
|
$('#deptName').val('');
|
||||||
$('#CostCenter').val("0");
|
$('#CostCenter').val("0");
|
||||||
$('#AvlBudAmt').val(0);
|
$('#AvlBudAmt').val(0);
|
||||||
$('#MaterialCode').val('');
|
$('#MaterialCode').val("").select2();
|
||||||
$("#ItemName").val('');
|
$("#ItemName").val('');
|
||||||
$('#UOM').val('');
|
$('#UOM').val('');
|
||||||
$("#Rate").val('');
|
$("#Rate").val('');
|
||||||
|
|||||||
@ -322,17 +322,6 @@ td {
|
|||||||
aria-hidden="true">×</button>
|
aria-hidden="true">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body p-4">
|
<div class="modal-body p-4">
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="AddCategory" class="control-label">Material Category</label>
|
|
||||||
<?php
|
|
||||||
$options = array("0" => 'Category');
|
|
||||||
echo form_dropdown('AddCategory', $options, set_value('AddCategory'), 'id="AddCategory" class="form-control searchabledropdown" ');
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -353,14 +342,14 @@ td {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="AddCategory" class="control-label">Category</label>
|
<label for="AddCategory" class="control-label">Material Category</label>
|
||||||
<input type ="text" id="AddCategory" readonly class="form-control">
|
<input type ="text" id="AddCategory" readonly class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<div class="row" id="otherDescription" style="display:none;">
|
<div class="row" id="otherDescription" style="display:none;">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -508,17 +497,35 @@ td {
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".searchabledropdown").select2();
|
$(".searchabledropdown").select2();
|
||||||
$.ajax({
|
// $('#AddCategory').change(function() {
|
||||||
dataType: 'json',
|
// var id = $('#RequestType').val();
|
||||||
type: "POST",
|
// var cid = $('#AddCategory').val();
|
||||||
url: "<?php echo base_url(); ?>getCategoryDetails",
|
// if(id){
|
||||||
success: function(json) {
|
// $.ajax({
|
||||||
console.log(json);
|
// data: {
|
||||||
$("#AddCategory").empty();
|
// id: id,
|
||||||
$("#drpMaterial").empty();
|
// cid : cid
|
||||||
$("#AddCategory").append(json.Category);
|
// },
|
||||||
}
|
// dataType: 'json',
|
||||||
});
|
// type: "POST",
|
||||||
|
// url: "<?php echo base_url(); ?>getMaterialCode",
|
||||||
|
// success: function(json) {
|
||||||
|
// console.log(json);
|
||||||
|
// // $('#content').loader('hide');
|
||||||
|
|
||||||
|
// $("#drpMaterial").empty();
|
||||||
|
// $("#drpMaterial").append(json.Material);
|
||||||
|
// // $("#Description").val(json.MaterialName);
|
||||||
|
// // $("#UOM").val(json.UOM);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// });
|
||||||
|
// }else{
|
||||||
|
// alert('Please select the Material Category');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
function isNumberKey(evt) {
|
function isNumberKey(evt) {
|
||||||
@ -532,36 +539,6 @@ td {
|
|||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
$('#AddCategory').change(function() {
|
|
||||||
var id = $('#RequestType').val();
|
|
||||||
var cid = $('#AddCategory').val();
|
|
||||||
if(id){
|
|
||||||
$.ajax({
|
|
||||||
data: {
|
|
||||||
id: id,
|
|
||||||
cid : cid
|
|
||||||
},
|
|
||||||
dataType: 'json',
|
|
||||||
type: "POST",
|
|
||||||
url: "<?php echo base_url(); ?>getMaterialCode",
|
|
||||||
success: function(json) {
|
|
||||||
console.log(json);
|
|
||||||
// $('#content').loader('hide');
|
|
||||||
|
|
||||||
$("#drpMaterial").empty();
|
|
||||||
$("#drpMaterial").append(json.Material);
|
|
||||||
// $("#Description").val(json.MaterialName);
|
|
||||||
// $("#UOM").val(json.UOM);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
alert('Please select the Material Category');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var j = 0;
|
var j = 0;
|
||||||
var ReqLineItem = <?php echo json_encode($LineItem, JSON_PRETTY_PRINT) ?>;
|
var ReqLineItem = <?php echo json_encode($LineItem, JSON_PRETTY_PRINT) ?>;
|
||||||
$.each(ReqLineItem, function(idx, obj) {
|
$.each(ReqLineItem, function(idx, obj) {
|
||||||
@ -619,7 +596,7 @@ td {
|
|||||||
//alert(converttext)
|
//alert(converttext)
|
||||||
|
|
||||||
$("#Description").val('');
|
$("#Description").val('');
|
||||||
|
$("#AddCategory").val('');
|
||||||
$("#UOM").val('');
|
$("#UOM").val('');
|
||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
|
|
||||||
@ -636,7 +613,7 @@ td {
|
|||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
//alert(json.MatDetail);
|
//alert(json.MatDetail);
|
||||||
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
||||||
|
$("#AddCategory").val(json.MatDetail[0]['CategoryName']);
|
||||||
$("#UOM").val(json.MatDetail[0]['UOM']);
|
$("#UOM").val(json.MatDetail[0]['UOM']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -878,7 +855,7 @@ td {
|
|||||||
var uom = $("#UOM").val();
|
var uom = $("#UOM").val();
|
||||||
var quantity = $("#Quantity").val();
|
var quantity = $("#Quantity").val();
|
||||||
var materialdescription = $('#otherD').val();
|
var materialdescription = $('#otherD').val();
|
||||||
var categoryName = $('#AddCategory option:selected').text();
|
var categoryName = $('#AddCategory').val();
|
||||||
var selectedText = $('#drpMaterial option:selected').text();
|
var selectedText = $('#drpMaterial option:selected').text();
|
||||||
var parts = selectedText.split('-');
|
var parts = selectedText.split('-');
|
||||||
var HSN = selectedText.includes('-') && /^\d+$/.test(parts[0].trim())
|
var HSN = selectedText.includes('-') && /^\d+$/.test(parts[0].trim())
|
||||||
|
|||||||
@ -208,18 +208,6 @@ if (!empty($Emp)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body p-4">
|
<div class="modal-body p-4">
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="AddCategory" class="control-label">Material Category</label>
|
|
||||||
<?php
|
|
||||||
$options = array("0" => 'Category');
|
|
||||||
echo form_dropdown('AddCategory', $options, set_value('AddCategory'), 'id="AddCategory" class="form-control searchabledropdown" ');
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -239,14 +227,14 @@ if (!empty($Emp)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="AddCategory" class="control-label">Category</label>
|
<label for="AddCategory" class="control-label">Material Category</label>
|
||||||
<input type ="text" id="AddCategory" readonly class="form-control">
|
<input type ="text" id="AddCategory" readonly class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<div class="row" id="otherDescription" style="display:none;" >
|
<div class="row" id="otherDescription" style="display:none;" >
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -313,9 +301,10 @@ if (!empty($Emp)) {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EditCategory" class="control-label">Material Category</label>
|
<input type="hidden" name="EditMaterialCode" id="EditMaterialCode" />
|
||||||
|
<label for="EditMaterialCode" class="control-label">Material Code</label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('value' => set_value('EditCategory'), 'id' => 'EditCategory', 'class' => 'form-control', 'readonly' => 'true');
|
$data = array('value' => set_value('EditMaterialType'), 'id' => 'EditMaterialType', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -325,10 +314,9 @@ if (!empty($Emp)) {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="hidden" name="EditMaterialCode" id="EditMaterialCode" />
|
<label for="EditCategory" class="control-label">Material Category</label>
|
||||||
<label for="EditMaterialCode" class="control-label">Material Code</label>
|
|
||||||
<?php
|
<?php
|
||||||
$data = array('value' => set_value('EditMaterialType'), 'id' => 'EditMaterialType', 'class' => 'form-control', 'readonly' => 'true');
|
$data = array('value' => set_value('EditCategory'), 'id' => 'EditCategory', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -450,13 +438,20 @@ if (!empty($Emp)) {
|
|||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
// $('#content').loader('show');
|
// $('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
data: {
|
||||||
|
id: id
|
||||||
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url(); ?>getCategoryDetails",
|
url: "<?php echo base_url(); ?>getMaterialCode",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
console.log(json);
|
console.log(json);
|
||||||
$("#AddCategory").empty();
|
// $('#content').loader('hide');
|
||||||
$("#AddCategory").append(json.Category);
|
|
||||||
|
$("#MaterialCode").empty();
|
||||||
|
$("#MaterialCode").append(json.Material);
|
||||||
|
// $("#Description").val(json.MaterialName);
|
||||||
|
// $("#UOM").val(json.UOM);
|
||||||
if (id != 'SERVICE') {
|
if (id != 'SERVICE') {
|
||||||
$('#DisplayScheduleDiv').hide();
|
$('#DisplayScheduleDiv').hide();
|
||||||
} else {
|
} else {
|
||||||
@ -472,36 +467,6 @@ if (!empty($Emp)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#AddCategory').change(function() {
|
|
||||||
var id = $('#RequestType').val();
|
|
||||||
var cid = $('#AddCategory').val();
|
|
||||||
if(id){
|
|
||||||
$.ajax({
|
|
||||||
data: {
|
|
||||||
id: id,
|
|
||||||
cid : cid
|
|
||||||
},
|
|
||||||
dataType: 'json',
|
|
||||||
type: "POST",
|
|
||||||
url: "<?php echo base_url(); ?>getMaterialCode",
|
|
||||||
success: function(json) {
|
|
||||||
console.log(json);
|
|
||||||
// $('#content').loader('hide');
|
|
||||||
|
|
||||||
$("#MaterialCode").empty();
|
|
||||||
$("#MaterialCode").append(json.Material);
|
|
||||||
// $("#Description").val(json.MaterialName);
|
|
||||||
// $("#UOM").val(json.UOM);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
alert('Please select the Material Category');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('#MaterialCode').change(function() {
|
$('#MaterialCode').change(function() {
|
||||||
|
|
||||||
var id = $('#MaterialCode').val();
|
var id = $('#MaterialCode').val();
|
||||||
@ -513,7 +478,7 @@ if (!empty($Emp)) {
|
|||||||
// alert(checkanswer)
|
// alert(checkanswer)
|
||||||
|
|
||||||
$("#Description").val('');
|
$("#Description").val('');
|
||||||
// $("#AddCategory").val('');
|
$("#AddCategory").val('');
|
||||||
$("#UOM").val('');
|
$("#UOM").val('');
|
||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
|
|
||||||
@ -531,7 +496,7 @@ if (!empty($Emp)) {
|
|||||||
// $('#content').loader('hide');
|
// $('#content').loader('hide');
|
||||||
//alert(json.MatDetail);
|
//alert(json.MatDetail);
|
||||||
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
||||||
// $("#AddCategory").val(json.MatDetail[0]['CategoryName']);
|
$("#AddCategory").val(json.MatDetail[0]['CategoryName']);
|
||||||
$("#UOM").val(json.MatDetail[0]['UOM']);
|
$("#UOM").val(json.MatDetail[0]['UOM']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -695,7 +660,6 @@ if (!empty($Emp)) {
|
|||||||
<script>
|
<script>
|
||||||
$('.addClick').click(function() {
|
$('.addClick').click(function() {
|
||||||
|
|
||||||
console.log($("#AddCategory option:selected").text());
|
|
||||||
if ($("#MaterialCode option:selected").val() == '-1') {
|
if ($("#MaterialCode option:selected").val() == '-1') {
|
||||||
alert('Please Select The MaterialCode ');
|
alert('Please Select The MaterialCode ');
|
||||||
return false;
|
return false;
|
||||||
@ -712,7 +676,7 @@ if (!empty($Emp)) {
|
|||||||
var temp = index;
|
var temp = index;
|
||||||
var materialCode = $("#MaterialCode option:selected").val();
|
var materialCode = $("#MaterialCode option:selected").val();
|
||||||
var materialName = $("#Description").val();
|
var materialName = $("#Description").val();
|
||||||
var categoryName = $("#AddCategory option:selected").text();
|
var categoryName = $('#AddCategory').val();
|
||||||
var uom = $("#UOM").val();
|
var uom = $("#UOM").val();
|
||||||
var quantity = $("#Quantity").val();
|
var quantity = $("#Quantity").val();
|
||||||
var materialdescription = $('#otherD').val();
|
var materialdescription = $('#otherD').val();
|
||||||
@ -834,7 +798,7 @@ if (!empty($Emp)) {
|
|||||||
|
|
||||||
var editMaterialType = $('#EditMaterialType').val();
|
var editMaterialType = $('#EditMaterialType').val();
|
||||||
var editparts = editMaterialType.split('-');
|
var editparts = editMaterialType.split('-');
|
||||||
var editHSN = editMaterialType.includes('-') && /^\d+$/.test(editparts[0].trim())
|
var editHSN = editselectedText.includes('-') && /^\d+$/.test(editparts[0].trim())
|
||||||
? editparts[0].trim()
|
? editparts[0].trim()
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
@ -958,4 +922,34 @@ if (!empty($Emp)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// $('#AddCategory').change(function() {
|
||||||
|
// var id = $('#RequestType').val();
|
||||||
|
// var cid = $('#AddCategory').val();
|
||||||
|
// if(id){
|
||||||
|
// $.ajax({
|
||||||
|
// data: {
|
||||||
|
// id: id,
|
||||||
|
// cid : cid
|
||||||
|
// },
|
||||||
|
// dataType: 'json',
|
||||||
|
// type: "POST",
|
||||||
|
// url: "<?php echo base_url(); ?>getMaterialCode",
|
||||||
|
// success: function(json) {
|
||||||
|
// console.log(json);
|
||||||
|
// // $('#content').loader('hide');
|
||||||
|
|
||||||
|
// $("#MaterialCode").empty();
|
||||||
|
// $("#MaterialCode").append(json.Material);
|
||||||
|
// // $("#Description").val(json.MaterialName);
|
||||||
|
// // $("#UOM").val(json.UOM);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// });
|
||||||
|
// }else{
|
||||||
|
// alert('Please select the Material Category');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user