Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
570b208f59
@ -293,6 +293,9 @@ class StockController extends BaseController
|
||||
{
|
||||
|
||||
if ($this->request->getMethod() === 'POST') {
|
||||
|
||||
$remark = $this->request->getPost('remark');
|
||||
|
||||
$month = $this->request->getPost('month');
|
||||
|
||||
$date = DateTime::createFromFormat('M-Y', $month);
|
||||
@ -301,6 +304,8 @@ class StockController extends BaseController
|
||||
|
||||
$month = $formattedDate;
|
||||
} else {
|
||||
$remark = $this->request->getVar('remark');
|
||||
|
||||
$month = date('Y-m');
|
||||
}
|
||||
|
||||
@ -311,9 +316,9 @@ class StockController extends BaseController
|
||||
$materialCodes = $this->rawmaterialdetails_model->getAllSilicaRawMaterialCode();
|
||||
|
||||
if (!empty($materialCodes)) {
|
||||
$data['igrDetails'] = $this->inwardGateRegister_model->findIgrDetailsForIncomingSilicaSand($materialCodes, $month);
|
||||
$data['igrDetails'] = $this->inwardGateRegister_model->findIgrDetailsForIncomingSilicaSand($materialCodes, $month,$remark);
|
||||
|
||||
} else {
|
||||
} else {
|
||||
$data['igrDetails'] = [];
|
||||
}
|
||||
|
||||
@ -323,6 +328,8 @@ class StockController extends BaseController
|
||||
|
||||
$data['month'] = $formattedDate;
|
||||
|
||||
$data['remark'] = $remark;
|
||||
|
||||
return $this->loadViews("incomingSilicaSandDetails", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
@ -338,7 +345,7 @@ class StockController extends BaseController
|
||||
$updates = [];
|
||||
|
||||
foreach ($incomingSilicaSandDetailsData as $data) {
|
||||
|
||||
|
||||
$id = $data['id'];
|
||||
|
||||
$dbData = [
|
||||
@ -370,7 +377,6 @@ class StockController extends BaseController
|
||||
'salableQty' => $data['Salable Qty'],
|
||||
'remark' => $data['Remark']
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -1031,12 +1031,11 @@ class Inwardgateregister_model extends Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function findIgrDetailsForIncomingSilicaSand($materialCodes, $month)
|
||||
{
|
||||
public function findIgrDetailsForIncomingSilicaSand($materialCodes, $month ,$remark)
|
||||
{
|
||||
$builder = $this->db->table('t_igr_details')
|
||||
->select(
|
||||
't_igr_details.IGRNO,
|
||||
t_igr_details.Remarks,
|
||||
't_igr_details.IGRNO,
|
||||
t_igr_details.MaterialCode,
|
||||
igrMast.DeliveryChellanOrInvoiceNo as invoiceNo,
|
||||
igrMast.DeliveryChellanDate as invoiceDate,
|
||||
@ -1046,17 +1045,24 @@ class Inwardgateregister_model extends Model
|
||||
t_igr_details.QuantityAsPerInvoice as Qty,
|
||||
issd.*')
|
||||
->whereIn('t_igr_details.MaterialCode', $materialCodes)
|
||||
->like('t_igr_details.CreatedDate', $month, 'after')
|
||||
->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode')
|
||||
->like('t_igr_details.CreatedDate', $month, 'after');
|
||||
|
||||
// remark needed for those who selected any remark.
|
||||
if ($remark != "noRemark") {
|
||||
$builder->where('issd.remark', $remark);
|
||||
}
|
||||
|
||||
$builder->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode')
|
||||
->join('t_igr_master igrMast', 'igrMast.IGRNO = t_igr_details.IGRNO')
|
||||
->join('t_incomingSilicaSandDetails issd',
|
||||
->join('t_incomingSilicaSandDetails issd',
|
||||
'issd.igrNo_fk = t_igr_details.IGRNO AND issd.materialCode = t_igr_details.MaterialCode','left')
|
||||
->join('t_purchaseorder_master poMaster', 'poMaster.PONO = igrMast.PONO', 'left')
|
||||
->join('t_supplierdetailsn supplierDetails', 'supplierDetails.SupplierID = poMaster.SupplierID', 'left')
|
||||
->orderBy('t_igr_details.CreatedDate', 'DESC');
|
||||
->orderBy('t_igr_details.CreatedDate', 'DESC');
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getResultArray();
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -293,7 +293,11 @@
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
|
||||
var materialname = $('#MaterialName').val();
|
||||
var materialname = $('#MaterialName').val().trim();
|
||||
|
||||
if(materialname == ''){
|
||||
return;
|
||||
}
|
||||
|
||||
//material = material.replace(/\s*$/,"");
|
||||
var material = materialname.replace(/ /g, '');
|
||||
@ -307,8 +311,6 @@
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
//alert(count);
|
||||
console.log(data[0].IsActive);
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
@ -330,13 +332,16 @@
|
||||
$("#MaterialName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
// alert("empty data");
|
||||
}
|
||||
|
||||
},
|
||||
error: function() {
|
||||
$('#loader').hide();
|
||||
alert("Error Occur");
|
||||
},
|
||||
complete: function(){
|
||||
$('#loader').hide();
|
||||
console.log("Ajax completed..!!");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -291,7 +291,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
<td width="79" height="45" class="celda_normal"><?php echo DateTime::createFromFormat('Y-m-d', $a['date'])->format('d-m-Y'); ?></td>
|
||||
<td class="celda_normal" >
|
||||
<select class="timeDropdown drier_on_time" style="width: 100px;" ">
|
||||
<select class="timeDropdown drier_on_time" style="width: 100px;" >
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($timeDropdown as $key => $time) { ?>
|
||||
<option value="<?= $time; ?>" <?php if($a['drier_on_time'] == $time){ echo 'selected'; } ?> ><?= $time; ?></option>
|
||||
|
||||
@ -441,10 +441,13 @@ if ($total <= $reorder) {
|
||||
$('#MaterialName').change(function() {
|
||||
|
||||
var materialname = $('#MaterialName').val();
|
||||
//var s = "I am Given String ";
|
||||
//material = material.replace(/\s*$/,"");
|
||||
|
||||
if(materialname == ''){
|
||||
return;
|
||||
}
|
||||
|
||||
var material = materialname.replace(/ /g, '');
|
||||
//alert(m.length+" "+m+" "+s+" "+s.length);
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
@ -454,7 +457,6 @@ if ($total <= $reorder) {
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
//alert(count);
|
||||
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
@ -482,6 +484,10 @@ if ($total <= $reorder) {
|
||||
error: function() {
|
||||
$('#loader').hide();
|
||||
alert("Error Occur");
|
||||
},
|
||||
complete: function(){
|
||||
$('#loader').hide();
|
||||
console.log("Ajax completed..!!");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -803,14 +803,22 @@
|
||||
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Stock Handler'){?>
|
||||
<!-- Stock module -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="ri-shopping-bag-line"></i> Stock <div class="arrow-down"></div>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-stock">
|
||||
|
||||
<div class="dropdown" >
|
||||
<a href="<?php echo base_url(); ?>incomingSilicaSandDetails?remark=noRemark" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Incoming Silica Sand Details</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-stock">
|
||||
<a href="<?php echo base_url(); ?>incomingSilicaSandDetails?remark=accepted" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Accepted</a>
|
||||
<a href="<?php echo base_url(); ?>incomingSilicaSandDetails?remark=conditionallyAccepted" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Conditionally Accepted</a>
|
||||
<a href="<?php echo base_url(); ?>incomingSilicaSandDetails?remark=rejected" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Rejected</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<a href="<?php echo base_url(); ?>incomingSilicaSandDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>Incoming Silica Sand Details</a>
|
||||
|
||||
<a href="<?php echo base_url(); ?>drierMachineDetails" class="dropdown-item"><i class="ri-file-info-line align-middle mr-1"></i>10 TON Drier Details</a>
|
||||
|
||||
|
||||
@ -123,8 +123,6 @@
|
||||
}
|
||||
|
||||
.celda_normal {
|
||||
/*background-color: #fff;*/
|
||||
/* <!-- ad9271 into ffffff brown-light to green-light --> */
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
@ -155,6 +153,8 @@
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-page">
|
||||
@ -170,7 +170,8 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Stocks</a></li>
|
||||
<li class="breadcrumb-item active">
|
||||
<h4 class="page-title">Incoming Silica Sand Details </h4>
|
||||
<h4 class="page-title">Incoming Silica Sand Details
|
||||
<?=($remark == "noRemark" ? '': "($remark)");?> </h4>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -218,8 +219,8 @@
|
||||
<div class="col-3">
|
||||
<?php $today = date('M-Y'); ?>
|
||||
|
||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||
|
||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
|
||||
<input type="hidden" name="remark" id="remark" value="<?php echo $remark ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||
@ -464,10 +465,24 @@
|
||||
<?php echo $record['salableQty']??'0.00'; ?>
|
||||
</td>
|
||||
|
||||
<!-- need to check the status and select values before hand -->
|
||||
|
||||
<!-- 'td:eq(32)' -->
|
||||
<td class="celda_normal" contenteditable="true">
|
||||
<?php echo $record['Remarks']??''; ?>
|
||||
</td>
|
||||
<select class="status sand-status" style="width:210px;">
|
||||
<option value="noRemark">Select</option>
|
||||
<option value="accepted"
|
||||
<?php echo ($record['remark'] == 'accepted') ? "selected":''; ?>
|
||||
>Accepted</option>
|
||||
<option value="conditionallyAccepted"
|
||||
<?php echo ($record['remark'] == 'conditionallyAccepted') ? "selected":''; ?>
|
||||
>Conditionally Accepted</option>
|
||||
<option value="rejected"
|
||||
<?php echo ($record['remark'] == 'rejected') ? "selected":''; ?>
|
||||
>Rejected</option>
|
||||
</select>
|
||||
|
||||
</td>
|
||||
|
||||
<!-- 'td:eq(33)' -->
|
||||
<td style="display: none;">
|
||||
@ -826,6 +841,18 @@
|
||||
|
||||
var incomingSilicaSandDetailsData = $("#incomingSilicaSandDetailsTable").tableToJSON();
|
||||
|
||||
|
||||
|
||||
$('#incomingSilicaSandDetailsTable tbody tr').each(function (index) {
|
||||
|
||||
let row = incomingSilicaSandDetailsData[index];
|
||||
|
||||
// Get the selected values from dropdowns
|
||||
row['Remark'] = $(this).find('.sand-status').val();
|
||||
|
||||
});
|
||||
|
||||
|
||||
incomingSilicaSandDetailsData = JSON.stringify(incomingSilicaSandDetailsData);
|
||||
|
||||
$('#loader').show();
|
||||
@ -841,6 +868,8 @@
|
||||
$('#loader').hide();
|
||||
|
||||
alert(data);
|
||||
|
||||
window.location.reload();
|
||||
|
||||
}
|
||||
},
|
||||
@ -933,4 +962,13 @@ function calculateRow(rowId){
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('.status').select2({
|
||||
placeholder: "Select",
|
||||
});
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user