file changes in cashbook screen

This commit is contained in:
venbatechnologies@gmail.com 2018-05-08 10:59:33 +05:30
parent e46ff49531
commit 6699b62473
2 changed files with 620 additions and 532 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,6 @@
<script type="text/javascript" src="<?php echo base_url();?>assets/Autocomplete/jquery.autocomplete.js"></script>
<?php //print_r($dropdownvalues);?>
<script> <script>
$(function() { $(function() {
var t = []; var t = [];
var ex = []; var ex = [];
var inc = []; var inc = [];
@ -17,26 +12,22 @@ $(function() {
} }
}); });
$('#gst').click(function(){ $('#gst').click(function(){
$('#gstarea').toggle(); $('#gstarea').toggle();
}); });
$('#towhom').text('Received From:'); $('#towhom').text('Received From:');
$("#Date").datepicker({ $("#Date").datepicker({
//minDate : new Date(year-SIAStartYear,1,1), //minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now', maxDate :'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
}); });
}); });
function readURL(input) { function readURL(input) {
var sizeof = document.getElementById('file').files[0].size; var sizeof = document.getElementById('file').files[0].size;
@ -114,16 +105,21 @@ function loadAccountType(id)
} }
//alert('final alert'); //alert('final alert');
} }
</script> </script>
<style>
.autocomplete-suggestion{
cursor:pointer;
background-color:skyblue;
/* background-color: darkgrey; */
outline: 1px solid slategrey;
}
</style>
<div class="content-wrapper" style="min-height: 537px;"> <div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<center>Siddharth Industries - Add New Receipt and Payment</center> <center>Siddharth Industries - Add New Receipt and Payment</center>
</h1> </h1>
</section> </section>
@ -160,11 +156,9 @@ function loadAccountType(id)
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"><b> <div class="form-group"><b>
<span for="PONO">Account Name Select:</span> </b><span style="color:red">*</span> </br></br> <span for="Accountname">Account Name Select:</span> </b><span style="color:red">*</span> </br></br>
<select class="form-control required " required id="accode" required name="accode"> <select class="form-control required " required id="accode" required name="accode">
<option value="-1">Account Name Select</option> <option value="-1">Account Name Select</option>
</select> </select>
</div> </div>
</div> </div>
@ -173,7 +167,7 @@ function loadAccountType(id)
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"> <div class="form-group">
<b> <b>
<span for="PODescription">Date:</span></b><span style="color:red">*</span></br></br> <span for="Date">Date:</span></b><span style="color:red">*</span></br></br>
<input type="text" class="form-control required" id="Date" name="Date"> <input type="text" class="form-control required" id="Date" name="Date">
</div> </div>
@ -213,15 +207,16 @@ function loadAccountType(id)
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group">
<b><span for="Merchant">Merchant Name:</span></b>
<div class="form-group"> <div>
<!-- <select class="form-control required " required id="merchant" name="merchant">
<b><span for="Merchant">Merchant Name:</span></b> <option value=" ">Select Merchant Name</option>
<input type="text" class="form-control required" id="merchant" name="merchant"> </select> -->
<input type="text" class="form-control required" id="merchant" name="merchant" maxlength="255">
</div> <!-- <input type="text" class="form-control required " required id="MatCate" name="MatCate" maxlength="255" > -->
</div>
</div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
@ -306,7 +301,7 @@ function loadAccountType(id)
<div class="col-md-4"> <div class="col-md-4">
<b><span for="Description">File Upload:</span></b> <b><span for="Description">File Upload:</span></b>
<img id="slip" alt="your image" style="width: 139px;"/><br/> <img id="slip" alt="your image" style="width: 139px;"/><br/>
<input type='file' input accept=".JPG,.PNG" onchange="readURL(this);" id="file" name="myfile" accept="image/*"/> <input type='file' input accept=".JPG,.PNG" onchange="readURL(this);" id="file" name="myfile" />
</div> </div>
</div> </div>
</div> </div>
@ -475,4 +470,41 @@ $('#myradio2').click(function(){
$('#towhom').text('Paid To:'); $('#towhom').text('Paid To:');
}); });
$(document).ready(function(){
$('#merchant').autocomplete({
onSearchStart: function (query) {
$('#merchant').autocomplete("option", "minLength", 0);
},
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
onSelect: function (suggestion) {
var data = suggestion.SupplierName;
var selectedvalue = $('input[name=merchant]').val();
if(selectedvalue != ' ' )
{
$.ajax({
data:{id:selectedvalue},
type:"POST",
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
success:function(data) {
var supplier_gstno = '';
if(data != '')
{
data = JSON.parse(data);
$.each(data,function(i,arr){
supplier_gstno = arr.GSTNO;
});
$("#merchantgst").val(supplier_gstno);
}
}
});
}
}
});
});
</script> </script>