CHANGES_in Requisition UI : GWM
This commit is contained in:
parent
8489f1bb95
commit
b9e1ad4cac
@ -42,7 +42,27 @@ if (!empty($ReqPOType)) {
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.select2 {
|
||||
width: 100% ! important;
|
||||
}
|
||||
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
#drpMaterial~.select2 .select2-selection--single{
|
||||
height: auto;
|
||||
max-height: 45px;
|
||||
padding: 5px 3px;
|
||||
line-height: normal;
|
||||
}
|
||||
#drpMaterial~.select2 .select2-selection__rendered{
|
||||
overflow: visible;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre-wrap;
|
||||
line-height: normal;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
var serviceScheduleType = '<?php echo $serviceSchedule; ?>';
|
||||
@ -79,8 +99,8 @@ if (!empty($ReqPOType)) {
|
||||
echo form_open(base_url() . 'EditRequisition', $attributes); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row" align="right">
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Back</span></a>
|
||||
<div class="row" align="right" style="padding-right:31px">
|
||||
<a class="btn btn-cancel" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Back</span></a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Request Type</label>
|
||||
@ -141,7 +161,7 @@ if (!empty($ReqPOType)) {
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control"');
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
@ -156,7 +176,7 @@ if (!empty($ReqPOType)) {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="DisplayScheduleDiv" style="display:none;">
|
||||
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label>Select Service Schedule Type</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -250,7 +270,7 @@ if (!empty($ReqPOType)) {
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('drpMaterial', $options, set_value('drpMaterial'), 'id="drpMaterial"', 'class="form-control"');
|
||||
echo form_dropdown('drpMaterial', $options, set_value('drpMaterial'), 'id="drpMaterial"', 'class="form-control select2"');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -297,8 +317,9 @@ if (!empty($ReqPOType)) {
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">cancel</a>
|
||||
<a class="btn btn-success font addClick" ID="addClick"><i class="fa fa-plus"></i> <span class="bold">Add</span></a>
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -377,8 +398,9 @@ if (!empty($ReqPOType)) {
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
<a class="btn btn-success font EditClick" ID="EditClick"><i class="fa fa-plus"></i> <span class="bold">Edit</span></a>
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -452,17 +474,16 @@ if (!empty($ReqPOType)) {
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
|
||||
<?php if ($Status == REQ_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<a class="btn btn-primary submit" ID="submit" onclick="Save(1)"> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(2)"> <span class="bold">Update & Approve</span></a>
|
||||
|
||||
<input type="reset" class="btn btn-success">
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save As Draft</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-approved submit" ID="submit" onclick="Save(2)"> <span class="bold">Approve</span></a>
|
||||
<input type="reset" class="btn btn-reset">
|
||||
<?php } else if ($Status == REQ_PENDING_APPROVAL) { ?>
|
||||
<!--<a class="btn btn-success" ID="update" onclick="update()" > <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Cancel</span></a> -->
|
||||
<a class="btn btn-success Save" ID="submit" onclick="Save(1)"> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(2)"> <span class="bold">Update & Approve</span></a>
|
||||
<input type="reset" class="btn btn-success">
|
||||
<a class="btn btn-success Save" ID="submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-approved submit" ID="submit" onclick="Save(2)"> <span class="bold">Approve</span></a>
|
||||
<input type="reset" class="btn btn-reset">
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -474,6 +495,13 @@ if (!empty($ReqPOType)) {
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
// $("#CostCenter").select2();
|
||||
// $("#drpMaterial").select2();
|
||||
// $("#EditMaterialCode").select2();
|
||||
});
|
||||
|
||||
function isNumberKey(evt) {
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
if (charCode != 46 && charCode > 31 &&
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
|
||||
<strong><?php echo generateCopyrightNotice(); ?><a class="a-tag-link" href="<?php echo base_url(); ?>">RESICO</a>.</strong> All rights reserved.
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
<!-- jQuery UI 1.11.2 -->
|
||||
<!-- <script src="http://code.jquery.com/ui/1.11.2/jquery-ui.min.js" type="text/javascript"></script> -->
|
||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||
@ -27,8 +28,33 @@
|
||||
y.addClass('active');
|
||||
y.parent().addClass('active');
|
||||
</script>
|
||||
|
||||
<!-- toster cdn start -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
||||
<!-- toster cdn end -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Toastr settings
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": false,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
$('.dataTables-example').dataTable({
|
||||
responsive: true,
|
||||
"dom": 'T<"clear">lfrtip',
|
||||
|
||||
@ -15,6 +15,10 @@
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- Bootstrap 3.3.4 -->
|
||||
<link href="<?php echo base_url(); ?>public/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- For Bootstrap 5 -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/5.1.3/css/bootstrap.min.css">
|
||||
|
||||
<!-- FontAwesome 4.3.0 -->
|
||||
<link href="<?php echo base_url(); ?>public/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- Ionicons 2.0.0 -->
|
||||
@ -85,6 +89,15 @@
|
||||
});
|
||||
</script> -->
|
||||
<link rel="icon" href="<?php echo base_url(); ?>public/assets/dist/img/RI_favicon.png"/>
|
||||
<!-- toster cdn start -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" rel="stylesheet">
|
||||
<!-- toster cdn end -->
|
||||
<style>
|
||||
/* Custom CSS to increase font size */
|
||||
.toast-message {
|
||||
font-size: 16px !important; /* Adjust font size as needed */
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
.off-screen {
|
||||
@ -131,6 +144,35 @@
|
||||
/* ::-webkit-scrollbar {
|
||||
display: none;
|
||||
} */
|
||||
|
||||
|
||||
.btn-reset{
|
||||
border-color: #696a6c;
|
||||
color: #ffffff;
|
||||
background-color: #a08686;
|
||||
}
|
||||
|
||||
.btn-cancel{
|
||||
color: #fff;
|
||||
background-color: #6c757d;
|
||||
border-color: #6c757d;
|
||||
}
|
||||
.btn-cancel:hover {
|
||||
color: #fff;
|
||||
background-color: #5a6268;
|
||||
border-color: #545b62;
|
||||
}
|
||||
|
||||
.btn-approved{
|
||||
color: #fff;
|
||||
background-color: #37b83d !important;
|
||||
border-color: #008d4c;
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
background-color: #28a745; /* Change this to your preferred background color */
|
||||
border: 1px solid #155724; /* Change this to your preferred border color */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@ -21,6 +21,18 @@ if (!empty($Emp)) {
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
#MaterialCode~.select2 .select2-selection--single{
|
||||
height: auto;
|
||||
max-height: 45px;
|
||||
padding: 5px 3px;
|
||||
line-height: normal;
|
||||
}
|
||||
#MaterialCode~.select2 .select2-selection__rendered{
|
||||
overflow: visible;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre-wrap;
|
||||
line-height: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper" style="min-height:537px;">
|
||||
@ -34,12 +46,35 @@ if (!empty($Emp)) {
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="right" style="padding-right:11px">
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Back</span></a>
|
||||
<a class="btn btn-cancel" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Back</span></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
|
||||
<label>Requested By</label><span style="color:red;">*</span>
|
||||
<div>
|
||||
<?php
|
||||
$RequestByOpt = array("-1" => 'Select Requested By');
|
||||
if (!empty($RequestBy)) {
|
||||
foreach ($RequestBy as $EID) :
|
||||
$RequestByOpt[$EID->EmpID] = $EID->Full_Name;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('EmpID', $RequestByOpt, set_value('EmpID'), 'id="EmpID"', 'class = "form-control select2"', 'required="true"');
|
||||
// $data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true');
|
||||
// echo form_input($data);
|
||||
?>
|
||||
<!-- <input type="hidden" name="EmpID" id="EmpID" value=<?php //echo $EmpID ?> /> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Request Type</label>
|
||||
<label>Request Type</label><span style="color:red;">*</span>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1" => 'Select Request Type');
|
||||
@ -61,23 +96,7 @@ if (!empty($Emp)) {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Requested By</label>
|
||||
<div>
|
||||
<?php
|
||||
$RequestByOpt = array("-1" => 'Select Requested By');
|
||||
if (!empty($RequestBy)) {
|
||||
foreach ($RequestBy as $EID) :
|
||||
$RequestByOpt[$EID->EmpID] = $EID->Full_Name;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('EmpID', $RequestByOpt, set_value('EmpID'), 'id="EmpID"', 'class = "form-control select2"', 'required="true"');
|
||||
// $data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true');
|
||||
// echo form_input($data);
|
||||
?>
|
||||
<!-- <input type="hidden" name="EmpID" id="EmpID" value=<?php //echo $EmpID ?> /> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
@ -99,7 +118,7 @@ if (!empty($Emp)) {
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label>
|
||||
<label>Cost Center Name</label><span style="color:red;">*</span>
|
||||
<div>
|
||||
<?php
|
||||
$Costs = array("-1" => 'Select Cost Center Name');
|
||||
@ -112,7 +131,7 @@ if (!empty($Emp)) {
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control"');
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
|
||||
@ -127,7 +146,7 @@ if (!empty($Emp)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="DisplayScheduleDiv" style="display:none;">
|
||||
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label>Service Schedule Type</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -141,7 +160,7 @@ if (!empty($Emp)) {
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control"');
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
@ -160,7 +179,7 @@ if (!empty($Emp)) {
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control"');
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
@ -208,25 +227,14 @@ if (!empty($Emp)) {
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control select2"');
|
||||
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control select2" ');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding: 5px;">
|
||||
<div class="col-md-4">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" id="otherDescription" style="display:none;">
|
||||
|
||||
<div class="col-md-6" id="otherDescription" style="display:none;">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -235,7 +243,7 @@ if (!empty($Emp)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
@ -245,7 +253,7 @@ if (!empty($Emp)) {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -254,12 +262,22 @@ if (!empty($Emp)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true','style' => 'max-height: 50px;');
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
<a class="btn btn-success font addClick"><span class="bold">Add</span></a>
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -289,16 +307,8 @@ if (!empty($Emp)) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding: 5px;">
|
||||
<div class="col-md-4">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" id="EditotherDescription">
|
||||
|
||||
<div class="col-md-6" id="EditotherDescription">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -307,7 +317,7 @@ if (!empty($Emp)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
@ -317,7 +327,7 @@ if (!empty($Emp)) {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -326,14 +336,24 @@ if (!empty($Emp)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
<a class="btn btn-success font EditClick" ID="EditClick"><span class="bold">Edit</span></a>
|
||||
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -365,9 +385,10 @@ if (!empty($Emp)) {
|
||||
<div align="right" style="padding-right:10px">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save()"> <span class="bold">Save</span></a>
|
||||
<input type="submit" value="Approved" class="btn btn-success">
|
||||
<input type="reset" value="Reset" class="btn btn-success" onclick="window.location.reload();">
|
||||
<input type="reset" value="Reset" class="btn btn-reset" onclick="window.location.reload();">
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save()"> <span class="bold">Save As Draft</span></a>
|
||||
<input type="submit" class="btn btn-approved" value="Approved" >
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
@ -401,6 +422,8 @@ if (!empty($Emp)) {
|
||||
$("#CostCenter").select2();
|
||||
$("#RequestType").select2();
|
||||
$("#MaterialCode").select2();
|
||||
$("#EmpID").select2();
|
||||
$("#ScheduleType").select2();
|
||||
|
||||
$('#CostCenter').change(function() {
|
||||
|
||||
@ -453,7 +476,11 @@ if (!empty($Emp)) {
|
||||
$('#txtDeletedRow').val('');
|
||||
$("#Description").val('');
|
||||
$("#UOM").val('');
|
||||
$('#CostCenter').val("-1");
|
||||
// Get the ID of the first option
|
||||
var firstOptionId = $('#CostCenter option:first').val();
|
||||
// Reset the Select2 dropdown to the first option
|
||||
$('#CostCenter').val(firstOptionId).select2('data', { id: firstOptionId, text: $('#CostCenter option:selected').text() });
|
||||
|
||||
|
||||
removeHiddenRows($('#Items').find('tr').length);
|
||||
$('#tempAppend').empty();
|
||||
@ -661,10 +688,10 @@ if (!empty($Emp)) {
|
||||
<script>
|
||||
function validate() {
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please Select ReqType Names');
|
||||
alert('Please Select Request Type ');
|
||||
return false;
|
||||
} else if ($("option:selected", $("#EmpID")).val() == '-1') {
|
||||
alert('Please Select Reqby');
|
||||
alert('Please Select Request by');
|
||||
return false;
|
||||
} else if ($("#txtRowCount").val().length < 1) {
|
||||
alert('Please Add Line Item');
|
||||
@ -704,14 +731,14 @@ if (!empty($Emp)) {
|
||||
$('.addClick').click(function() {
|
||||
|
||||
if ($("#MaterialCode option:selected").val() == '-1') {
|
||||
alert('Please Select the MaterialCode ');
|
||||
alert('Please Select The MaterialCode ');
|
||||
return false;
|
||||
}
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
alert('Please Enter The Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -765,6 +792,9 @@ if (!empty($Emp)) {
|
||||
addHidden(theForm, "otherD" + temp, materialdescription);
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
$('#myModal1').modal('hide');
|
||||
toastr.success('Line Item Added!', 'Success');
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -833,7 +863,8 @@ if (!empty($Emp)) {
|
||||
$('#UOM' + userid).val(editUOM);
|
||||
$('#Quantity' + userid).val(editQuantity);
|
||||
|
||||
|
||||
$('#EditItem').modal('hide');
|
||||
toastr.success('Line Item Updated!', 'Success');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -11,7 +11,20 @@
|
||||
}
|
||||
//echo $ReqNo;
|
||||
}?>
|
||||
|
||||
<style>
|
||||
#Requisition_filter{
|
||||
float: inline-end;
|
||||
}
|
||||
#Requisition_wrapper .row .col-sm-4{
|
||||
flex-basis: 50%;
|
||||
float: inline-end;
|
||||
}
|
||||
#Requisition_paginate.row .col-sm-6{
|
||||
flex-basis: 50%;
|
||||
float: inline-end;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
@ -63,7 +76,7 @@ span.highlight {
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
<?php if($DraftCount > 0 ) {?><p>
|
||||
<span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New Requisition. </span>
|
||||
<span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New Requisition. </span>
|
||||
</p> <?php } ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="margin-bottom:-3%;">
|
||||
@ -78,6 +91,7 @@ span.highlight {
|
||||
<table id="Requisition" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
<th>Requisted Date</th>
|
||||
<th>Requisition No</th>
|
||||
<th>Requisition Type</th>
|
||||
<th>Tot No.OfLineItem </th>
|
||||
@ -85,7 +99,6 @@ span.highlight {
|
||||
<th>Partially PoCreatedLineItem</th>
|
||||
<th>NewLine Item</th>
|
||||
<th>Status</th>
|
||||
<th>Requisted Date</th>
|
||||
<th>Action</th>
|
||||
|
||||
</tr>
|
||||
@ -101,6 +114,10 @@ span.highlight {
|
||||
{ //print_r($record);
|
||||
?>
|
||||
<tr>
|
||||
<td> <?php $Pdt = new DateTime($record->CreatedDate );
|
||||
$PODate = $Pdt->format('d-m-Y');
|
||||
echo $PODate ?>
|
||||
</td>
|
||||
<td><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->ReqType ?></td>
|
||||
<td><?php echo $record->TotalNoofLineItems ?></td>
|
||||
@ -110,10 +127,7 @@ span.highlight {
|
||||
|
||||
|
||||
<td><?php echo $record->StatusName ?></td>
|
||||
<td><?php $Pdt = new DateTime($record->CreatedDate );
|
||||
$PODate = $Pdt->format('d-m-Y');
|
||||
echo $PODate
|
||||
?></td>
|
||||
|
||||
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i> </a> <a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )" ><span class="glyphicon glyphicon-trash" title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a> </td>
|
||||
</tr>
|
||||
|
||||
@ -133,18 +147,34 @@ span.highlight {
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#Requisition').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"columnDefs" : [{"targets":7, "type":"date-eu"}],
|
||||
// $('#Requisition').DataTable({
|
||||
// "paging": true,
|
||||
// "lengthChange": true,
|
||||
// "searching": true,
|
||||
// "ordering": true,
|
||||
// "columnDefs": [{"targets": 0, "type": "date-eu"}],
|
||||
// "aaSorting": [[1, "desc"]],
|
||||
// "info": true,
|
||||
// "autoWidth": true,
|
||||
// "pageLength": 10
|
||||
// });
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#Requisition').DataTable({
|
||||
"paging": true, // Enable pagination
|
||||
"lengthChange": true, // Enable the option to change the number of rows per page
|
||||
"searching": true, // Enable searching
|
||||
"ordering": true, // Enable column ordering
|
||||
"columnDefs": [{"targets": 0, "type": "date-eu"}], // Column definitions for date formatting
|
||||
"aaSorting": [[1, "desc"]], // Default sorting: sort by the 2th column (index 1) in descending order
|
||||
"info": true, // Show pagination info
|
||||
"autoWidth": true, // Enable automatic column width adjustment
|
||||
"pageLength": 10, // Set the default number of rows per page to 10
|
||||
"lengthMenu": [10, 25, 50, 100] // Options for the number of rows per page in the dropdown
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
"aaSorting": [[ 7, "desc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user