podate to inward in cashbook
This commit is contained in:
parent
e9290d81a1
commit
2f9b1f1149
18
application/controllers/purchaseorder.php
Executable file → Normal file
18
application/controllers/purchaseorder.php
Executable file → Normal file
@ -4275,8 +4275,8 @@ function addloadfile()
|
|||||||
{
|
{
|
||||||
|
|
||||||
$pono= $this->input->post('PONO');
|
$pono= $this->input->post('PONO');
|
||||||
$new_file_name =$_FILES['param1']['name'];
|
$new_file_name =$_FILES['file']['name'];
|
||||||
//echo $new_file_name;
|
//echo $new_file_name;die;
|
||||||
if(!empty($new_file_name))
|
if(!empty($new_file_name))
|
||||||
{
|
{
|
||||||
$Picture = $this->adfile();
|
$Picture = $this->adfile();
|
||||||
@ -4303,18 +4303,26 @@ $filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
|||||||
function adfile()
|
function adfile()
|
||||||
{
|
{
|
||||||
$picture = '';
|
$picture = '';
|
||||||
if(!empty($_FILES['param1']['name']))
|
if(!empty($_FILES['file']['name']))
|
||||||
{
|
{
|
||||||
$config['upload_path'] = 'uploads/BillFiles/';
|
$config['upload_path'] = 'uploads/BillFiles/';
|
||||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||||
$config['file_name'] = $_FILES['param1']['name'];
|
$config['file_name'] = $_FILES['file']['name'];
|
||||||
// print_r($config) ;
|
// print_r($config);die;
|
||||||
//Load upload library and initialize configuration
|
//Load upload library and initialize configuration
|
||||||
$this->load->library('upload',$config);
|
$this->load->library('upload',$config);
|
||||||
$this->upload->initialize($config);
|
$this->upload->initialize($config);
|
||||||
|
|
||||||
|
if($this->upload->do_upload('file'))
|
||||||
|
{
|
||||||
$uploadData = $this->upload->data();
|
$uploadData = $this->upload->data();
|
||||||
$picture = $uploadData['file_name'];
|
$picture = $uploadData['file_name'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error = array('error' => $this->upload->display_errors());
|
||||||
|
$picture = '';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -295,12 +295,12 @@ $query = $this->db->query($sql);
|
|||||||
//die();
|
//die();
|
||||||
//$Supplierid;
|
//$Supplierid;
|
||||||
$this->db->distinct();
|
$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.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');
|
PUADV.AdvanceAmount');
|
||||||
$this->db->from ('T_PurchaseOrder_Master POM');
|
$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_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID');
|
||||||
|
|
||||||
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
|
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
|
||||||
|
|||||||
@ -150,7 +150,7 @@ foreach($financialyear as $item)
|
|||||||
<tr>
|
<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 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="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="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>
|
<td align="left" id="tov<?php echo $i ?>" ><span><?php echo $t->TotalOrderValue?></span></td>
|
||||||
|
|||||||
@ -5905,20 +5905,20 @@ function splpoupdate(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileupload()
|
function fileupload(counter)
|
||||||
{
|
{
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
var file = $("#images").prop('files')[0];
|
var file = $("#images"+counter).prop('files')[0];
|
||||||
//console.log(file);
|
// console.log(file);
|
||||||
var param1 =$('#images').prop('files')[0];
|
|
||||||
|
|
||||||
var PONO =$('#txtPONO').val();
|
var PONO =$('#txtPONO').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
formData.append('param1',param1);
|
formData.append('file',file);
|
||||||
formData.append('PONO',PONO);
|
formData.append('PONO',PONO);
|
||||||
|
formData.append('count',counter);
|
||||||
|
|
||||||
$('.content').loader('show');
|
$('.content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -5976,13 +5976,14 @@ $("#addmorebutton").click(function(){
|
|||||||
// }
|
// }
|
||||||
// else{
|
// else{
|
||||||
|
|
||||||
// counter++;
|
counter++;
|
||||||
// counterConstant++;
|
|
||||||
|
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = "divid";
|
div.id = "divid";
|
||||||
div.className="row";
|
div.className="row";
|
||||||
|
//alert(counter);
|
||||||
div.innerHTML='<div class="col-md-12">'+
|
div.innerHTML='<div class="col-md-12">'+
|
||||||
// '<div class="col-md-3">'+
|
// '<div class="col-md-3">'+
|
||||||
// '<label>File Name</label>'+
|
// '<label>File Name</label>'+
|
||||||
@ -5990,7 +5991,7 @@ div.innerHTML='<div class="col-md-12">'+
|
|||||||
// '</div>'+
|
// '</div>'+
|
||||||
'<div class="col-md-3">'+
|
'<div class="col-md-3">'+
|
||||||
'<label><br></label>'+
|
'<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>'+
|
||||||
// '<div class="col-md-3">'
|
// '<div class="col-md-3">'
|
||||||
// '<label><br><br></label>'+
|
// '<label><br><br></label>'+
|
||||||
@ -6020,10 +6021,10 @@ var file = $('#images').val();
|
|||||||
if (file=='')
|
if (file=='')
|
||||||
{
|
{
|
||||||
alert('File not found');
|
alert('File not found');
|
||||||
fileupload();
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
fileupload();
|
fileupload(counter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user