diff --git a/application/controllers/inwardgateregister.php b/application/controllers/inwardgateregister.php index f0b68243..e39bcfe0 100644 --- a/application/controllers/inwardgateregister.php +++ b/application/controllers/inwardgateregister.php @@ -204,41 +204,210 @@ class inwardgateregister extends BaseController } - function uploadFile() - { + // function edituploadfile + // { - //echo "INSIDE UPLOAFD"; + // //echo "INSIDE UPLOAFD"; - //$this->load->library('upload') - $pathinfo = pathinfo($_FILES['myfile']['name']); - $config['upload_path'] = 'uploads/Igrfiles/'; - $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx'; - $config['file_name'] = $_FILES['myfile']['name']; - // $config['overwrite'] = true; + // //$this->load->library('upload') + // $pathinfo = pathinfo($_FILES['myfile']['name']); + // $config['upload_path'] = 'uploads/Igrfiles/'; + // $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx'; + // $config['file_name'] = $_FILES['myfile']['name']; + // // $config['overwrite'] = true; - //Load upload library and initialize configuration - $this->load->library('upload',$config); - $this->upload->initialize($config); + // //Load upload library and initialize configuration + // $this->load->library('upload',$config); + // $this->upload->initialize($config); - if($this->upload->do_upload('myfile')) - { - $uploadData = $this->upload->data(); - $uploadfilename = $uploadData['file_name']; - return $uploadfilename; + // if($this->upload->do_upload('myfile')) + // { + // $uploadData = $this->upload->data(); + // $uploadfilename = $uploadData['file_name']; + // return $uploadfilename; - } - else - { - $error = array('error' => $this->upload->display_errors()); - $uploadfilename = ''; - print_r($error); - return 0; - } + // } + // else + // { + // $error = array('error' => $this->upload->display_errors()); + // $uploadfilename = ''; + // print_r($error); + // return 0; + // } - } + // } + + + + /*------------inwardateregister multiple file upload service------jun 11----------------------------*/ + + function adfile() + { + $picture = ''; + if(!empty($_FILES['file']['name'])) + { + $config['upload_path'] = 'uploads/Igrfiles/'; + $config['allowed_types'] = 'docx|pdf|doc|png|jpg'; + $config['file_name'] = str_replace(" ","",$_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 + { + $picture = ''; + } + + return $picture ; + } + + + function addloadfile() + { + + $pono= $this->input->post('PONO'); + + $igr= $this->input->post('igr'); + + $new_file_name =$_FILES['file']['name']; + + $new_file_name = str_replace(" ","",$new_file_name); + + $files = $this->inwardgateregister_model->getfies($igr); + + +$fcount = 0; + + foreach ($files as $value) + { + + $lastfile = $value->FilePath; + + + if($lastfile == $new_file_name) + { + $fcount ++; + + + } +} + + + + if($fcount == 0) + { + + if(!empty($new_file_name)) + { $Picture = $this->adfile(); + $myfiles =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture); + // print_r($myfiles); + $upfiles = $this->inwardgateregister_model->fileupload($myfiles); + //print_r($upfiles); + } + } + + if( $upfiles > 0){ + echo "file updated successfully!"; + } + else + { + echo "File name already Exist"; + } + + } + +function add($pathname) + { + // echo "add files"; + // die(); + //echo $pathname; die(); + + $picture = ''; + if(!empty($_FILES[$pathname]['name'])) + { + + $config['upload_path'] = 'uploads/Igrfiles/'; + $config['allowed_types'] = '*'; + //$config['allowed_types'] = 'jpg|jpeg|png|gif'; + $config['file_name'] = str_replace(" ","",$_FILES[$pathname]['name']); + + + //Load upload library and initialize configuration + $this->load->library('upload',$config); + $this->upload->initialize($config); + if($this->upload->do_upload($pathname)) + { + // echo "uploadif"; + $uploadData = $this->upload->data(); + $picture = $uploadData['file_name']; + } + else + { + $error = array('error' => $this->upload->display_errors()); + $picture = ''; + } + } + else + { + // echo "else"; + $picture = ''; + } + + return $picture ; + } + + + + +function edituploadfile() + { + + + $bill= $this->input->post('param1'); + + $oldfile = $this->input->post('param2'); + + $newfile =$this->input->post('file'); + // $new_file_name =$_FILES['file']['name']; + $newfile = str_replace(" ","",$newfile); + + + + if(!empty($_FILES['file']['name'])) + { + + $Picture = $this->adfile(); + }else{ + $Picture = $oldfile ; + } + //echo $Picture;die; + $uploadfile = $this->inwardgateregister_model->updatefile($bill,$Picture,$oldfile); + + + // if($uploadfile > 0){ + echo "updated successfully!"; + // } + // else{ + // echo "updated successfully!"; + // } + } + function addNewigr() { // echo "add"; @@ -268,30 +437,127 @@ class inwardgateregister extends BaseController $IGRStatus = IGR_CREATED; $document = null; - $fs = 0; - if(!empty($_FILES['myfile']['name'])) - { - //echo "FILE AVAILABLE"; - $config['file_name'] = $_FILES['myfile']['name']; - $config['upload_path'] = 'uploads/Igrfiles/'; - $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx'; - $path = $config['upload_path']; - $filename = $config['file_name']; - $document = $path.$filename; - //echo $document; - $fs = $this->uploadFile(); - $document = $path.$fs; - //echo $document;die(); - } + // $fs = 0; + // // if(!empty($_FILES['myfile']['name'])) + // // { + // // //echo "FILE AVAILABLE"; + // // $config['file_name'] = $_FILES['myfile']['name']; + // // $config['upload_path'] = 'uploads/Igrfiles/'; + // // $config['allowed_types'] = 'png|jpg|jpeg|pdf|docx'; + // // $path = $config['upload_path']; + // // $filename = $config['file_name']; + // // $document = $path.$filename; + // // //echo $document; + // // $fs = $this->uploadFile(); + // // $document = $path.$fs; + // // //echo $document;die(); + // // } - //echo $RowCount; + // //echo $RowCount; $igr = array(); - $igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt,'file'=>$document); + $igr = array('PONO'=>$PONO,'VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanOrInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$MaterialRcvdDt,'CourierNo'=>$CourierNo,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt); //print_r($igr);die(); $igrM = $this->inwardgateregister_model->addigrM($igr); + + + +/*---------------------------------------JUN 11 change----------------------------------------------------*/ + $IGRNO = ''; + if(count($igrM)>0) + { + foreach ($igrM as $key ) + { + $IGRNO=$key->IGRNO; + } + } + + $constant = $this->input->post('hideconstants'); + + + + $arr = []; +$prefile =array(); + + for($i=1;$i<=$constant;$i++) + { + + + $pathname = 'browseFiles'.$i; + + if(!empty($_FILES[$pathname]['name'])) + { + + $files = str_replace(" ","",$_FILES[$pathname]['name']); + + $fcount = 0; + + foreach ($prefile as $value) + { + + + if($value == $files) + { + + + $fcount++; + } + + + + + } + + if($fcount == 0) + { + $Picture = $this->add($pathname); + //echo $Picture; + $arr[] = array($Picture); + + } + + $prefile[] = $files; + + } + } + +//print_r($arr); + if(!empty($arr)) + { + foreach($arr as $ma){ + + + $index = 0; + foreach($ma as $key=>$value){ + $index++; + if($index == 1){ + $filename = $value; + } + } + if(!empty($filename)) + { + + $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); + + + + $this->inwardgateregister_model->fileupload($myfile); + } + + + } + } + + + + + + + /*-------------------------------------------------------------------------------------------*/ + + $OGRStatus=IGR_CREATED; $check_OGRPO= $this->inwardgateregister_model->update_OGR($PONO,$OGRStatus); @@ -412,6 +678,13 @@ class inwardgateregister extends BaseController echo json_encode($data); } + function ViewIGRfile() + { + $IGRNO= $this->input->post('id'); + $data = $this->inwardgateregister_model->viewIGRFile($IGRNO); + echo json_encode($data); + + } function UpdateIGR() diff --git a/application/controllers/report.php b/application/controllers/report.php index 827e67aa..39fc39c2 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -522,6 +522,22 @@ class report extends BaseController echo json_encode($data); + } + + function Viewnormaligrfiles() + { + + $PO= $this->input->post('id'); + + $PONO= substr($PO,5); + //echo $PONO; die; + + $data = $this->dahsboard_Model->getfiles($PONO); + + // print_r( $data);die; + + echo json_encode($data); + } public function ipurchase() { @@ -537,7 +553,7 @@ class report extends BaseController $m=$this->input->post('month'); $frm = $this->input->post('from_date'); $t = $this->input->post('to_date'); - //print_r($prod); + //print_r($prod); $data['material']=$this->dahsboard_Model->material_name(); $data['cust']=$this->dahsboard_Model->customer_name(); // $data['finyear']=$this->dahsboard_Model->report_finyear();/* finyear based on po date */ diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 1b3cc4ef..a7c18359 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -36,6 +36,19 @@ function getfile($PONO) } +function getfiles($PONO) + { + //$this->db->distinct(); + $this->db->select('*'); + $this->db->from('T_Inwardgateregister_fileupload'); + $this->db->where('PONO',$PONO); + + + $query = $this->db->get(); + // print_r( $this->db->last_query()); + $result = $query->result_array(); + return $result; + } function totloan() { @@ -1483,7 +1496,8 @@ ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0))) - round(ifnull(if(POType = 'REVENUE', sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, - im.file as ifile,pb.FilePath as file + im.file as ifile,pb.FilePath as file ,infiles.FilePath as Infiles + from T_IGR_Master im left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode @@ -1492,7 +1506,8 @@ left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo -left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO +left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO +left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO where pm.Status != 'ST030' "; if ($cname!= ''){ @@ -1612,7 +1627,10 @@ $sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo"; if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), ifnull((id.QuantityAsPerInvoice * pl.Rate),0))) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity), - (id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) - round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, im.file as ifile,pb.FilePath as file from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO + (id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) - round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, im.file as ifile,pb.FilePath as file,infiles.FilePath as Infiles + + from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO + left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO where pm.Status != 'ST030' "; @@ -1711,15 +1729,16 @@ if ($cname!= ''){ } **/ - $sql="select pm.Status AS status,sd.SupplierID AS sid,im.file AS ifile,pb.FilePath AS file,im.IGRNO AS igrn,pm.POType AS potype,im.PONO AS pono,date_format(im.CreatedDate,'%d-%m-%Y') AS created_date,time_format(im.CreatedDate,'%l:%i %p') AS created_time,mm.MaterialName AS material_name, + $sql="select pm.Status AS status,sd.SupplierID AS sid,im.file AS ifile,pb.FilePath AS file,infiles.FilePath as Infiles,im.IGRNO AS igrn,pm.POType AS potype,im.PONO AS pono,date_format(im.CreatedDate,'%d-%m-%Y') AS created_date,time_format(im.CreatedDate,'%l:%i %p') AS created_time,mm.MaterialName AS material_name, date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,sd.SupplierName AS supplier_name,sum(id.QuantityAsPerInvoice) AS quantity, round(((((((if((pm.POType = 'IMPORT'),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),if(((pm.POType = 'CAPITAL') and (pm.CapitalRange = 0)),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),ifnull(sum((id.QuantityAsPerInvoice * pl.Rate)),0))) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterSGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_SGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterCGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_CGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterIGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_IGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterFreightValue) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.AfterFreightValue) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterPackagingValue) / pl.Quantity)),0),0),2)) - round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterDiscount) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.Afterdiscountval) / pl.Quantity))),0),2)),2) AS total -from ((((((((T_IGR_Master im join T_PurchaseOrder_LineItem pl on((pl.PONO = im.PONO))) join T_IGR_Details id on(((id.IGRNO = im.IGRNO) and (id.MaterialCode = pl.MaterialCode)))) join T_PurchaseOrder_Master pm on((pm.PONO = pl.PONO))) +from (((((((((T_IGR_Master im join T_PurchaseOrder_LineItem pl on((pl.PONO = im.PONO))) join T_IGR_Details id on(((id.IGRNO = im.IGRNO) and (id.MaterialCode = pl.MaterialCode)))) join T_PurchaseOrder_Master pm on((pm.PONO = pl.PONO))) left join T_MaterialMaster mm on((mm.MaterialCode = pl.MaterialCode))) left join T_SupplierDetailsN sd on((sd.SupplierID = pm.SupplierID))) left join T_Service_Tax st on((st.LineItemNo = pl.LineItemNo))) left join T_Revenue_Tax rt on((rt.LineItemNo = pl.LineItemNo))) left join T_PurchaseOrder_BillUpload pb on((pb.PONO = im.PONO))) +left join T_Inwardgateregister_fileupload infiles on ((infiles.IGRNO = im.IGRNO))) where (pm.Status <> 'ST030') "; diff --git a/application/models/inwardgateregister_model.php b/application/models/inwardgateregister_model.php index 616349f6..a5fbd806 100755 --- a/application/models/inwardgateregister_model.php +++ b/application/models/inwardgateregister_model.php @@ -18,6 +18,51 @@ class inwardgateregister_model extends CI_Model */ + + /*--------------------------JUN 11Change ----------------------------------*/ + + +function updatefile($bill,$Picture,$oldfile) +{ + + // if($oldfile != ''){ + // //unlink("uploads/BillFiles/".$oldfile);//this deletes the file on particular folder too + // } + +$this->db->set('FilePath', $Picture); //value that used to update column +$this->db->where('BillNo', $bill); //which row want to upgrade +$this->db->update('T_Inwardgateregister_fileupload'); +$afftectedRows = $this->db->affected_rows(); +return $afftectedRows; + +} + + + function getfies($igr) + { + + $this->db->select('*'); + + + $this->db->from('T_Inwardgateregister_fileupload'); + + $this->db->where('IGRNO',$igr); + + $query = $this->db->get(); + + return $query->result(); + } + + function fileupload($myfiles) + { + + + $this->db->insert('T_Inwardgateregister_fileupload',$myfiles); + $myfile=$this->db->affected_rows(); + return $myfile; + } + + /*------------------------------------------------------------*/ function addMaterialStockHistory($MaterialstockHistoryadd) { @@ -41,16 +86,48 @@ class inwardgateregister_model extends CI_Model } /*------------------------------------------------------------*/ - function igrListing() + // function igrListing() + // { + // $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file'); + // $this->db->from('T_IGR_Master igr'); + // $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); + // $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); + // $this->db->order_by('igr.CreatedDate','desc'); + // $query = $this->db->get(); + // $result = $query->result(); + // return $result; + // } + function igrListing() { - $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,igr.file'); + $this->db->select('igr.*,PO.DeliveryDate,sup.SupplierName,fileup.FilePath,igr.file'); $this->db->from('T_IGR_Master igr'); $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); + $this->db->join('T_Inwardgateregister_fileupload fileup',' igr.IGRNO = fileup.IGRNO','left'); $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); - $this->db->order_by('igr.CreatedDate','desc'); + $this->db->group_by('igr.IGRNO','desc'); $query = $this->db->get(); $result = $query->result(); return $result; + } + + + + function viewIGRFile($IGRNO) + { + $this->db->distinct(); + $this->db->select('*'); //BillNo,IGRNO,FilePath,PONO + $this->db->from('T_Inwardgateregister_fileupload'); + $this->db->where('IGRNO',$IGRNO); + + $query = $this->db->get(); + + $result = $query->result(); + // print_r($result);die; + //print_r($this->db->last_query()); + return $result; + + + } function getpurchaseorder() diff --git a/application/views/Report_attach_inward.php b/application/views/Report_attach_inward.php index 6be090f1..70912441 100755 --- a/application/views/Report_attach_inward.php +++ b/application/views/Report_attach_inward.php @@ -215,7 +215,7 @@
| PO No | IGR Created Date | @@ -247,6 +247,8 @@ $tot_tot= $tot_tot + round($rel->total,2); echo $rel->total; ?> + +
ifile)) { ?>
- Infiles)){ ?>
+
+
@@ -307,9 +311,54 @@
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/application/views/Report_purchase_inward.php b/application/views/Report_purchase_inward.php
index 9c65502d..22c4c564 100755
--- a/application/views/Report_purchase_inward.php
+++ b/application/views/Report_purchase_inward.php
@@ -360,11 +360,14 @@ table.dataTable thead > tr > td.sorting {
file)){ ?>
- ifile)) { ?>
+ ifile )) { ?>
-
+ Infiles)){ ?>
+
+
@@ -556,6 +559,37 @@ $('.splpofile').click(function() {
});
});//onclick function closed
+
+
+$('.IGRfile').click(function() {
+ var id = $(this).attr('id');
+ $("#Fileshow").modal("show");
+ $.ajax({
+ data:{id:id},
+ type:"POST",
+ url:"report/Viewnormaligrfiles",
+ success: function(data){
+
+ var trHTML = '';
+
+ $.each($.parseJSON(data), function (i, item) {
+
+ i=i+1;
+ trHTML += '| ' + i + ' | ' +
+ '' + item.BillNo+ ' | ' +
+ '' + item.PONO+ ' | ' +
+ 'uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +' | ' +
+ ' | ID?> | -indate?> | + +indate); + echo $date->format('d-m-Y'); ?> | + +invoiceno?> | diff --git a/application/views/enquirylist.php b/application/views/enquirylist.php index a50e83d1..1e7211a5 100644 --- a/application/views/enquirylist.php +++ b/application/views/enquirylist.php @@ -21,7 +21,7 @@
|---|
| # | +Date | Customer Name | Contact Person | @@ -57,7 +57,7 @@ ?>
|---|---|---|---|
| + | Created_Date);
$Created_Date = $Pdt->format('d-m-Y');
@@ -105,7 +105,7 @@
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":1, "type":"date-eu"}],
- "aaSorting": [[ 1, "desc" ]],
+ "aaSorting": [[ 0, "desc" ]],
"info": true,
"autoWidth": false
});
diff --git a/application/views/inwardgateregister.php b/application/views/inwardgateregister.php
index c75dfa24..99e7fe69 100755
--- a/application/views/inwardgateregister.php
+++ b/application/views/inwardgateregister.php
@@ -66,15 +66,13 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
-
+ |