Bank Reload : ps
This commit is contained in:
parent
a080698f8e
commit
2cab15d825
@ -48,13 +48,18 @@
|
||||
$active_group = 'default';
|
||||
$active_record = TRUE;
|
||||
|
||||
$db['default']['hostname'] = '35.213.153.5';
|
||||
$db['default']['hostname'] = 'localhost';
|
||||
$db['default']['username'] = 'root';
|
||||
$db['default']['password'] = '';
|
||||
$db['default']['database'] = 'kasiram9_SiddharthIndustries';
|
||||
|
||||
// $db['default']['hostname'] = '35.213.153.5';
|
||||
// $db['default']['username'] = 'kasiram9_prod';
|
||||
// $db['default']['password'] = 'sia!1234';
|
||||
// $db['default']['database'] = 'kasiram9_SIAPROD';
|
||||
$db['default']['username'] = 'kasiram9_Siddh';
|
||||
$db['default']['password'] = 'sidh@1234';
|
||||
$db['default']['database'] = 'kasiram9_SIADEV';
|
||||
// $db['default']['username'] = 'kasiram9_Siddh';
|
||||
// $db['default']['password'] = 'sidh@1234';
|
||||
// $db['default']['database'] = 'kasiram9_SIADEV';
|
||||
//$db['default']['database'] = 'kasiram9_SiddharthIndustries';
|
||||
//$db['default']['database'] = 'kasiram9_SIAPROD';
|
||||
$db['default']['dbdriver'] = 'mysqli';
|
||||
|
||||
@ -225,16 +225,6 @@ class cashbook extends BaseController
|
||||
$data['clearedcreditbalance'] = $this->cashbook_model->clearedcreditbalance();
|
||||
$this->loadViews("bankingfile", $this->global, $data , NULL);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
function bankfileupload(){
|
||||
//document => default NULL
|
||||
$document = NULL;
|
||||
// filename => default NUll
|
||||
$filename = NULL;
|
||||
$openingbalance=0;
|
||||
$closingbalance=0;
|
||||
$created_by = $this->session->userdata('userId');
|
||||
=======
|
||||
function bankfileupload()
|
||||
{
|
||||
//document => default NULL
|
||||
@ -283,96 +273,13 @@ class cashbook extends BaseController
|
||||
if($x == 21){
|
||||
|
||||
$openingbalance=$sheet->getCell('H'.$x)->getValue();
|
||||
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
|
||||
|
||||
if(!empty($_FILES['userfile']['name']))
|
||||
{
|
||||
|
||||
// xls File destination folder Given Below.
|
||||
$config['file_name'] = $_FILES['userfile']['name']; // This Also FileName with format.
|
||||
$config['upload_path'] = 'uploads/banking/';
|
||||
$config['allowed_types'] = '*';
|
||||
$config['overwrite'] = true;
|
||||
$path = $config['upload_path'];
|
||||
|
||||
//Load upload library and initialize configuration
|
||||
$this->load->library('upload',$config);
|
||||
$this->upload->initialize($config);
|
||||
}
|
||||
if($x == $highestRow4){
|
||||
|
||||
if($this->upload->do_upload('userfile'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
// print_r($uploadData);
|
||||
$filename = $uploadData['file_name'];
|
||||
$full_path = $uploadData['full_path'];
|
||||
$pathinfo = pathinfo($path.$filename);
|
||||
$document = $pathinfo['dirname'].'/'.$pathinfo['basename'];
|
||||
$bank = $this->input->post('bankbranchname');
|
||||
//echo "file upload success";
|
||||
$fileupload= array('Bankname'=>$bank,'document'=>$document,'createdby'=>$created_by);
|
||||
// print_r($fileupload);die();
|
||||
$fileupload_response = $this->cashbook_model->bankfile($fileupload);// its return affected rows.
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename = "";
|
||||
$document = "";
|
||||
$pathinfo = array();
|
||||
$message = $this->upload->display_errors();
|
||||
echo "<script>alert(' The filetype you are attempting to upload is not allowed !');window.location.href='Bankingview';</script>";
|
||||
}
|
||||
if($fileupload_response == 1 ){
|
||||
require_once APPPATH.'third_party/Classes/PHPExcel.php';
|
||||
$reader= PHPExcel_IOFactory::createReaderForFile($full_path);
|
||||
$excel_Obj = $reader->load($full_path);
|
||||
// $work_sheet = $excel_Obj->getActiveSheet()->toArray(null, true,true,true);
|
||||
$work_sheet = $excel_Obj->getActiveSheet();
|
||||
// echo "sheet data in array format";
|
||||
// print_r($work_sheet);
|
||||
// die();
|
||||
$highestRow = $work_sheet->getHighestRow();
|
||||
$highestColumn = $work_sheet->getHighestColumn();
|
||||
$highestRow4 = $highestRow-4;
|
||||
// echo "G ".$highestRow4;
|
||||
$closingbalance=$sheet->getCell('H'.$highestRow4)->getValue();
|
||||
|
||||
for($x=21;$x<=$highestRow4;$x++){
|
||||
// echo "G ".$x;
|
||||
if($x == 21){ $openingbalance=$work_sheet->getCell('H'.$x)->getValue();}
|
||||
if($x == $highestRow4){ $closingbalance=$work_sheet->getCell('H'.$highestRow4)->getValue(); }
|
||||
$t=$work_sheet->getCell('A'.$x)->getValue();
|
||||
$date1= str_replace('/','-',$t);
|
||||
$reportdate = (empty($date1)) ? NULL : date("Y-m-d ", strtotime($date1));
|
||||
$s = $work_sheet->getCell('B'.$x)->getValue();
|
||||
$date2= str_replace('/','-',$s);
|
||||
$valuedate = (empty($date2)) ? NULL : date('Y-m-d',strtotime($date2));
|
||||
$cod = $work_sheet->getCell('C'.$x)->getValue();
|
||||
$narration = $work_sheet->getCell('D'.$x)->getValue();
|
||||
$chequeNo = $work_sheet->getCell('E'.$x)->getValue();
|
||||
$debit = $work_sheet->getCell('F'.$x)->getValue();
|
||||
$credit = $work_sheet->getCell('G'.$x)->getValue();
|
||||
$balance = $work_sheet->getCell('H'.$x)->getValue();
|
||||
$status = ($debit==0) ? '' : 'OPEN';
|
||||
$cstatus = ($credit==0) ? '' : 'OPEN';
|
||||
|
||||
// $IsActive=0;
|
||||
$filedataupload= array('reportdate'=>$reportdate,'valuedate'=>$valuedate,'chequeNo'=>$chequeNo,'Narration'=>$narration,'Cod'=> $cod,'Debit'=>$debit,'Credit'=>$credit,'cbalancetocleared'=>$credit,'Balance'=>$balance,'Bankname'=>$bank,'Status'=>$status,'cstatus'=>$cstatus);
|
||||
$filedata_response = $this->cashbook_model->bankfiledata($filedataupload);
|
||||
// echo "response ".$res;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
$balance= array('filename'=>$filename,'created_by'=>$created_by,'openingbalance'=>$openingbalance,'closingbalance'=>$closingbalance);
|
||||
$balancedata_reponse = $this->cashbook_model->balance($balance);
|
||||
echo "<script>alert('file upload successfully!');window.location.href='Bankingstatement';</script>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>alert('file not upload.retry again!');window.location.href='Bankingview';</script>";
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo "<script>alert('there is no file.retry again!');window.location.href='Bankingview';</script>";
|
||||
}
|
||||
=======
|
||||
|
||||
|
||||
|
||||
@ -450,29 +357,9 @@ class cashbook extends BaseController
|
||||
{
|
||||
echo "<script>alert('Saved unsuccessfully!');window.location.href='Bankingstatement';</script>";
|
||||
}
|
||||
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
|
||||
}
|
||||
function excelLibExcerise(){
|
||||
echo "i am in excelLibExcerise Fns";
|
||||
echo "<br>";
|
||||
$path=APPPATH.'third_party/May-21-IB.xls';
|
||||
echo "File Path : ".$path;
|
||||
echo "<br>";
|
||||
echo "XL Lib Path : ".APPPATH.'third_party/Classes/PHPExcel.php';
|
||||
echo "<br>";
|
||||
require_once APPPATH.'third_party/Classes/PHPExcel.php';
|
||||
$reader= PHPExcel_IOFactory::createReaderForFile($path);
|
||||
echo "<br>";
|
||||
$excel_Obj = $reader->load($path);
|
||||
// $sheet = $excel_Obj->getActiveSheet()->toArray(null, true,true,true);
|
||||
$sheet = $excel_Obj->getActiveSheet();
|
||||
$highestRow = $sheet->getHighestRow();
|
||||
$highestColumn = $sheet->getHighestColumn();
|
||||
$highestRow4=$highestRow-4;
|
||||
}
|
||||
|
||||
print_r($sheet);
|
||||
}
|
||||
|
||||
function addIncomeExpense()
|
||||
{
|
||||
|
||||
@ -712,8 +599,6 @@ class cashbook extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
function uploadFile1()
|
||||
{
|
||||
|
||||
@ -749,7 +634,6 @@ class cashbook extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
>>>>>>> 0d28edf40121fbec168662126246805f8d7bb939
|
||||
|
||||
function viewIE()
|
||||
{
|
||||
@ -2467,7 +2351,4 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
}
|
||||
|
||||
}
|
||||
function function_alert($msg) {
|
||||
echo "<script type='text/javascript'>alert('$msg');</script>";
|
||||
}
|
||||
?>
|
||||
@ -200,9 +200,11 @@ class quality extends BaseController
|
||||
$type = $this->input->post('type');
|
||||
}
|
||||
$reportid = $this->input->post('rid');
|
||||
|
||||
$data['reportdata'] = $this->quality_model->getIndividualReportData($reportid);
|
||||
// print_r($data['reportdata']);die();
|
||||
if($type != 'INWARD' or $type == ''){
|
||||
$data['reportdata'] = $this->quality_model->getIndividualReportData($reportid);
|
||||
|
||||
$filename = 'PRE DESPATCH INSPECTION REPORT'.$reportid;
|
||||
$html = $this->load->View("viewindreportpdf",$data,true);
|
||||
}
|
||||
@ -212,6 +214,8 @@ class quality extends BaseController
|
||||
$filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid;
|
||||
$html = $this->load->View("viewindinwardreportpdf",$data,true);
|
||||
}
|
||||
// echo $html;
|
||||
// die();
|
||||
ob_end_clean();
|
||||
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
@ -243,12 +247,9 @@ class quality extends BaseController
|
||||
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
|
||||
function saveTestReportData()
|
||||
function saveTestReportData()
|
||||
{
|
||||
|
||||
|
||||
date_default_timezone_get('Asia/Kolkata');
|
||||
$testjson = $this->input->post('param1');
|
||||
$loijson = $this->input->post('param2');
|
||||
|
||||
@ -348,11 +348,11 @@ class Quality_model extends CI_Model
|
||||
|
||||
$this->db->select('T_Test_Report_Master.testreport_id,ip_invoices.invoice_date_created,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,T_Test_Report_Master.chartdata,ip_clients.client_id,ip_clients.client_name,invoice_custom_fieldvalue,ip_products.product_id,ip_products.product_name,ip_products.product_description,T_Employee_Details.FirstName,T_Employee_Details.LastName,ip_invoice_items.item_quantity,T_Test_Report_Master.approvedby');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number','left');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id','left');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id','left');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id','left');
|
||||
$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62','left');
|
||||
$this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
|
||||
//$this->db->join('T_Employee_Details','T_Test_Report_Master.EmpID=T_Employee_Details.EmpID');
|
||||
@ -443,10 +443,10 @@ class Quality_model extends CI_Model
|
||||
{
|
||||
$this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,T_Test_Report_Master.document,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
$this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number','left');
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id','left');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id','left');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id','left');
|
||||
//$this->db->where('T_Test_Report_Master.invoiceid','!=0');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user