From a687e7388387db84016f93309a6a96c43b68726a Mon Sep 17 00:00:00 2001 From: saravanakumar_kandasami Date: Wed, 19 Apr 2017 18:46:55 +0530 Subject: [PATCH] payslip pdf generate code --- application/controllers/payslip.php | 37 ++- .../third_party/dompdf/lib/fonts/log.htm | 2 +- application/views/dashboard.php | 180 ++++++++++++++- application/views/includes/header.php | 4 +- application/views/payslipgenerate.php | 4 +- application/views/payslipgenerateprint.php | 216 ++++++++++++++++++ application/views/payslipupload.php | 14 +- assets/dist/img/logo.png | Bin 0 -> 955 bytes 8 files changed, 431 insertions(+), 26 deletions(-) create mode 100644 application/views/payslipgenerateprint.php create mode 100644 assets/dist/img/logo.png diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index bfa64fa9..94d69a00 100644 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -20,29 +20,42 @@ class payslip extends BaseController $this->load->model('employeedetails_model'); $this->isLoggedIn(); } - /** - * This function used to load the first screen of the user - */ - public function index() - { - - - - } - - - function payslipupload() + function payslipupload() { $this->global['pageTitle'] = 'Siddharth : PaySlip Upload'; $this->loadViews("payslipupload", $this->global, NULL); } + function payslipgenerate() { $this->global['pageTitle'] = 'Siddharth : PaySlip Generator'; $this->loadViews("payslipgenerate", $this->global, NULL); } + + function payslipgenerateprint() + { + $this->global['pageTitle'] = 'Siddharth : PaySlip Generator print'; + + // Add header to pdf + //$this->load->view('includes/pdfheader'); + + $this->load->View("payslipgenerateprint", $this->global, NULL); + + // Get output html + $php = $this->output->get_output(); + + // Load library + $this->load->library('dompdf_gen'); + + // Convert to PDF + $this->dompdf->load_html($php); + $this->dompdf->render(); + + $data['Attachment'] = FALSE; + $this->dompdf->stream("payslipgenerate.pdf",$data,$php); + } function pageNotFound() { diff --git a/application/third_party/dompdf/lib/fonts/log.htm b/application/third_party/dompdf/lib/fonts/log.htm index 8d5bb5cc..a6f58d6a 100644 --- a/application/third_party/dompdf/lib/fonts/log.htm +++ b/application/third_party/dompdf/lib/fonts/log.htm @@ -1 +1 @@ -6,144 KB 408.7529 ms
\ No newline at end of file +2,048 KB 235.9860 ms
\ No newline at end of file diff --git a/application/views/dashboard.php b/application/views/dashboard.php index 622fe427..03a8f137 100644 --- a/application/views/dashboard.php +++ b/application/views/dashboard.php @@ -1,14 +1,180 @@
-
-

- Dashboard -

-
+
-
- SIDDHARTH INDUSTRIES APPLICATION + + +
+ +
+

+ Account Department Dashboard + +

+ +
+ + +
+ +
+
+
+ + +
+ CPU Traffic + 90% +
+
+ +
+ +
+
+ + +
+ Likes + 41,410 +
+ +
+ +
+ + + +
+ +
+
+ + +
+ Sales + 760 +
+ +
+ +
+ +
+
+ + +
+ New Members + 2,000 +
+ +
+ +
+ +
+
+

Guidiness:

# PaySlip menu in header has two sub menu ( 1.Upload Salary , 2.PaySlip Generator)
+ # Upload salary menu is to upload the salary excel file in database
+ # Payslip generator menu is to generate the salary details for indivigual or all employee

+ +
+ +
+ + + +
+ +
+

+ Admin Dashboard + +

+ +
+ + +
+
+
+ +
+
+

150

+ +

New Orders

+
+
+ +
+ More info +
+
+ +
+ +
+
+

53%

+ +

Bounce Rate

+
+
+ +
+ More info +
+
+ +
+ +
+
+

44

+ +

User Registrations

+
+
+ +
+ More info +
+
+ +
+ +
+
+

65

+ +

Unique Visitors

+
+
+ +
+ More info +
+
+ +
+
+ +
+ +
\ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index f606d820..d6f3250a 100644 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -229,8 +229,8 @@ { ?>
  • - PaySlip Generate -