From a2dc2b63ffa5a58b1da88241f10b6cf6f0098214 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 19 Dec 2017 19:05:21 +0530 Subject: [PATCH] reports and ui changes --- application/controllers/monthlypay.php | 76 +- application/controllers/payslip.php | 5 +- application/controllers/quality.php | 15 +- application/models/monthlypay_model.php | 27 +- application/models/supplier_model.php | 24 +- application/models/user_model.php | 14 +- application/views/Report_consolidate.php | 2 +- application/views/Report_purchase.php | 2 +- application/views/bankreportprint.php | 18 +- .../views/includes/bankreport_footer.php | 4 + application/views/includes/header.php | 21 +- application/views/includes/pdfheader.php | 5 +- application/views/permission.php | 1406 +++++++++++++++++ application/views/permissionlist.php | 104 ++ application/views/permissionpdf.php | 164 ++ application/views/serviceporeport.php | 2 +- application/views/supplierListing.php | 42 +- application/views/viewmrirforbilling.php | 2 +- 18 files changed, 1828 insertions(+), 105 deletions(-) create mode 100644 application/views/includes/bankreport_footer.php create mode 100644 application/views/permission.php create mode 100644 application/views/permissionlist.php create mode 100644 application/views/permissionpdf.php diff --git a/application/controllers/monthlypay.php b/application/controllers/monthlypay.php index 57d8155a..2f26718a 100755 --- a/application/controllers/monthlypay.php +++ b/application/controllers/monthlypay.php @@ -388,27 +388,40 @@ class monthlypay extends BaseController /** * To store new permission details into DB. **/ - function addper() - { - $EmpID = $this->input->post('emp'); - $Date =$this->input->post('date'); - $From = $this->input->post('timepicker1'); - $To = $this->input->post('timepicker2'); - $Shift = $this->input->post('shift'); - $Permission = $this->input->post('Pretime'); - $Reason= $this->input->post('Reason'); - $Createdby = $this->session->userdata('userId'); + function addper() + { + $EmpID = $this->input->post('emp'); + $Date =$this->input->post('date'); + $CUR = date('Y-m-d',strtotime($Date)); + + $From = $this->input->post('timepicker1'); + $To = $this->input->post('timepicker2'); + $Shift = $this->input->post('shift'); + $Permission = $this->input->post('Pretime'); + $Reason= $this->input->post('Reason'); + $Createdby = $this->session->userdata('userId'); + + + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $Createdtime = $dt->format('Y-m-d H:i:s'); + if(!empty($EmpID)){ + $Permissiondata = array('EmpID'=>$EmpID,'Date'=>$CUR,'From'=>$From,'To'=>$To,'Shift'=>$Shift,'Permission'=>$Permission,'Reason'=>$Reason,'Createby'=>$Createdby,'Createdtime'=>$Createdtime); + } + $result = $this->monthlypay_model->addper($Permissiondata); + + if(!empty($result)){ + echo ""; - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); - $Createdtime = $dt->format('Y-m-d H:i:s'); - - $Permissiondata = array('EmpID'=>$EmpID,'Date'=>$Date,'From'=>$From,'To'=>$To,'Shift'=>$Shift,'Permission'=>$Permission,'Reason'=>$Reason,'Createby'=>$Createdby,'Createdtime'=>$Createdtime); - - $result = $this->monthlypay_model->addper($Permissiondata); - redirect('monthlypay/permissionlist'); - - } + } + else{ + echo ""; + } + } /** * To get permission slip details for listing */ @@ -424,21 +437,22 @@ class monthlypay extends BaseController */ function permissionpdf($SNO){ - $data['per'] = $this->monthlypay_model->pdf($SNO); - - $this->load->view($this->config->item('admin_folder') .'/permissionpdf',$data); + $data['per'] = $this->monthlypay_model->pdf($SNO); + + $this->load->view($this->config->item('admin_folder') .'/permissionpdf',$data); - $mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6); - $mpdf->SetDisplayMode('fullpage'); - $mpdf->SetHTMLHeader($HtmlHeading); + $mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->SetHTMLHeader($HtmlHeading); - $html = $this->load->view('permissionpdf',$data,true); + $html = $this->load->view('permissionpdf',$data,true); - $mpdf->SetDisplayMode('fullpage'); - $mpdf->setAutoTopMargin = 'stretch'; - $mpdf->setAutoBottomMargin = 'stretch'; - $mpdf->WriteHTML($html); - $mpdf->Output("Permission".$data.'.pdf','I',$php); + $mpdf->SetDisplayMode('fullpage'); + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + $mpdf->Output("Permission".$data.'.pdf','I',$php); + } diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index fb93c0a1..140e3279 100755 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -337,11 +337,12 @@ class payslip extends BaseController if(empty($excel)){ - $mpdf=new mPDF('utf-8','A4-P',9, 12,12, 10, 82, 38, 4, 6); + $mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6); + $HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true); $mpdf->SetDisplayMode('fullpage'); $mpdf->SetHTMLHeader($HtmlHeading); $mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}"); - $mpdf->setFooter("Page {PAGENO} of {nb}"); + // $mpdf->setFooter("Page {PAGENO} of {nb}"); $mpdf->list_indent_first_level = 1; $mpdf->setAutoTopMargin = 'stretch'; $mpdf->setAutoBottomMargin = 'stretch'; diff --git a/application/controllers/quality.php b/application/controllers/quality.php index 53c4381e..ca786565 100644 --- a/application/controllers/quality.php +++ b/application/controllers/quality.php @@ -36,14 +36,25 @@ class quality extends BaseController } /** - * To load the report list + * For load the report list */ public function reportList() { $data['records'] = $this->quality_model->getTestMasterforList(); $this->global['pageTitle'] = 'Resico : Prodcut Report List '; $this->loadViews("reportmasterlist", $this->global, $data , NULL); - } + } + + /** + * For quality Inward Report list + */ + public function reportListInward() + { + $data['records'] = $this->quality_model->getTestMasterforListInward(); + + $this->global['pageTitle'] = 'Resico : Report List Inward'; + $this->loadViews("reportmasterlist_inward", $this->global, $data , NULL); + } /** * To add new Specifications diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index f4b2f8cf..f2bbfcc6 100755 --- a/application/models/monthlypay_model.php +++ b/application/models/monthlypay_model.php @@ -308,10 +308,15 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA function addper($Permissiondata) { - //print_r($Permissiondata);die; - $this->db->insert('T_Permission',$Permissiondata); - $reuslt = $this->db->insert_id(); - return $reuslt; + $this->db->trans_start(); + $this->db->insert('T_Permission', $Permissiondata); + + $Permission = $this->db->affected_rows(); + + $this->db->trans_complete(); + + return $Permission; + } function perlist() @@ -326,13 +331,13 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA function pdf($SNO) { - $this->db->select('per.*,emp.FirstName,LastName,dep.DepartmentName'); - $this->db->from('T_Permission per'); - $this->db->join('T_Employee_Details emp','emp.EmpID = per.EmpID'); - $this->db->join('T_DepartmentDetails dep','dep.DEPCode = emp.Departmentcode'); - $this->db->where('per.SNO',$SNO ); - $query =$this->db->get(); - return $query->result(); + $this->db->select('per.*,emp.FirstName,LastName,dep.DepartmentName'); + $this->db->from('T_Permission per'); + $this->db->join('T_Employee_Details emp','emp.EmpID = per.EmpID'); + $this->db->join('T_DepartmentDetails dep','dep.DEPCode = emp.Departmentcode'); + $this->db->where('per.SNO',$SNO ); + $query =$this->db->get(); + return $query->result(); } diff --git a/application/models/supplier_model.php b/application/models/supplier_model.php index 4bd60183..d00a069c 100644 --- a/application/models/supplier_model.php +++ b/application/models/supplier_model.php @@ -38,7 +38,7 @@ class supplier_model extends CI_Model /** * To get Payment information - * @param number $payment : Optional : To get payment value + * @param number $payment : Optional : This is payment value * @return array $result : This is result of the query(payment information) */ function getPaymentTerms($payment = '') @@ -52,7 +52,7 @@ class supplier_model extends CI_Model /** * To Check PAN number is already exists are not - * @param number $SID : Optional : To get Supplier ID + * @param number $SID : Optional : This is Supplier ID * @param number $PAN : To get PAN number from the controller - for check purpose if already exists are not * @return $query->result_array() : This is result of the query (PAN Number information based on supplier ID) */ @@ -74,8 +74,8 @@ class supplier_model extends CI_Model /** * To Check GST number is already exists are not - * @param number $SID :Optional: To get Supplier ID - * @param number $GST : To get GST number from the controller - for check purpose if already exists are not + * @param number $SID :Optional: This is Supplier ID + * @param number $GST : This is GST number from the controller - for check purpose if already exists are not * @return $query->result_array() : This is result of the query (This is GST Number information based on supplier ID) */ function checkGST($GST,$SID = '') @@ -96,7 +96,7 @@ class supplier_model extends CI_Model /** * To Store the values - * @param number $supplier : To get all the information of Supplier from the controller + * @param number $supplier : This will have all the Supplier information * @return $SID : This will return how many value are inserted (return as number/count) */ function addNewsupplier($supplier) @@ -108,7 +108,7 @@ class supplier_model extends CI_Model /** * To get Supplier information on respective supplier id - * @param number $supplierID : Optional : To get Supplier ID + * @param number $supplierID : Optional : This is Supplier ID * @return $query->result() : This is result of the query */ function getSupplierInfo($supplierID='') @@ -123,7 +123,7 @@ class supplier_model extends CI_Model /** * To get the Supplier Address on respective Supplier ID - * @param number $supplierID : To get Supplier ID from the controller + * @param number $supplierID : This is Supplier ID * @return $query->result_array() : This is result of the query (Supplier's address information) */ function GetSupplierAddress($supplierID) @@ -137,8 +137,8 @@ class supplier_model extends CI_Model /** * To Update the values of supplier on respective Supplier ID - * @param number $supplier : To get all the information of Supplier from the controller - * @param number $supplierID : To get Supplier ID from the controller + * @param number $supplier : Thiss will have all theedited Supplier information + * @param number $supplierID : This is Supplier ID */ function UpdateSupplier($supplier, $supplierID) { @@ -149,8 +149,8 @@ class supplier_model extends CI_Model /** * To updated the Supplier information - * @param number $supplier : To get all the information of Supplier from the controller - * @param number $supplierID : To get Supplier ID from the controller + * @param number $supplier : This will have all the Supplier information + * @param number $supplierID : This is Supplier ID * * Note : This function Temporary not in use */ @@ -163,7 +163,7 @@ class supplier_model extends CI_Model /** * To store the Supplier Certificate details - * @param number $cerificate : To get all the information of cerficate from the controller + * @param number $cerificate : This will have all the Supplier information of from the controller * * Note : This function Temporary not in use */ diff --git a/application/models/user_model.php b/application/models/user_model.php index 6cd0bc60..9adc192f 100644 --- a/application/models/user_model.php +++ b/application/models/user_model.php @@ -5,11 +5,8 @@ class User_model extends CI_Model /** - * This function is used to get the user listing count - * @param string $searchText : This is optional search text - * @param number $page : This is pagination offset - * @param number $segment : This is pagination limit - * @return array $result : This is result + * To get the user list + * @return array $result : result of the query */ function userListing() { @@ -28,7 +25,12 @@ class User_model extends CI_Model $result = $query->result(); return $result; } - + + /** + * To get user's role name + * @param $UserId : + * @return array $result : result of the query + */ function GetRoleNameByUserID($UserId) { $subQuery = 'select roleId, role from tbl_roles diff --git a/application/views/Report_consolidate.php b/application/views/Report_consolidate.php index e4f6fe69..6fed9d70 100644 --- a/application/views/Report_consolidate.php +++ b/application/views/Report_consolidate.php @@ -638,7 +638,7 @@ $(document).ready(function() { table = $('#tab').DataTable( { "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + -"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", +"<'table-responsive'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", buttons: [ { extend: 'excelHtml5', diff --git a/application/views/Report_purchase.php b/application/views/Report_purchase.php index 567c633c..88cc2edc 100755 --- a/application/views/Report_purchase.php +++ b/application/views/Report_purchase.php @@ -476,7 +476,7 @@ $(document).ready(function() { table = $('#cc').DataTable( { "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + -"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", +"<'table-responsive'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", buttons: [ { diff --git a/application/views/bankreportprint.php b/application/views/bankreportprint.php index 2e05d83d..c879507b 100644 --- a/application/views/bankreportprint.php +++ b/application/views/bankreportprint.php @@ -1,23 +1,11 @@ - + --> - -
- @@ -26,7 +14,7 @@ - +
168/1C3, Pennalur Pet Road, Goonipalayam Village Post, Uthukottai Taluk, Thiruvallur Dist-602026
Mobile: +91 99410 14891 / 9941014890 | E-mail: accounts@sidharthindustries.com
196/4 B, 126, Mettupalayam Village,Sriperumbudur Taluk, Kancheepuram Dist, Tamil Nadu, India. Pin code : 631604
Mobile: +91 99410 14891 / 9941014890 | E-mail: accounts@resicoindustries.com
diff --git a/application/views/includes/bankreport_footer.php b/application/views/includes/bankreport_footer.php new file mode 100644 index 00000000..cbb0621d --- /dev/null +++ b/application/views/includes/bankreport_footer.php @@ -0,0 +1,4 @@ +
+ +
\ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index c294975c..737f1f99 100644 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -19,7 +19,9 @@ - + + + @@ -169,7 +171,7 @@ $full_path = $path .$pic; @@ -549,10 +551,14 @@ $full_path = $path .$pic; @@ -640,7 +646,7 @@ $full_path = $path .$pic; View Material Inspection Report -
  • + diff --git a/application/views/includes/pdfheader.php b/application/views/includes/pdfheader.php index 56394699..f712d539 100644 --- a/application/views/includes/pdfheader.php +++ b/application/views/includes/pdfheader.php @@ -1,4 +1,4 @@ - + -
  • - \ No newline at end of file + \ No newline at end of file diff --git a/application/views/permission.php b/application/views/permission.php new file mode 100644 index 00000000..7ca53066 --- /dev/null +++ b/application/views/permission.php @@ -0,0 +1,1406 @@ + + + + + + +
    + + + +
    +

    SIDDHARTH INDUSTRES

    +

    EMPLOYEE PERMISSION / ON DUTY SLIP

    +
    +
    +
    +
    +
    + +
    + 'Select Employee'); + //print_r( $options); + + if(!empty($emplists)) + { + foreach ($emplists as $SID): + + + $options[$SID->EmpID] = $SID->name.' '.' - '.' '.$SID->EmpID; + + endforeach; + } + + echo form_dropdown('emp', $options,set_value('emp'),'id="emp"' ,'required="true"' ,'class="form-control select2'); + + ?> +
    + +
    + +
    + +
    + 'dep','value' => set_value('dep',''),'id'=>'dep', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
    +
    +
    + +
    + 'shift','value' => set_value('shift',''),'id'=>'shift', 'class' => 'form-control','required'=>'true'); + echo form_input($data); + ?> +
    + +
    + +
    + +
    + 'date','value' => set_value('date',$date),'id'=>'date', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
    +
    +
    + +
    +
    +
    +
    + +
    + + +
    + + + +
    +
    + +
    + + +
    + +
    +
    + +
    + 'Pretime','value' => set_value('Pretime',''),'id'=>'Pretime', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
    + +
    +
    +
    + +
    + + + + +
    +
    + +
    + + + + + diff --git a/application/views/permissionlist.php b/application/views/permissionlist.php new file mode 100644 index 00000000..cfba9243 --- /dev/null +++ b/application/views/permissionlist.php @@ -0,0 +1,104 @@ + + + + + + + + +
    + +
    + + +
    +
    + + \ No newline at end of file diff --git a/application/views/permissionpdf.php b/application/views/permissionpdf.php new file mode 100644 index 00000000..74fa1bf6 --- /dev/null +++ b/application/views/permissionpdf.php @@ -0,0 +1,164 @@ + $per) +{ + //print_r($per); + $SNO = $per->SNO; + $EmpID=$per->EmpID; +$Permission=$per->Permission; +$Shift=$per->Shift; +$From=$per->From; +$To =$per->To; +$Reason =$per->Reason; +$firstname = $per->FirstName; +$lastname = $per->LastName; +$DepartmentName = $per->DepartmentName; +$Date =$per->Date; +$Date = date_format(date_create($date),'d-m-Y'); +} + +?> +




    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    SIDDHARTH INDUSTRIES

    +

    EMPLOYEE PERMISSION / ON DUTY SLIP

    +
    +

    SNO

    +
    +

    DATE

    +
    +

    EMPLOYEE NAME

    +
    +

    DEPARTMENT

    +
    +

    FROM

    +
    +

     TO

    +
    +

    PERMISSION TIME

    +
    +

    SHIFT

    +
    +

    REASON

    +
      +



    REQUESTED                                                                                    
    APPROVED

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    SIDDHARTH INDUSTRIES

    +

    EMPLOYEE PERMISSION / ON DUTY SLIP

    +
    +

    SNO

    +
    +

    DATE

    +
    +

    EMPLOYEE NAME

    +
    +

    DEPARTMENT

    +
    +

    FROM

    +
    +

     TO

    +
    +

    PERMISSION TIME

    +
    +

    SHIFT

    +
    +

    REASON

    +
      +



    REQUESTED                                                                                    
    APPROVED

    +
    \ No newline at end of file diff --git a/application/views/serviceporeport.php b/application/views/serviceporeport.php index a07410bf..687f73f0 100644 --- a/application/views/serviceporeport.php +++ b/application/views/serviceporeport.php @@ -31,7 +31,7 @@ $Adv='';
    - +
    diff --git a/application/views/supplierListing.php b/application/views/supplierListing.php index af2ccf0d..bbb144a6 100644 --- a/application/views/supplierListing.php +++ b/application/views/supplierListing.php @@ -18,7 +18,7 @@
    -
    SNO#
    +
    @@ -73,17 +73,37 @@ diff --git a/application/views/viewmrirforbilling.php b/application/views/viewmrirforbilling.php index ae4c6433..3222c44a 100644 --- a/application/views/viewmrirforbilling.php +++ b/application/views/viewmrirforbilling.php @@ -34,7 +34,7 @@ $color='';
    -
    Supplier ID
    +
    IGR NO