stock module latest today vadivel J 11-1-2025
This commit is contained in:
parent
5a4077507e
commit
1fbe885b50
@ -324,7 +324,18 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
$this->global['pageTitle'] = 'Incoming Silica Sand Details';
|
$this->global['pageTitle'] = 'Incoming Silica Sand Details';
|
||||||
|
|
||||||
$materialCodes = $this->rawmaterialdetails_model->getAllSilicaRawMaterialCode();
|
$materialCodes = [];
|
||||||
|
|
||||||
|
$silicaSandMaterialCodes = $this->rawmaterialdetails_model->getAllSilicaRawMaterialCode();
|
||||||
|
|
||||||
|
$materialCodes [] = $silicaSandMaterialCodes;
|
||||||
|
|
||||||
|
$wasteCoreSandMaterialCodes = $this->rawmaterialdetails_model->getAllWasteCoreSandMaterialCode();
|
||||||
|
|
||||||
|
$materialCodes [] = $wasteCoreSandMaterialCodes;
|
||||||
|
|
||||||
|
$materialCodes = call_user_func_array('array_merge', $materialCodes);
|
||||||
|
|
||||||
|
|
||||||
if (!empty($materialCodes)) {
|
if (!empty($materialCodes)) {
|
||||||
$data['igrDetails'] = $this->inwardGateRegister_model->findIgrDetailsForIncomingSilicaSand($materialCodes, $month, $remark);
|
$data['igrDetails'] = $this->inwardGateRegister_model->findIgrDetailsForIncomingSilicaSand($materialCodes, $month, $remark);
|
||||||
@ -423,16 +434,16 @@ class StockController extends BaseController
|
|||||||
$dbData = [
|
$dbData = [
|
||||||
'igrNo_fk' => $postData['igrNo'],
|
'igrNo_fk' => $postData['igrNo'],
|
||||||
'materialCode' => $postData['materialCode'],
|
'materialCode' => $postData['materialCode'],
|
||||||
'_10' => $postData['10Mm'],
|
'_10' => $postData['_10Mm'],
|
||||||
'_20' => $postData['20Mm'],
|
'_20' => $postData['_20Mm'],
|
||||||
'_30' => $postData['30Mm'],
|
'_30' => $postData['_30Mm'],
|
||||||
'_40' => $postData['40Mm'],
|
'_40' => $postData['_40Mm'],
|
||||||
'_50' => $postData['50Mm'],
|
'_50' => $postData['_50Mm'],
|
||||||
'_70' => $postData['70Mm'],
|
'_70' => $postData['_70Mm'],
|
||||||
'_100' => $postData['100Mm'],
|
'_100' => $postData['_100Mm'],
|
||||||
'_140' => $postData['140Mm'],
|
'_140' => $postData['_140Mm'],
|
||||||
'_200' => $postData['200Mm'],
|
'_200' => $postData['_200Mm'],
|
||||||
'_300' => $postData['300Mm'],
|
'_300' => $postData['_300Mm'],
|
||||||
'pan' => $postData['pan'],
|
'pan' => $postData['pan'],
|
||||||
'total' => $postData['total'],
|
'total' => $postData['total'],
|
||||||
'plus20Loss' => $postData['plus20Loss'],
|
'plus20Loss' => $postData['plus20Loss'],
|
||||||
@ -459,9 +470,9 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if ($updated) {
|
if ($updated) {
|
||||||
return redirect()->back()->with('success', 'Data Saved Successfully..!!');
|
return $this->response->setJSON(['status' => 'success', 'message' => 'Data Updated Successfully']);
|
||||||
} else {
|
} else {
|
||||||
return redirect()->back()->with('error', 'Error Saving Data..!!');
|
return $this->response->setJSON(['status' => 'error', 'message' => 'Failed to update data']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -144,12 +144,24 @@ class Rawmaterialdetails_model extends Model
|
|||||||
|
|
||||||
$builder = $this->db->table('t_materialmaster')
|
$builder = $this->db->table('t_materialmaster')
|
||||||
->select('MaterialCode')
|
->select('MaterialCode')
|
||||||
->like('LOWER(MaterialName)', 'silica sand')
|
->where('Category', 'silica sand')
|
||||||
->orderBy('CreatedDate', 'desc');
|
->orderBy('CreatedDate', 'desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$materialResults = $query->getResultArray();
|
$materialResults = $query->getResultArray();
|
||||||
|
|
||||||
return $materialCodes = array_column($materialResults, 'MaterialCode');
|
return array_column($materialResults, 'MaterialCode');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAllWasteCoreSandMaterialCode(){
|
||||||
|
|
||||||
|
$builder = $this->db->table('t_materialmaster')
|
||||||
|
->select('MaterialCode')
|
||||||
|
->where('Category', 'waste core')
|
||||||
|
->orderBy('CreatedDate', 'desc');
|
||||||
|
$query = $builder->get();
|
||||||
|
$materialResults = $query->getResultArray();
|
||||||
|
|
||||||
|
return array_column($materialResults, 'MaterialCode');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllBagMaterialCode(){
|
function getAllBagMaterialCode(){
|
||||||
|
|||||||
@ -653,6 +653,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
|
|
||||||
console.log('alldata', alldata);
|
console.log('alldata', alldata);
|
||||||
|
|
||||||
|
|
||||||
$('#drierTable tbody tr:visible').each(function(index) {
|
$('#drierTable tbody tr:visible').each(function(index) {
|
||||||
|
|
||||||
if (alldata[index]) {
|
if (alldata[index]) {
|
||||||
|
|||||||
@ -354,7 +354,7 @@
|
|||||||
|
|
||||||
<!-- 'td:eq(7)' -->
|
<!-- 'td:eq(7)' -->
|
||||||
<td class="celda_normal" style="color:#02d0eb; background:white;" contenteditable="true">
|
<td class="celda_normal" style="color:#02d0eb; background:white;" contenteditable="true">
|
||||||
<select class="status grade-condition" style="width:100px;">
|
<select class="status grade-condition select2" style="width:100px;">
|
||||||
<option value="">Select</option>
|
<option value="">Select</option>
|
||||||
<option value="wet"
|
<option value="wet"
|
||||||
<?php echo ($record['gradeCondition'] == 'wet') ? "selected":''; ?>
|
<?php echo ($record['gradeCondition'] == 'wet') ? "selected":''; ?>
|
||||||
@ -499,7 +499,7 @@
|
|||||||
|
|
||||||
<!-- 'td:eq(33)' -->
|
<!-- 'td:eq(33)' -->
|
||||||
<td class="celda_normal" style="color:#02d0eb; background:white;" contenteditable="true">
|
<td class="celda_normal" style="color:#02d0eb; background:white;" contenteditable="true">
|
||||||
<select class="status sand-status" style="width:210px;">
|
<select class="status sand-status select2" style="width:210px;">
|
||||||
<option value="noRemark">Select</option>
|
<option value="noRemark">Select</option>
|
||||||
<option value="accepted"
|
<option value="accepted"
|
||||||
<?php echo ($record['remark'] == 'accepted') ? "selected":''; ?>
|
<?php echo ($record['remark'] == 'accepted') ? "selected":''; ?>
|
||||||
@ -576,7 +576,7 @@
|
|||||||
<div class="modal-body p-4" id="content">
|
<div class="modal-body p-4" id="content">
|
||||||
<div style="text-align: right;"><small>REF:RIPL/DAD/R02</small></div>
|
<div style="text-align: right;"><small>REF:RIPL/DAD/R02</small></div>
|
||||||
|
|
||||||
<form action="<?php echo base_url('/updateLabReport')?>" method="POST">
|
<form >
|
||||||
<header class="clearfix">
|
<header class="clearfix">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3" width="100px;">
|
<div class="col-3" width="100px;">
|
||||||
@ -643,9 +643,11 @@
|
|||||||
id="dwnldGradeId">50-60</td>
|
id="dwnldGradeId">50-60</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td style="text-align: left !important; width:25%;"><b>Clay %</b></td>
|
<td style="text-align: left !important; width:25%;"><b>Clay %</b></td>
|
||||||
<td contenteditable="true"
|
<td contenteditable="true"
|
||||||
id="dwnldClayId">20</td>
|
id="dwnldClayId">20</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left !important; width:25%;"><b>Moisture Actual %</b></td>
|
<td style="text-align: left !important; width:25%;"><b>Moisture Actual %</b></td>
|
||||||
@ -825,9 +827,21 @@
|
|||||||
|
|
||||||
<tr >
|
<tr >
|
||||||
<th contenteditable="true"
|
<th contenteditable="true"
|
||||||
style="text-align: center !important; height: 50px;"> </th>
|
style="text-align: center !important;">
|
||||||
|
|
||||||
|
<select class="test-or-approve select2" name="testedBy" id="testedById">
|
||||||
|
<option value="0"> </option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</th>
|
||||||
<th contenteditable="true"
|
<th contenteditable="true"
|
||||||
style="text-align: center !important; height: 50px;"> </th>
|
style="text-align: center !important; ">
|
||||||
|
|
||||||
|
<select class="test-or-approve select2" name="approvedBy" id="approvedById">
|
||||||
|
<option value="0">Select</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<th style="text-align: center !important;">Tested By</th>
|
<th style="text-align: center !important;">Tested By</th>
|
||||||
@ -869,7 +883,7 @@
|
|||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||||
<button type="submit" class="btn btn-success" >Save</button>
|
<button type="button" id="labReportSubmitId" class="btn btn-success" >Save</button>
|
||||||
<button type="button" id="pdfGenerateId" class="btn btn-primary">Download</button>
|
<button type="button" id="pdfGenerateId" class="btn btn-primary">Download</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -1262,8 +1276,79 @@
|
|||||||
<!-- adding select 2 -->
|
<!-- adding select 2 -->
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$('.status').select2({
|
$(document).ready(function() {
|
||||||
|
$('.sand-status' ).select2({
|
||||||
placeholder: "Select",
|
placeholder: "Select",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.grade-condition' ).select2({
|
||||||
|
placeholder: "Select",
|
||||||
|
});
|
||||||
|
$('.test-or-approve' ).select2({
|
||||||
|
placeholder: "Select",
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$('#labReportSubmitId').click(function(){
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url : "<?php echo base_url('/updateLabReport')?>",
|
||||||
|
type : "POST",
|
||||||
|
data : {
|
||||||
|
id : $('#issdId').val(),
|
||||||
|
igrNo : $('#igrNo').val(),
|
||||||
|
materialCode : $('#materialCode').val(),
|
||||||
|
qty : $('#qty').val(),
|
||||||
|
_10Mm : $('#10Mm').val(),
|
||||||
|
_20Mm : $('#20Mm').val(),
|
||||||
|
_30Mm : $('#30Mm').val(),
|
||||||
|
_40Mm : $('#40Mm').val(),
|
||||||
|
_50Mm : $('#50Mm').val(),
|
||||||
|
_70Mm : $('#70Mm').val(),
|
||||||
|
_100Mm : $('#100Mm').val(),
|
||||||
|
_140Mm : $('#140Mm').val(),
|
||||||
|
_200Mm : $('#200Mm').val(),
|
||||||
|
_300Mm : $('#300Mm').val(),
|
||||||
|
pan : $('#pan').val(),
|
||||||
|
total : $('#total').val(),
|
||||||
|
moistureSpec : $('#moistureSpec').val(),
|
||||||
|
moistureActual : $('#moistureActual').val(),
|
||||||
|
moistureLoss : $('#moistureLoss').val(),
|
||||||
|
moistureLossQty : $('#moistureLossQty').val(),
|
||||||
|
plus20Loss : $('#plus20Loss').val(),
|
||||||
|
plus30Loss : $('#plus30Loss').val(),
|
||||||
|
sieveLossQty : $('#sieveLossQty').val(),
|
||||||
|
salableQty : $('#salableQty').val(),
|
||||||
|
remark : $('#dwnldAcceptedId').text(),
|
||||||
|
gradeCondition : $('#dwnldGradeId').text()
|
||||||
|
},
|
||||||
|
success: function(data){
|
||||||
|
alert("Data Saved Successfully..!!");
|
||||||
|
console.log(data);
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
error : function(xhr, status, error){
|
||||||
|
alert("An error occurred while processing the request. Please try again.");
|
||||||
|
console.error("Error Code:", xhr.status);
|
||||||
|
console.error("Error Message:", error);
|
||||||
|
console.error("Response Text:", xhr.responseText);
|
||||||
|
}
|
||||||
|
,
|
||||||
|
complete: function(){
|
||||||
|
$('#loader').hide();
|
||||||
|
console.log("ajax call is completed..!!")
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user