bill files +- changes

This commit is contained in:
venbatechnologies@gmail.com 2018-07-20 11:29:06 +05:30
parent a4d029ce22
commit ed6c7138ed
13 changed files with 336 additions and 60 deletions

View File

@ -614,8 +614,11 @@ class batchcard extends BaseController
if ($this->input->post('btn_submit')) {
$prod = $this->input->post('item_name');
$frm = $this->input->post('from_date');
$t = $this->input->post('to_date');
$data['material']=$this->batchcard_model->getMaterial_history($prod,$frm,$t);
$t = $this->input->post('to_date');
$data['material']=$this->batchcard_model->getMaterial_history($prod,$frm,$t);
}
$data['material_name']=$this->batchcard_model->material_name();
//$data['firstinvoice'] = $this->batchcard_model->selectquery();

View File

@ -3591,7 +3591,7 @@ function uploadfile()
if(!empty($_FILES['file']['name']))
{
$config['upload_path'] = 'uploads/BillFiles/';
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
$config['allowed_types'] = '*';
//$config['file_name'] = $_FILES['file']['name'];
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);

View File

@ -561,7 +561,7 @@ function uploadfile()
if(!empty($_FILES['file']['name']))
{
$config['upload_path'] = 'uploads/BillFiles/';
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
$config['allowed_types'] = '*';
//$config['file_name'] = $_FILES['file']['name'];
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);
//print_r($config) ;

View File

@ -133,7 +133,6 @@ class inwardgateregister_model extends CI_Model
$this->db->join('T_OGR_Master OGM ', 'POM.PONO = OGM.PONO_INV','left');
$this->db->where('POM.Status',PO_RELEASED);
$this->db->where('POM.POType !=',SERVICE);
$this->db->or_where('POM.Status',IGR_CREATED);
$this->db->or_where('POM.Status',MRIR_CREATED);
$this->db->or_where('POM.Status',MRIR_APPROVED);
$this->db->or_where('POM.Status',OGR_COMPLETE);

0
application/views/404.php Executable file → Normal file
View File

View File

@ -95,6 +95,14 @@
<b><span for="towhome" id="towhom">Received From:</span></b><span style="color:red">*</span></br></br>
<input type="text" class="form-control required" id="towhome" name="towhome">
</div></div>
<div class="col-md-3"><div class="form-group">
<b><span for="Suppliername">Select Supplier:</span> </b><span style="color:red">*</span></br></br>
<select class="form-control select2 required" id="supplier" name="supplier">
<option value="-1">Select Supplier</option>
</select>
</div></div>
</div><!--/ col-md -12-->
</div><!-- /row -->
<div class="row">
@ -371,6 +379,8 @@ $(function() {
var t = [];
var ex = [];
var inc = [];
var supp =[];
$('#SGST').val('0.00');
$('#CGST').val('0.00');
$('#IGST').val('0.00');
@ -401,9 +411,12 @@ $('#Recepitaccode').append(options);
}
});
supp = <?php echo json_encode($getsupplier)?>;
$.each(supp,function(s,supp){
$("#supplier").append( $('<option></option>').val(supp.SupplierID).html(supp.SupplierID+' - '+supp.SupplierName));
});
$('#gst').click(function(){
$('#gstarea').toggle();
});
@ -518,6 +531,7 @@ function loadAccountType(id)
<script>
var counter = 1;
var counterConstant = 1;
function openEvent(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");

324
application/views/alterpurchaseorder.php Executable file → Normal file
View File

@ -6171,15 +6171,7 @@ $('#PoTypeOptions').change(function()
}
});
$('#drpSupplier').change(function() {
$('#drpSupplier').change(function() {
var id = $('#drpSupplier').val();
$("#SupAddress").val('');
@ -6194,11 +6186,7 @@ $('#PoTypeOptions').change(function()
$("#SupAddress").val(obj.Address);
supPaymentTerms=obj.PaymentID;
}
}
});
if(supPaymentTerms!='PT08'){
@ -6219,10 +6207,6 @@ $('#PoTypeOptions').change(function()
{
$("#PaymentMethod").append( $('<option></option>').val(obj1.PaymentID).html(obj1.PaymentTerms));
}
@ -8370,19 +8354,11 @@ var specialservicerow=0;
<!-- Multiple file Upload Script -->
<script>
var counter = 0;
var counter = 0;
var counterConstant = 0;
$("#addmorebutton").click(function(){
//swal('sda');
if(counter>4){
if(counter>4){
swal("You have to upload five files only");//this allows only 5 files;
return false;
}
@ -8392,9 +8368,9 @@ else{
counterConstant++;
var div = document.createElement('div');
div.id = "divid"+counterConstant;
div.id = "divid"+counter;
div.className="row";
div.innerHTML='<div class="col-md-15">'+
div.innerHTML='<div class="col-md-12">'+
// '<div class="col-md-3">'+
// '<label>File Name</label>'+
// '<input type="text" id="maint_filename'+counterConstant+'" name="filename'+counterConstant+'" class="form-control" onkeypress="return false;" readonly/>'+
@ -8403,10 +8379,19 @@ div.innerHTML='<div class="col-md-15">'+
'<label><br></label>'+
'<input type="file" name="browseFiles'+counterConstant+'" id="imag" onchange="Copyfilename(this.name); "><br>'+
'</div>'+
'<div class="col-md-3">'+
// '<div class="col-md-3">'+
// '<label><br><br></label>'+
// '<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstant+'" onclick="removeRow(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
'<div class="col-md-1" style="margin-top:-3%;">'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstant+'" onclick="removeRow(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
'</div>'+
'<button class="btn btn-primary" type="button" onclick="addRow('+counter+')"id="addbtn1" ><i class="fa fa-plus-square"></i></button></div>'+
'<div class="col-md-1" style="margin-top:-3%;">'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtn'+counter+'" onclick="removeRow(this.id)"><i class="fa fa-minus-square"></i> </button></div>'+
// '</div>'+
'</div>';
$('#newdiv').append(div);
@ -8414,17 +8399,97 @@ div.innerHTML='<div class="col-md-15">'+
$('#hidecounter').val(counter);
$('#hideconstant').val(counterConstant);
if(counter > 1){
swal("Add button click here");//this allows only 5 files;
return false;
}
else {
$('#addmorebutton').hide();
}
}
});
function addRow(input)
{ if(input <5){
if(input ==0){
input = input+1;
$("#addbtn"+input).hide();
$("#removebtn"+input).hide();
}else{
$("#addbtn"+input).hide();
$("#removebtn"+input).hide();
}
}else{
$("#addbtn"+input).show();
$("#removebtn"+input).show();
}
// alert(s);
if(counter>4){
alert("No more files to add");//this allows only 5 files;
return false;
}
else{
counter++;
counterConstant++;
//alert("count"+counterConstants);
var div = document.createElement('div');
div.id = "divid"+counter;
div.className="row";
div.innerHTML='<div class="col-md-12">'+
'<div class="col-md-4">'+
'<label><br></label>'+
'<input type="file" name="browseFiles'+counterConstant+'" id="imag" onchange="Copyfilename(this.name); "><br>'+
'</div>'+
'<div class="col-md-1" style="margin-top:-3%;">'+
'<label><br><br></label>'+
'<button class="btn btn-primary" type="button" id="addbtn'+counter+'" onclick="addRow('+counter+')"><i class="fa fa-plus-square"></i></button></div>'+
'<div class="col-md-1" style="margin-top:-3%;">'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtn'+counter+'" onclick="removeRow(this.id)"><i class="fa fa-minus-square"></i> </button></div>'+
'</div>'+
'</div>';
$('#newdiv').append(div);
$('#hidecounter').val(counter);
$('#hideconstant').val(counterConstant);
if(counter > 1){
//alert("Next File choose + button click here");//this allows only 5 files;
//return false;
$('#addbtn').hide();
$("#removebtn").hide();
}
else {
$('#addmorebutton').hide();
}
}
}
function rfileswal()
{
//var file = $('#imag').val();
var file = $('#imag'+counterConstant).val();
var file = $('#imag').val();
if (file=='')
{
@ -8462,18 +8527,51 @@ function Copyfilename(id)
function removeRow(input) {
// function removeRow(input) {
var number = input.replace(/[^0-9]+/ig,"");
// var number = input.replace(/[^0-9]+/ig,"");
if(counter >= 1){
counter--;
// if(counter >= 1){
// counter--;
$("#divid"+number).remove();
// $("#divid"+number).remove();
// $('#hidecounter').val(counter);
// }
// }
function removeRow(input) {
// alert(input);
var number = input.replace(/[^0-9]+/ig,"");
//alert(number);
if(counter >= 1){
counter --;
$("#divid"+number).remove();
$('#hidecounter').val(counter);
}
var rm_count = $("#hideconstant").val();
if(counter !=0){
if(number != rm_count){
// alert("if");
$("#addbtn"+counter).show();
$("#removebtn"+counter).show();
}else{
//alert('else');
$("#addbtn"+counter).show();
$("#removebtn"+counter).show();
}
}else{
$("#addmorebutton").show();
}
}
//this function used to server /
var counters = 0;
var counterConstants = 0;
@ -8491,17 +8589,30 @@ else{
counterConstants++;
var div = document.createElement('div');
div.id = "divid"+counterConstants;
div.id = "divid"+counters;
div.className="row";
div.innerHTML='<div class="col-md-12">'+
'<div class="col-md-4">'+
'<label><br></label>'+
'<input type="file" id="images1" name="browseFiles'+counterConstants+'" onchange="Copyfilenames(this.name);"><br>'+
'</div>'+
'<div class="col-md-3">'+
'</div>'+
// '<div class="col-md-3">'+
// '<label><br><br></label>'+
// '<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstants+'" onclick="removeRows(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
// '</div>'+
'<div class="col-md-1" >'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstants+'" onclick="removeRows(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
'</div>'+
'<button class="btn btn-primary" type="button" onclick="addRows('+counters+')"id="addbtns1" ><i class="fa fa-plus-square"></i></button></div>'+
'<div class="col-md-1" >'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtns'+counters+'" onclick="removeRows(this.id)"><i class="fa fa-minus-square"></i></button></div>'+
'</div>';
$('#newsdiv').append(div);
@ -8509,14 +8620,98 @@ div.innerHTML='<div class="col-md-12">'+
$('#hidecounters').val(counters);
$('#hideconstants').val(counterConstants);
if(counters > 1){
swal("Add button click here");//this allows only 5 files;
return false;
}
else {
$('#addemorebutton').hide();
}
}
});
function addRows(inputs)
{ if(inputs <5){
if(inputs ==0){
inputs = inputs+1;
$("#addbtns"+inputs).hide();
$("#removebtns"+inputs).hide();
}else{
$("#addbtns"+inputs).hide();
$("#removebtns"+inputs).hide();
}
}else{
$("#addbtns"+inputs).show();
$("#removebtns"+inputs).show();
}
// alert(s);
if(counters>4){
alert("No more files to add");//this allows only 5 files;
return false;
}
else{
counters++;
counterConstants++;
//alert("count"+counterConstants);
var div = document.createElement('div');
div.id = "divid"+counters;
div.className="row";
div.innerHTML='<div class="col-md-12">'+
'<div class="col-md-4">'+
'<label><br></label>'+
'<input type="file" name="browseFiles'+counterConstants+'" id="images1" onchange="Copyfilename(this.name); "><br>'+
'</div>'+
// '<div class="col-md-2">'+
// '<label><br><br></label>'+
// '<button class="btn btn-danger remove remove_this" id="removebtns'+counters+'" onclick="removeRows(this.id)"><i class="fa fa-"></i>-</button></div>'+
// '</div>'+
'<div class="col-md-1" >'+
'<label><br><br></label>'+
'<button class="btn btn-primary" type="button" id="addbtns'+counters+'" onclick="addRows('+counters+')"><i class="fa fa-plus-square"></i></button></div>'+
'<div class="col-md-1" >'+
'<label><br><br></label>'+
'<button class="btn btn-danger remove remove_this" id="removebtns'+counters+'" onclick="removeRows(this.id)"><i class="fa fa-minus-square"></i></button></div>'+
'</div>'+
'</div>';
$('#newsdiv').append(div);
$('#hidecounters').val(counters);
$('#hideconstants').val(counterConstants);
if(counters > 1){
//alert("Next File choose + button click here");//this allows only 5 files;
//return false;
$('#addbtns').hide();
$("#removebtns").hide();
}
else {
$('#addemorebutton').hide();
}
}
}
function sfileswal()
{
var file1 = $('#images1'+counterConstants).val();
var file1 = $('#images1').val();
if (file1=='')
{
@ -8545,16 +8740,45 @@ function Copyfilenames(id)
}
}
function removeRows(input) {
// function removeRows(input) {
var number = input.replace(/[^0-9]+/ig,"");
// var number = input.replace(/[^0-9]+/ig,"");
if(counters>= 1){
// if(counters>= 1){
// counters --;
// $("#divid"+number).remove();
// $('#hidecounters').val(counters);
// }
// }
function removeRows(inputs) {
// alert(input);
var number = inputs.replace(/[^0-9]+/ig,"");
//alert(number);
if(counters >= 1){
counters --;
$("#divid"+number).remove();
$('#hidecounters').val(counters);
}
var rm_count = $("#hideconstants").val();
if(counters !=0){
if(number != rm_count){
// alert("if");
$("#addbtns"+counters).show();
$("#removebtns"+counters).show();
}else{
//alert('else');
$("#addbtns"+counters).show();
$("#removebtns"+counters).show();
}
}else{
$("#addemorebutton").show();
}
}
</script>

View File

@ -16,7 +16,9 @@ $IsActive = '';
$openstock='';
$date='';
$reorder='';
$total = 0;
$date_today = date("Y-m-d");
if(!empty($materialDetails))
{
foreach ($materialDetails as $MD)
@ -34,8 +36,9 @@ if(!empty($materialDetails))
$RMCode = $MD->RMCode;
$HSNcode = $MD->HSNCODE;
$openstock=$MD->stock;
$openstockdate=new DateTime($MD->stockdate);
$date = $openstockdate->format('d-m-Y');
//$openstockdate=new DateTime($MD->stockdate);
//$date = $openstockdate->format('d-m-Y');
$date=$MD->stockdate;
$reorder=$MD->reorder;
$chk = $MD->IsActive;
@ -57,7 +60,40 @@ if(!empty($currentstock))
$x = $openstock;
$y = $currentstock;
$total= $x + $y;
$todaydateyear = date('Y', strtotime($date_today));
$todaydatemonth = date('m', strtotime($date_today));
$todaydatedate = date('d', strtotime($date_today));
$openstockdateyear = date('Y', strtotime($date));
$parts = explode('-',$date);
$openstockdatemonth = $parts[1];
$openstockdatedate = $parts[2];
if($openstockdateyear==$todaydateyear)
{
if($openstockdatemonth<=03)
{
$total= $y==''?'0':$y;
}
else
{
$total= $x + $y;
}
}
else if($openstockdateyear<$todaydateyear)
{
//$total= $y;
$total= $y==''?'0':$y;
}
else if($openstockdateyear>$todaydateyear)
{
$total= $x + $y;
}
}

BIN
assets/dist/img/RI_logo_dark.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/dist/img/RI_logo_light.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB