Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
89751a6499
@ -28,478 +28,404 @@ if (!empty($ReqDetails)) {
|
||||
$noOfService = $Req->NumberOfService;
|
||||
}
|
||||
}
|
||||
|
||||
//echo $ReqType;
|
||||
|
||||
|
||||
$description = '';
|
||||
|
||||
|
||||
|
||||
if (!empty($ReqPOType)) {
|
||||
|
||||
$strReqPOType = $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; ?>';
|
||||
if (serviceScheduleType != '') {
|
||||
if (serviceScheduleType != 'Recurring') {
|
||||
document.getElementById('DisplayScheduleDiv').style.display = 'block';
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
$('#DisplayScheduleDiv').show();
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
|
||||
} else {
|
||||
document.getElementById('DisplayScheduleDiv').style.display = 'block';
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
|
||||
$('#DisplayScheduleDiv').show();
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
document.getElementById('DisplayScheduleDiv').style.display = 'none';
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="content-wrapper" style="min-height:537px;">
|
||||
<section class="content">
|
||||
<center><b><h3 class="box-title"><?= "Edit Requisition"; ?><b><?= $ReqNo ? " - ".$ReqNo : ""; ?></b></h3></b></center>
|
||||
<div class="container-fluid">
|
||||
<div id="content"></div>
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'EditRequisition', $attributes); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'RequestType', 'value' => set_value('RequestType', $ReqType), 'id' => 'RequestType', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
<input type="hidden" name="txtReqNo" id="txtReqNo" value="<?php echo $ReqNo ?>" />
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- Form row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card" style="margin: 24px 0px !important;">
|
||||
<div class="card-body">
|
||||
<div class="pb-2 border-bottom border-light d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h4 class="header-title"><?= "Edit Requisition"; ?><b><?= $ReqNo ? " - ".$ReqNo : ""; ?></b></h4>
|
||||
</div>
|
||||
<a href="<?php echo base_url(); ?>Requisition" ID="cancel"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Requested By</label>
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<?php $attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'EditRequisition', $attributes);
|
||||
?>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
<label for="EmpID" class="col-form-label">Requested By</label>
|
||||
<?php
|
||||
$data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="RequestType" class="col-form-label">Request Type</label>
|
||||
<?php
|
||||
$data = array('name' => 'RequestType', 'value' => set_value('RequestType', $ReqType), 'id' => 'RequestType', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="txtReqNo" id="txtReqNo" value="<?php echo $ReqNo ?>" />
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="DeptName" class="col-form-label">Department Name</label>
|
||||
<?php
|
||||
$data = array('name' => 'DeptName', 'value' => set_value('DeptName', $DepartmentName), 'id' => 'DeptName', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="Designation" class="col-form-label">Designation</label>
|
||||
<?php
|
||||
$data = array('name' => 'Designation', 'value' => set_value('Designation', $Designation), 'id' => 'Designation', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeptName', 'value' => set_value('DeptName', $DepartmentName), 'id' => 'DeptName', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="CostCenter" class="col-form-label">Cost Center Name<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$Costs = array($CostCenterCode => $CostCenterCode);
|
||||
if (!empty($CostCenter)) {
|
||||
foreach ($CostCenter as $SID) :
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode . '-' . $SID->CostCenterName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter" class = "form-control"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label for="ScheduleType" class="col-form-label">Service Schedule Type</label>
|
||||
<?php
|
||||
$Schdule = array("One Time", "Recurring");
|
||||
|
||||
|
||||
if (!empty($Schdule)) {
|
||||
|
||||
foreach ($Schdule as $seletedSch) :
|
||||
if ($serviceSchedule == $seletedSch) {
|
||||
$SchType[$seletedSch] = $seletedSch;
|
||||
}
|
||||
endforeach;
|
||||
foreach ($Schdule as $Sch) :
|
||||
if ($serviceSchedule != $Sch) {
|
||||
$SchType[$Sch] = $Sch;
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control"');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Designation</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Designation', 'value' => set_value('Designation', $Designation), 'id' => 'Designation', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="ServicePeriodOption" style="display:none;">
|
||||
<label for="ServiceOptions" class="col-form-label">Service Period Option</label>
|
||||
<?php
|
||||
if (!empty($ServiceOption)) {
|
||||
foreach ($ServiceOption as $SerOptionsel) :
|
||||
|
||||
if ($servicePeriod == $SerOptionsel->ConfigValue) {
|
||||
|
||||
$ServiceOptions[$SerOptionsel->ConfigValue] = $SerOptionsel->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
|
||||
foreach ($ServiceOption as $SerOption) :
|
||||
if ($servicePeriod != $SerOption->ConfigValue) {
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control"');
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label for="ServiceNo" class="col-form-label">Number of Services</label>
|
||||
<?php
|
||||
$data = array('name' => 'ServiceNo', 'value' => set_value('ServiceNo', $noOfService), 'id' => 'ServiceNo', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$Costs = array($CostCenterCode => $CostCenterCode);
|
||||
//print_r( $options);
|
||||
|
||||
if (!empty($CostCenter)) {
|
||||
foreach ($CostCenter as $SID) :
|
||||
// echo $SID->ConfigValue;
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode . '-' . $SID->CostCenterName;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<?php if (count($MaterialCode) != 0) {?>
|
||||
<a data-toggle="modal" data-target="#add-req-modal" class="btn btn-primary waves-effect float-right">Add Line Item</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none">
|
||||
<label>Available Budget Amount</label> <img id="AlertImg" src="<?php echo base_url(); ?>public/assets/dist/img/red.png" alt="your image" width="25px" style="display:none" />
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AvlBudgetAmount', 'value' => set_value('AvlBudgetAmount'), 'id' => 'AvlBudgetAmount', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="table-responsive">
|
||||
<table id="Items" class="table table-striped table-hover mb-0" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Uom</th>
|
||||
<th>RequestedQuantity</th>
|
||||
<th>PoQuantity</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tempAppend">
|
||||
<?php
|
||||
if (!empty($LineItem)) {
|
||||
$index = 0;
|
||||
foreach ($LineItem as $record) {
|
||||
$index = $index + 1;
|
||||
$materialdesc = isset($record->MaterialDescription) ? $record->MaterialDescription : "";
|
||||
//echo $materialdesc;
|
||||
?>
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<input type="hidden" name="<?php echo 'te' . $index ?>" id="<?php echo 'te' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
|
||||
<input type="hidden" name="<?php echo 'te' . $index ?>" id="<?php echo 'tes' . $index ?>" value="<?php echo $record->Quantity; ?>" />
|
||||
<td align="left"><?php echo $record->MaterialCode; ?></td>
|
||||
<td align="left"><?php echo $record->MaterialName; ?></td>
|
||||
<td align="left"><?php echo $record->UOM; ?></td>
|
||||
<td align="left"><?php echo $record->Quantity; ?></td>
|
||||
<td align="left"><?php echo $record->POQTY; ?></td>
|
||||
<td align="left"><?php echo $record->StatusName; ?></td>
|
||||
<input type="hidden" name="<?php echo 'materialdesc' . $index ?>" id="<?php echo 'materialdesc' . $index ?>" value="<?php echo isset($record->MaterialDescription) ? $record->MaterialDescription : ''; ?>" />
|
||||
<td>
|
||||
<a data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-target='#edit-req-modal' data-toggle="modal" href="#edit-req-modal"><i class="ri-pencil-fill" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->MaterialCode; ?> Material details"></i> </a> <a onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $record->MaterialCode; ?>" data-userid="<?php echo $index; ?>" id="Del" ><span class="ri-delete-bin-7-fill"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $RowCount = $index;
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label>Select Service Schedule Type</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$Schdule = array("One Time", "Recurring");
|
||||
|
||||
|
||||
if (!empty($Schdule)) {
|
||||
|
||||
foreach ($Schdule as $seletedSch) :
|
||||
if ($serviceSchedule == $seletedSch) {
|
||||
$SchType[$seletedSch] = $seletedSch;
|
||||
}
|
||||
endforeach;
|
||||
foreach ($Schdule as $Sch) :
|
||||
if ($serviceSchedule != $Sch) {
|
||||
$SchType[$Sch] = $Sch;
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control"');
|
||||
|
||||
?>
|
||||
<div class="form-row">
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
|
||||
<!-- Available Budget Amt -->
|
||||
<input type="hidden" name="AvlBudgetAmount" id="AvlBudgetAmount" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="ServicePeriodOption" style="display:none;">
|
||||
<label>Select Service Period Option</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if (!empty($ServiceOption)) {
|
||||
foreach ($ServiceOption as $SerOptionsel) :
|
||||
|
||||
if ($servicePeriod == $SerOptionsel->ConfigValue) {
|
||||
|
||||
$ServiceOptions[$SerOptionsel->ConfigValue] = $SerOptionsel->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
|
||||
foreach ($ServiceOption as $SerOption) :
|
||||
if ($servicePeriod != $SerOption->ConfigValue) {
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control"');
|
||||
|
||||
?>
|
||||
<div class="form-row float-right">
|
||||
<?php if ($Status == REQ_DRAFT) { ?>
|
||||
<input type="reset" value="Reset" class="btn btn-secondary waves-effect" onclick="window.location.reload();">
|
||||
<a class="btn-primary waves-effect Save" ID="Save" onclick="Save(0)"> <span class="bold">Save As Draft</span></a>
|
||||
<a class="btn-primary waves-effect submit" ID="submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn-soft-primary waves-effect waves-light submit" ID="submit" onclick="Save(2)"> <span class="bold">Approve</span></a>
|
||||
<?php } else if ($Status == REQ_PENDING_APPROVAL) { ?>
|
||||
<input type="reset" value="Reset" class="btn btn-secondary waves-effect" onclick="window.location.reload();">
|
||||
<a class="btn-primary waves-effect Save" ID="submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn-soft-primary waves-effect waves-light submit" ID="submit" onclick="Save(2)"> <span class="bold">Approve</span></a>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php echo form_close();?>
|
||||
</div>
|
||||
<div class="col-md-2" id="NoServices" style="display:none;">
|
||||
<label>Number of Services</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ServiceNo', 'value' => set_value('ServiceNo', $noOfService), 'id' => 'ServiceNo', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<?php if (count($MaterialCode) != 0) {?>
|
||||
<a data-toggle="modal" data-target="#myModal1" class="btn btn-success">Add Line Item</a>
|
||||
<?php } ?>
|
||||
<div class="modal fade" id="myModal1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4>Add Line Item </h4>
|
||||
</center>
|
||||
</div>
|
||||
<div align="left">
|
||||
<div class="col-md-12" style="padding: 20px;">
|
||||
<label>Material Code</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("0" => 'Material Code');
|
||||
//print_r( $options);
|
||||
if (!empty($MaterialCode)) {
|
||||
foreach ($MaterialCode as $MID) :
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('drpMaterial', $options, set_value('drpMaterial'), 'id="drpMaterial"', '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;">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
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 addClick" ID="addClick"><i class="fa fa-plus"></i> <span class="bold">Add</span></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div> <!-- container -->
|
||||
<div id="add-req-modal" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Add Line Item</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="drpMaterial" class="control-label">Material Code</label>
|
||||
<?php
|
||||
$options = array("0" => 'Material Code');
|
||||
if (!empty($MaterialCode)) {
|
||||
foreach ($MaterialCode as $MID) :
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('drpMaterial', $options, set_value('drpMaterial'), 'id="drpMaterial" class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div><br />
|
||||
<div class="modal fade" id="EditItem" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
</div>
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4>Edit Line Item </h4>
|
||||
</center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-12" style="padding: 20px;">
|
||||
<label>Material Code</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditMaterialCode', 'value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</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">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
// $data = array('name' => 'EditotherD','value' => set_value('EditotherD'),'id'=>'EditotherD', 'class' => 'form-control','readonly'=>'true' );
|
||||
// echo form_input($data);
|
||||
|
||||
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
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"><i class="fa fa-plus"></i> <span class="bold">Edit</span></a>
|
||||
|
||||
</div>
|
||||
<div class="row" id="otherDescription" style="display:none;">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="otherD" class="control-label">Other Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="UOM" class="control-label">UOM</label>
|
||||
<?php
|
||||
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Quantity" class="control-label">Quantity</label>
|
||||
<?php $data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
echo form_input($data); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div></br>
|
||||
|
||||
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Uom</th>
|
||||
|
||||
<th>RequestedQuantity</th>
|
||||
<th>PoQuantity</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tempAppend">
|
||||
<?php
|
||||
if (!empty($LineItem)) {
|
||||
$index = 0;
|
||||
foreach ($LineItem as $record) {
|
||||
$index = $index + 1;
|
||||
$materialdesc = isset($record->MaterialDescription) ? $record->MaterialDescription : "";
|
||||
//echo $materialdesc;
|
||||
?>
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<td align="left"><?php echo $index; ?></td>
|
||||
<input type="hidden" name="<?php echo 'te' . $index ?>" id="<?php echo 'te' . $index ?>" value="<?php echo $record->MaterialCode; ?>" />
|
||||
<input type="hidden" name="<?php echo 'te' . $index ?>" id="<?php echo 'tes' . $index ?>" value="<?php echo $record->Quantity; ?>" />
|
||||
|
||||
<td align="left"><?php echo $record->MaterialCode; ?></td>
|
||||
|
||||
<td align="left"><?php echo $record->MaterialName; ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td align="left"><?php echo $record->UOM; ?></td>
|
||||
|
||||
<td align="left"><?php echo $record->Quantity; ?></td>
|
||||
<td align="left"><?php echo $record->POQTY; ?></td>
|
||||
<td align="left"><?php echo $record->StatusName; ?></td>
|
||||
<input type="hidden" name="<?php echo 'materialdesc' . $index ?>" id="<?php echo 'materialdesc' . $index ?>" value="<?php echo isset($record->MaterialDescription) ? $record->MaterialDescription : ''; ?>" />
|
||||
<td>
|
||||
<a class="a_tag_link" data-id="<?php echo $index; ?>" data-userid="<?php echo $index; ?>" data-target='#EditItem' data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->MaterialCode; ?> Material details"></i> </a> <a onclick="DeleteRow(<?php echo $index; ?>)" class="link" data-id="<?php echo $record->MaterialCode; ?>" data-userid="<?php echo $index; ?>" id="Del" class="a_tag_link"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php $RowCount = $index;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<div align="right" style="padding-right:10px">
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
|
||||
<?php if ($Status == REQ_DRAFT) { ?>
|
||||
<input type="reset" class="btn btn-reset">
|
||||
<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>
|
||||
<?php } else if ($Status == REQ_PENDING_APPROVAL) { ?>
|
||||
<input type="reset" class="btn btn-reset">
|
||||
<!--<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">Submit</span></a>
|
||||
<a class="btn btn-approved submit" ID="submit" onclick="Save(2)"> <span class="bold">Approve</span></a>
|
||||
<?php } ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="Description" class="control-label">Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary waves-effect"
|
||||
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-info waves-effect waves-light addClick">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
<div id="edit-req-modal" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Edit Line Item</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="EditMaterialCode" class="control-label">Material Code</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditMaterialCode', 'value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="EditotherDescription">
|
||||
<div class="form-group">
|
||||
<label for="EditotherD"
|
||||
class="control-label">Other Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'readonly' => 'true');
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="EditUOM"
|
||||
class="control-label">UOM</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="EditQuantity"
|
||||
class="control-label">Quantity</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="EditDescription" class="control-label">Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary waves-effect"
|
||||
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-info waves-effect waves-light EditClick">Edit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div><!-- /.modal -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
// $("#CostCenter").select2();
|
||||
// $("#drpMaterial").select2();
|
||||
// $("#EditMaterialCode").select2();
|
||||
$("#CostCenter").select2();
|
||||
$("#drpMaterial").select2();
|
||||
$("#EditMaterialCode").select2();
|
||||
});
|
||||
|
||||
function isNumberKey(evt) {
|
||||
@ -540,9 +466,6 @@ if (!empty($ReqPOType)) {
|
||||
$('#otherDescription').hide();
|
||||
$('#EditotherDescription').hide();
|
||||
|
||||
$(".datePicker").datepicker({
|
||||
dateFormat: 'dd/mm/yy'
|
||||
});
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$(".select2").select2();
|
||||
@ -553,8 +476,7 @@ if (!empty($ReqPOType)) {
|
||||
var urlval = '';
|
||||
|
||||
urlval = "<?php echo base_url() ?>serviceAvilBudgetAmount";
|
||||
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data: {id: id,type: ReqType},
|
||||
type: "POST",
|
||||
@ -680,7 +602,7 @@ if (!empty($ReqPOType)) {
|
||||
<td align="left"><%=Quantity%></td>
|
||||
<td align="left">0.00</td>
|
||||
<td align="left">NEW</td>
|
||||
<td><a data-target='#EditItem' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i> </a> <a href='#' onclick="DeleteRow(index)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
<td><a data-target='#edit-req-modal' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#edit-req-modal"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i> </a> <a href='#' onclick="DeleteRow(index)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a></td>
|
||||
</tr>
|
||||
</script>
|
||||
<script>
|
||||
@ -965,14 +887,14 @@ if (!empty($ReqPOType)) {
|
||||
theForm.append(input);
|
||||
}
|
||||
|
||||
$("#myModal1").on("shown.bs.modal", function(e) {
|
||||
$("#add-req-modal").on("shown.bs.modal", function(e) {
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please select the Request Type ');
|
||||
e.close();
|
||||
}
|
||||
});
|
||||
|
||||
$("#EditItem").on("shown.bs.modal", function(e) {
|
||||
$("#edit-req-modal").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
//alert(userid);
|
||||
var tr = document.getElementById(userid);
|
||||
@ -1059,14 +981,11 @@ if (!empty($ReqPOType)) {
|
||||
|
||||
$("#ScheduleType").change(function() {
|
||||
if ($('#ScheduleType').val().trim() != 'Recurring') {
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
|
||||
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
} else {
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -61,5 +61,7 @@
|
||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/c3/c3.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>public/new_assets/js/pages/c3.init.js"></script>
|
||||
|
||||
<script src="<?php echo base_url(); ?>public/new_assets/libs/select2/js/select2.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
<!-- icons -->
|
||||
<link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- third party css -->
|
||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?php echo base_url(); ?>public/new_assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo base_url(); ?>public/new_assets/libs/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
@ -13,389 +13,320 @@ if (!empty($Emp)) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style type="text/css">
|
||||
.select2 {
|
||||
width: 100% ! important;
|
||||
}
|
||||
|
||||
.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;">
|
||||
<section class="content">
|
||||
<center><b><h2><?= "Add Requisition"; ?></h2></b></center>
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<div id="content"></div>
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'Requisitionform::SearchRequistList', $attributes); ?>
|
||||
<!-- Form row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div align="right" style="padding-right:11px">
|
||||
<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);
|
||||
<div class="card" style="margin: 24px 0px !important;">
|
||||
<div class="card-body">
|
||||
<div class="pb-2 border-bottom border-light d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h4 class="header-title"><?= "Add Requisition"; ?></h4>
|
||||
</div>
|
||||
<a href="<?php echo base_url(); ?>Requisition" ID="cancel"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'Requisitionform::SearchRequistList', $attributes);
|
||||
?>
|
||||
<!-- <input type="hidden" name="EmpID" id="EmpID" value=<?php //echo $EmpID ?> /> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
<label for="EmpID" class="col-form-label">Requested By<span class="text-danger">*</span></label>
|
||||
<?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" data-toggle="select2" required="true"');
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="RequestType" class="col-form-label">Request Type<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$options = array("-1" => 'Select Request Type');
|
||||
if (!empty($RequestType)) {
|
||||
foreach ($RequestType as $RID) :
|
||||
$options[$RID->ConfigValue] = $RID->ConfigValue;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="RequestType" class = "form-control" data-toggle="select2"', 'required="true"');
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="DeptName" class="col-form-label">Department Name</label>
|
||||
<?php
|
||||
$data = array('name' => 'DeptName', 'value' => set_value('DeptName', $DepartmentName), 'id' => 'DeptName', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="Designation" class="col-form-label">Designation</label>
|
||||
<?php
|
||||
$data = array('name' => 'Designation', 'value' => set_value('Designation', $Designation), 'id' => 'Designation', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="CostCenter" class="col-form-label">Cost Center Name<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$Costs = array("-1" => 'Select Cost Center Name');
|
||||
if (!empty($CostCenter)) {
|
||||
foreach ($CostCenter as $SID) :
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode . '-' . $SID->CostCenterName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown(
|
||||
'CostCenter',
|
||||
$Costs,
|
||||
set_value('CostCenter'),
|
||||
'class="form-control" id="CostCenter" data-toggle="select2"'
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label for="ScheduleType" class="col-form-label">Service Schedule Type</label>
|
||||
<?php
|
||||
$Schdule = array("One Time", "Recurring");
|
||||
if (!empty($Schdule)) {
|
||||
foreach ($Schdule as $Sch) :
|
||||
$SchType[$Sch] = $Sch;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control"', 'data-toggle="select2"');
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="ServicePeriodOption" style="display:none;">
|
||||
<label for="ServiceOptions" class="col-form-label">Service Period Option</label>
|
||||
<?php
|
||||
if (!empty($ServiceOption)) {
|
||||
foreach ($ServiceOption as $SerOption) :
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control"', 'data-toggle="select2"');
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label for="ServiceNo" class="col-form-label">Number of Services</label>
|
||||
<?php
|
||||
$data = array('name' => 'ServiceNo', 'value' => set_value('ServiceNo'), 'id' => 'ServiceNo', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<a onclick="return validateBeforeAdd();" class="btn btn-primary waves-effect float-right">Add Line Item</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="table-responsive">
|
||||
<table id="Items" class="table table-striped table-hover mb-0" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Uom</th>
|
||||
<th>Quantity</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</div> <!-- end table-responsive-->
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<!-- Available Budget Amt -->
|
||||
<input type="hidden" name="AvlBudgetAmount" id="AvlBudgetAmount" />
|
||||
</div>
|
||||
<div class="form-row float-right">
|
||||
<input type="reset" value="Reset" class="btn btn-secondary waves-effect" onclick="window.location.reload();">
|
||||
<a class="btn btn-primary waves-effect Save" ID="Save" onclick="Save()"> <span class="bold">Save As Draft</span></a>
|
||||
<input type="submit" class="btn btn-soft-primary waves-effect waves-light" value="Approved">
|
||||
</div>
|
||||
<?php echo form_close();?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Request Type</label><span style="color:red;">*</span>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1" => 'Select Request Type');
|
||||
|
||||
//print_r( $options);
|
||||
|
||||
if (!empty($RequestType)) {
|
||||
foreach ($RequestType as $RID) :
|
||||
|
||||
|
||||
$options[$RID->ConfigValue] = $RID->ConfigValue;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="RequestType"', 'class = "form-control select2"', 'required="true"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeptName', 'value' => set_value('DeptName', $DepartmentName), 'id' => 'DeptName', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Designation</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Designation', 'value' => set_value('Designation', $Designation), 'id' => 'Designation', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Cost Center Name</label><span style="color:red;">*</span>
|
||||
<div>
|
||||
<?php
|
||||
$Costs = array("-1" => 'Select Cost Center Name');
|
||||
//print_r( $options);
|
||||
|
||||
if (!empty($CostCenter)) {
|
||||
foreach ($CostCenter as $SID) :
|
||||
// echo $SID->ConfigValue;
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode . '-' . $SID->CostCenterName;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none">
|
||||
<label>Available Budget Amt</label> <img id="AlertImg" src="<?php echo base_url(); ?>public/assets/dist/img/red.png" alt="your image" width="15px" style="display:none" />
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AvlBudgetAmount', 'value' => set_value('AvlBudgetAmount'), 'id' => 'AvlBudgetAmount', 'class' => 'form-control num', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" id="DisplayScheduleDiv" style="display:none;">
|
||||
<label>Service Schedule Type</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$Schdule = array("One Time", "Recurring");
|
||||
|
||||
|
||||
if (!empty($Schdule)) {
|
||||
foreach ($Schdule as $Sch) :
|
||||
|
||||
$SchType[$Sch] = $Sch;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ScheduleType', $SchType, set_value('ScheduleType'), 'id="ScheduleType"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="ServicePeriodOption" style="display:none;">
|
||||
<label>Service Period Option</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if (!empty($ServiceOption)) {
|
||||
foreach ($ServiceOption as $SerOption) :
|
||||
|
||||
|
||||
$ServiceOptions[$SerOption->ConfigValue] = $SerOption->ConfigValue;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('ServiceOptions', $ServiceOptions, set_value('ServiceOptions'), 'id="ServiceOptions"', 'class = "form-control select2"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" id="NoServices" style="display:none;">
|
||||
<label>Number of Services</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'ServiceNo', 'value' => set_value('ServiceNo'), 'id' => 'ServiceNo', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right">
|
||||
<!-- <div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT
|
||||
</div> -->
|
||||
<a onclick="return validateBeforeAdd();" class="btn btn-success">Add Line Item</a>
|
||||
<div class="modal fade" id="myModal1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4>Add Line Item </h4>
|
||||
</center>
|
||||
</div>
|
||||
<div align="left">
|
||||
<div class="col-md-12" style="padding: 20px;">
|
||||
<label>Material Code</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("0" => 'Material Code');
|
||||
//print_r( $options);
|
||||
if (!empty($MaterialList)) {
|
||||
foreach ($MaterialList as $MID) :
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
echo form_dropdown('MaterialCode', $options, set_value('MaterialCode'), 'id="MaterialCode"', 'class="form-control select2" ');
|
||||
<!-- end row -->
|
||||
</div> <!-- container -->
|
||||
<div id="add-req-modal" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Add Line Item</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="MaterialCode" class="control-label">Material Code</label>
|
||||
<?php
|
||||
$options = array("0" => 'Material Code');
|
||||
//print_r( $options);
|
||||
if (!empty($MaterialList)) {
|
||||
foreach ($MaterialList as $MID) :
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode . ' ' . ' - ' . ' ' . $MID->MaterialName;
|
||||
endforeach;
|
||||
}
|
||||
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-6" id="otherDescription" style="display:none;">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1','maxlength' => '20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</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="row" id="otherDescription" style="display:none;">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="otherD" class="control-label">Other Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'otherD', 'value' => set_value('otherD'), 'id' => 'otherD', 'class' => 'form-control', 'rows' => '5', 'cols' => '70', 'maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="UOM" class="control-label">UOM</label>
|
||||
<?php
|
||||
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Quantity" class="control-label">Quantity</label>
|
||||
<?php $data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1', 'maxlength' => '20');
|
||||
echo form_input($data); ?>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="Description" class="control-label">Description</label>
|
||||
<?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 fade" id="EditItem" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary waves-effect"
|
||||
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-info waves-effect waves-light addClick">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
<div id="edit-req-modal" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Edit Line Item</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="EditMaterialCode" class="control-label">Material Code</label>
|
||||
<?php
|
||||
$data = array('value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center>
|
||||
<h4>Edit Line Item </h4>
|
||||
</center>
|
||||
</div>
|
||||
<div align="left">
|
||||
|
||||
<div class="col-md-12" style="padding: 20px;">
|
||||
<label>Material Code</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('value' => set_value('EditMaterialCode'), 'id' => 'EditMaterialCode', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding: 5px;">
|
||||
|
||||
<div class="col-md-6" id="EditotherDescription">
|
||||
<label>Other Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)','min' => '1', 'maxlength' => '20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</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>
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="EditotherDescription">
|
||||
<div class="form-group">
|
||||
<label for="EditotherD"
|
||||
class="control-label">Other Description</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditotherD', 'value' => set_value('EditotherD'), 'id' => 'EditotherD', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="EditUOM"
|
||||
class="control-label">UOM</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM', 'value' => set_value('EditUOM'), 'id' => 'EditUOM', 'class' => 'form-control', 'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="EditQuantity"
|
||||
class="control-label">Quantity</label>
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1', 'maxlength' => '20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="EditDescription" class="control-label">Description</label>
|
||||
<?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">
|
||||
<button type="button" class="btn btn-secondary waves-effect"
|
||||
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-info waves-effect waves-light EditClick">Edit</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<!-- <thead style="background-color:#ddf"> -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>Uom</th>
|
||||
<th>Quantity</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tempAppend">
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<div align="right" style="padding-right:10px">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<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>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#otherDescription').hide();
|
||||
$('#EditotherDescription').hide();
|
||||
@ -413,9 +344,7 @@ if (!empty($Emp)) {
|
||||
|
||||
$(function() {
|
||||
|
||||
$(".datePicker").datepicker({
|
||||
dateFormat: 'dd/mm/yy'
|
||||
});
|
||||
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$(".select2").select2();
|
||||
@ -443,7 +372,7 @@ if (!empty($Emp)) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>serviceAvilBudgetAmount",
|
||||
success: function(data) {
|
||||
if (data != '0') {
|
||||
if (data != '0') {
|
||||
$('#content').loader('hide');
|
||||
$("#AvlBudgetAmount").val(parseFloat(data).toFixed(2));
|
||||
if (parseFloat($("#AvlBudgetAmount").val()) <= 0) {
|
||||
@ -476,11 +405,14 @@ if (!empty($Emp)) {
|
||||
$('#txtDeletedRow').val('');
|
||||
$("#Description").val('');
|
||||
$("#UOM").val('');
|
||||
// Get the ID of the first option
|
||||
// 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() });
|
||||
|
||||
$('#CostCenter').val(firstOptionId).select2('data', {
|
||||
id: firstOptionId,
|
||||
text: $('#CostCenter option:selected').text()
|
||||
});
|
||||
|
||||
|
||||
removeHiddenRows($('#Items').find('tr').length);
|
||||
$('#tempAppend').empty();
|
||||
@ -489,7 +421,9 @@ if (!empty($Emp)) {
|
||||
if (id != '-1') {
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data: {id: id},
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
dataType: 'json',
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>getMaterialCode",
|
||||
@ -596,7 +530,7 @@ if (!empty($Emp)) {
|
||||
|
||||
<td align="left"><%=Quantity%></td>
|
||||
<td>
|
||||
<a class="a_tag_link" data-target='#EditItem' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i> </a> <a class="a_tag_link" href='#' onclick="Deleterow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<a class="a_tag_link" data-target='#edit-req-modal' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#edit-req-modal"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i> </a> <a class="a_tag_link" href='#' onclick="Deleterow(index)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
|
||||
|
||||
</td>
|
||||
@ -605,9 +539,9 @@ if (!empty($Emp)) {
|
||||
<script>
|
||||
function validateBeforeAdd() {
|
||||
// var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
// isChecked ? $('#Quantity').val(0).prop('readonly', true).prop('required', false)
|
||||
// : $('#Quantity').val('').prop('readonly', false).prop('required', true);
|
||||
|
||||
// isChecked ? $('#Quantity').val(0).prop('readonly', true).prop('required', false)
|
||||
// : $('#Quantity').val('').prop('readonly', false).prop('required', true);
|
||||
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please select the Request Type ');
|
||||
$("#RequestType").focus();
|
||||
@ -623,14 +557,12 @@ if (!empty($Emp)) {
|
||||
// return false;
|
||||
// }
|
||||
else {
|
||||
$('#myModal1').modal('show');
|
||||
$('#add-req-modal').modal('show');
|
||||
$('#otherDescription').hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
function Save() {
|
||||
|
||||
var id = '<?php echo REQ_DRAFT; ?>'
|
||||
@ -661,8 +593,8 @@ if (!empty($Emp)) {
|
||||
}
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: $('.requistion').serialize() + "&serviceSchedule=" + serviceSchedule + "&servicePeriod=" + servicePeriod + "&noOfService=" + noOfService+"&ID=" + id,
|
||||
type: "POST",
|
||||
data: $('.requistion').serialize() + "&serviceSchedule=" + serviceSchedule + "&servicePeriod=" + servicePeriod + "&noOfService=" + noOfService + "&ID=" + id,
|
||||
url: "<?php echo base_url() ?>addNewRequisition",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
@ -684,7 +616,7 @@ if (!empty($Emp)) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<script>
|
||||
function validate() {
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
@ -736,7 +668,7 @@ if (!empty($Emp)) {
|
||||
}
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
|
||||
alert('Please Enter The Vaild Quantity');
|
||||
return false;
|
||||
@ -792,7 +724,7 @@ if (!empty($Emp)) {
|
||||
addHidden(theForm, "otherD" + temp, materialdescription);
|
||||
|
||||
$('#txtRowCount').val(temp);
|
||||
$('#myModal1').modal('hide');
|
||||
$('#add-req-modal').modal('hide');
|
||||
toastr.success('Line Item Added!', 'Success');
|
||||
|
||||
|
||||
@ -812,9 +744,9 @@ if (!empty($Emp)) {
|
||||
input.value = value;
|
||||
theForm.append(input);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<script>
|
||||
$("#myModal1").on("shown.bs.modal", function(e) {
|
||||
$("#add-req-modal").on("shown.bs.modal", function(e) {
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please select the Request Type ');
|
||||
e.close();
|
||||
@ -822,7 +754,7 @@ if (!empty($Emp)) {
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$("#EditItem").on("shown.bs.modal", function(e) {
|
||||
$("#edit-req-modal").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
// alert(userid);
|
||||
var tr = document.getElementById(userid);
|
||||
@ -838,11 +770,11 @@ if (!empty($Emp)) {
|
||||
$('.EditClick').click(function() {
|
||||
var editqty = parseInt(document.getElementById('EditQuantity').value);
|
||||
if (isNaN(editqty) || editqty < 1) {
|
||||
// if (document.getElementById('EditQuantity').value == '') {
|
||||
// if (document.getElementById('EditQuantity').value == '') {
|
||||
alert('Please Enter the Vaild Quantity');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($('#EditQuantity').val() != '') {
|
||||
|
||||
@ -863,16 +795,17 @@ if (!empty($Emp)) {
|
||||
$('#UOM' + userid).val(editUOM);
|
||||
$('#Quantity' + userid).val(editQuantity);
|
||||
|
||||
$('#EditItem').modal('hide');
|
||||
$('#edit-req-modal').modal('hide');
|
||||
toastr.success('Line Item Updated!', 'Success');
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
<script>
|
||||
$(".requistion").submit(function(e) {
|
||||
|
||||
// var id = '<?php //echo REQ_PENDING_APPROVAL; ?>' // don't delete 22/04/2022
|
||||
// var id = '<?php //echo REQ_PENDING_APPROVAL;
|
||||
?>' // don't delete 22/04/2022
|
||||
var id = '<?php echo REQ_APPROVED; ?>'
|
||||
e.preventDefault();
|
||||
if (validate()) {
|
||||
@ -902,7 +835,7 @@ if (!empty($Emp)) {
|
||||
}
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data: $('.requistion').serialize() + "&serviceSchedule=" + serviceSchedule + "&servicePeriod=" + servicePeriod + "&noOfService=" + noOfService+"&ID=" + id,
|
||||
data: $('.requistion').serialize() + "&serviceSchedule=" + serviceSchedule + "&servicePeriod=" + servicePeriod + "&noOfService=" + noOfService + "&ID=" + id,
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>addNewRequisition",
|
||||
success: function(data) {
|
||||
@ -925,8 +858,8 @@ if (!empty($Emp)) {
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#Items').DataTable({
|
||||
@ -943,14 +876,13 @@ if (!empty($Emp)) {
|
||||
<script>
|
||||
$("#ScheduleType").change(function() {
|
||||
if ($('#ScheduleType').val().trim() != 'Recurring') {
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
$('#ServiceNo').val('');
|
||||
} else {
|
||||
document.getElementById('ServicePeriodOption').style.display = 'none';
|
||||
document.getElementById('NoServices').style.display = 'none';
|
||||
document.getElementById('ServiceNo').value = 1;
|
||||
$('#ServicePeriodOption').hide();
|
||||
$('#NoServices').hide();
|
||||
$('#ServiceNo').val(1);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -50,14 +50,15 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Transporter Details</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 text-right">
|
||||
<div class="form-group">
|
||||
<a data-toggle="modal" href="#transporterwizard" data-id="0" data-name="" class="btn btn-success">Add New Transporter</a>
|
||||
<div class="pb-2 d-flex justify-content-between align-items-center">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Transporter Details</h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a data-toggle="modal" href="#transporterwizard" data-id="0" data-name="" class="btn btn-success">Add New Transporter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
@ -114,21 +115,17 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
<!-- for Add and edit Modal -->
|
||||
<div class="modal fade" id="transporterwizard" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<center><h4 class="modal-title" id="myModalLabel"></h4></center>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
<form id="transporterForm" class="form-horizontal" role="form">
|
||||
<div id="transporterwizard" class="modal fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body p-4">
|
||||
<form id="transporterForm" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
@ -141,19 +138,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal Footer -->
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-cancel" data-dismiss="modal">Cancel</a>
|
||||
<a class="btn btn-success font tempClick" id="tempClick">
|
||||
<span class="bold">Submit</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary waves-effect"
|
||||
data-dismiss="modal" value="Cancel">Cancel</button>
|
||||
<button type="button"
|
||||
class="btn btn-info waves-effect waves-light tempClick" id="tempClick">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user