'Importoptionchange'
This commit is contained in:
parent
f67942c2fb
commit
9ca68a9524
@ -2,7 +2,23 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
#ImportPOCheck {
|
||||||
|
margin-top:200px;
|
||||||
|
z-index: 1080 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal
|
||||||
|
{
|
||||||
|
padding-right:30% ! important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
|
||||||
.dataTables_paginate
|
.dataTables_paginate
|
||||||
{
|
{
|
||||||
margin-top: -5%;
|
margin-top: -5%;
|
||||||
@ -21,7 +37,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO','method' => 'post','role' => 'form' );
|
$attributes = array('class' => 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO','method' => 'post','role' => 'form' );
|
||||||
|
|
||||||
echo form_open($this->config->base_url().'PurchaseOrder',$attributes); ?>
|
echo form_open($this->config->base_url().'purchaseOrder',$attributes); ?>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
||||||
@ -50,9 +66,10 @@
|
|||||||
<div align="right" style="padding-right:10px">
|
<div align="right" style="padding-right:10px">
|
||||||
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder">
|
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder">
|
||||||
<button type="button" class="btn btn-primary">Create PO</button></a> -->
|
<button type="button" class="btn btn-primary">Create PO</button></a> -->
|
||||||
<input type="submit" class="btn btn-primary" onclick="return Validate();" value="Create Purchase Order">
|
<!--<input type="submit" class="btn btn-primary" onclick="return Validate();" value="Create Purchase Order"> -->
|
||||||
|
<a class="btn btn-primary" onclick="Validate();" >Create Purchase Order</a>
|
||||||
<input type="hidden" name="txtReqNo" id="txtReqNo" />
|
<input type="hidden" name="txtReqNo" id="txtReqNo" />
|
||||||
|
<input type="hidden" name="txtReqType" id="txtReqType" />
|
||||||
</div></p>
|
</div></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -246,43 +263,61 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal fade" id="ImportPOCheck" 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>
|
||||||
|
<h4 class="modal-title">Do You want to create Import PO for this Requistion?</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="optImport" checked="checked" value="0" id="optImport">YES</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="optImport" value="1" id="optImport">NO</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<!--<a class="btn btn-primary" ID="Import" onclick="SetImportPO();" style="margin-top: -24px;">-->
|
||||||
|
<input type="submit" class="btn btn-primary" onclick="SetImportPO();" value="OK" style="margin-top: -24px;"/>
|
||||||
|
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
var POType = '';
|
||||||
|
function SetImportPO()
|
||||||
|
{
|
||||||
|
POType = $("input:radio[name='optImport']:checked").val();
|
||||||
|
|
||||||
|
$('#ImportPOCheck').modal('hide');
|
||||||
|
if(POType == 0)
|
||||||
|
{
|
||||||
|
$('#txtReqType').val('IMPORT');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#txtReqType').val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$('#ReqDate').val('');
|
$('#ReqDate').val('');
|
||||||
var Fromdt = '';
|
var Fromdt = '';
|
||||||
var Todt = '';
|
var Todt = '';
|
||||||
var baseurl = "<?php print base_url(); ?>";
|
var baseurl = "<?php print base_url(); ?>";
|
||||||
$(".RequisitionList").submit(function(e) {
|
|
||||||
|
|
||||||
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
var id = '';
|
|
||||||
var chk1 = $('#chk1').val();
|
|
||||||
var chk2 = $('#chk2').val();
|
|
||||||
var chk3 = $('#chk3').val();
|
|
||||||
if( $('#chk1').is(":checked"))
|
|
||||||
{
|
|
||||||
id = '';
|
|
||||||
}
|
|
||||||
else if($('#chk2').is(":checked"))
|
|
||||||
{
|
|
||||||
id = '';
|
|
||||||
}
|
|
||||||
else if($('#chk3').is(":checked"))
|
|
||||||
{
|
|
||||||
id = '';
|
|
||||||
}
|
|
||||||
// alert(chk1);
|
|
||||||
// alert(chk2);
|
|
||||||
// alert(chk3);
|
|
||||||
|
|
||||||
window.location = baseurl +'purchaseorderform/purchaseorder';
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
//Date range picker
|
//Date range picker
|
||||||
$('#ReqDate').daterangepicker({
|
$('#ReqDate').daterangepicker({
|
||||||
locale: {
|
locale: {
|
||||||
@ -290,84 +325,6 @@ var baseurl = "<?php print base_url(); ?>";
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#drpDepartment').change(function() {
|
|
||||||
|
|
||||||
var id = $('#drpDepartment').val();
|
|
||||||
|
|
||||||
if(id != '-1')
|
|
||||||
{
|
|
||||||
$('#content').loader('show');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
data:{id:id},
|
|
||||||
dataType: 'json',
|
|
||||||
type:"POST",
|
|
||||||
url:"<?php echo base_url();?>purchaseorder/getStatusByDepartment",
|
|
||||||
success:function(json) {
|
|
||||||
|
|
||||||
$('#content').loader('hide');
|
|
||||||
|
|
||||||
$("#drpstatus").empty();
|
|
||||||
$("#drpstatus").append(json.depStaus);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
alert('Please select the Employee details');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function Search()
|
|
||||||
{
|
|
||||||
var dept = '';
|
|
||||||
var status ='';
|
|
||||||
//st = '';
|
|
||||||
var val = $('#ReqDate').val();
|
|
||||||
if($('#drpDepartment').val() != 0)
|
|
||||||
{
|
|
||||||
dept= $('#drpDepartment').val()
|
|
||||||
}
|
|
||||||
if($('#drpstatus').val() != 0)
|
|
||||||
{
|
|
||||||
status= $('#drpstatus').val()
|
|
||||||
}
|
|
||||||
var daterng = $('#ReqDate').val();
|
|
||||||
DataColl = [];
|
|
||||||
DataColl[0] = dept;
|
|
||||||
DataColl[1] = status;
|
|
||||||
DataColl[2] = daterng;
|
|
||||||
|
|
||||||
$('#content').loader('show');
|
|
||||||
$.ajax({
|
|
||||||
data:{id:DataColl},
|
|
||||||
type:"POST",
|
|
||||||
dataType: 'json',
|
|
||||||
url:"<?php echo base_url() ?>purchaseorder/SearchListofRequistion",
|
|
||||||
success:function(json) {
|
|
||||||
// success:function(data) {
|
|
||||||
$('#content').loader('hide');
|
|
||||||
|
|
||||||
$("#AppendReqList").empty();
|
|
||||||
$("#AppendReqList").append(json.ReqList);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Reset()
|
|
||||||
{
|
|
||||||
$('#drpDepartment').val("0");
|
|
||||||
$('#drpstatus').val("0");
|
|
||||||
$('#ReqDate').val('');
|
|
||||||
}
|
|
||||||
var coll = [];
|
var coll = [];
|
||||||
var RequistionList = {
|
var RequistionList = {
|
||||||
Req: []
|
Req: []
|
||||||
@ -486,8 +443,9 @@ function Validate()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return true;
|
|
||||||
}
|
$('#ImportPOCheck').modal('show');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$(function () {
|
$(function () {
|
||||||
//$("#revenueTax").DataTable();
|
//$("#revenueTax").DataTable();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user