podate to inward in cashbook

This commit is contained in:
gandhimathi 2018-06-04 19:14:21 +05:30
parent e9290d81a1
commit 2f9b1f1149
4 changed files with 29 additions and 20 deletions

18
application/controllers/purchaseorder.php Executable file → Normal file
View File

@ -4275,8 +4275,8 @@ function addloadfile()
{
$pono= $this->input->post('PONO');
$new_file_name =$_FILES['param1']['name'];
//echo $new_file_name;
$new_file_name =$_FILES['file']['name'];
//echo $new_file_name;die;
if(!empty($new_file_name))
{
$Picture = $this->adfile();
@ -4303,18 +4303,26 @@ $filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
function adfile()
{
$picture = '';
if(!empty($_FILES['param1']['name']))
if(!empty($_FILES['file']['name']))
{
$config['upload_path'] = 'uploads/BillFiles/';
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
$config['file_name'] = $_FILES['param1']['name'];
// print_r($config) ;
$config['file_name'] = $_FILES['file']['name'];
// print_r($config);die;
//Load upload library and initialize configuration
$this->load->library('upload',$config);
$this->upload->initialize($config);
if($this->upload->do_upload('file'))
{
$uploadData = $this->upload->data();
$picture = $uploadData['file_name'];
}
else
{
$error = array('error' => $this->upload->display_errors());
$picture = '';
}
}
else

View File

@ -295,12 +295,12 @@ $query = $this->db->query($sql);
//die();
//$Supplierid;
$this->db->distinct();
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,igr.CreatedDate,
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status,
POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status,
PUADV.AdvanceAmount');
$this->db->from ('T_PurchaseOrder_Master POM');
$this->db->join('T_IGR_Master igr','igr.PONO = POM.PONO');
$this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID');
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');

View File

@ -150,7 +150,7 @@ foreach($financialyear as $item)
<tr>
<td data-name="sell"><input type="checkbox" class="checkboxcheckbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($t->PODate),'d-m-Y');?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($t->CreatedDate),'d-m-Y');?></span></td>
<td align="left" id="pono<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>
<td align="left" id="sn<?php echo $i ?>" ><span><?php echo $t->SupplierName?></span></td>
<td align="left" id="tov<?php echo $i ?>" ><span><?php echo $t->TotalOrderValue?></span></td>

View File

@ -5905,20 +5905,20 @@ function splpoupdate(){
}
function fileupload()
function fileupload(counter)
{
var formData = new FormData();
var file = $("#images").prop('files')[0];
//console.log(file);
var param1 =$('#images').prop('files')[0];
var file = $("#images"+counter).prop('files')[0];
// console.log(file);
var PONO =$('#txtPONO').val();
formData.append('param1',param1);
formData.append('file',file);
formData.append('PONO',PONO);
formData.append('count',counter);
$('.content').loader('show');
$.ajax({
@ -5976,13 +5976,14 @@ $("#addmorebutton").click(function(){
// }
// else{
// counter++;
// counterConstant++;
counter++;
var div = document.createElement('div');
div.id = "divid";
div.className="row";
//alert(counter);
div.innerHTML='<div class="col-md-12">'+
// '<div class="col-md-3">'+
// '<label>File Name</label>'+
@ -5990,7 +5991,7 @@ div.innerHTML='<div class="col-md-12">'+
// '</div>'+
'<div class="col-md-3">'+
'<label><br></label>'+
'<input type="file" name="browseFiles" id="images" onchange="Copyfilename(this.name); "><br>'+
'<input type="file" name="browseFiles" id="images'+counter+'" onchange="Copyfilename(this.name); "><br>'+
'</div>'+
// '<div class="col-md-3">'
// '<label><br><br></label>'+
@ -6020,10 +6021,10 @@ var file = $('#images').val();
if (file=='')
{
alert('File not found');
fileupload();
}
else{
fileupload();
fileupload(counter);
}
}