/application/views/admin/report/date_wise_report_pdf.php

https://bitbucket.org/trungams/timetracking · PHP · 105 lines · 99 code · 6 blank · 0 comment · 7 complexity · 0404bdc9300ae8e821e369125b365b8c MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title><?= lang('transactions_report') ?></title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <?php
  7. $direction = $this->session->userdata('direction');
  8. if (!empty($direction) && $direction == 'rtl') {
  9. $RTL = 'on';
  10. } else {
  11. $RTL = config_item('RTL');
  12. }?>
  13. <style>
  14. th {
  15. padding: 10px 0px 5px 5px;
  16. <?php if(!empty($RTL)){?> text-align: right;<?php }else{?>text-align: left;<?php }?>
  17. font-size: 13px;
  18. border: 1px solid black;
  19. }
  20. td {
  21. padding: 5px 0px 0px 5px;
  22. border: 1px solid black;
  23. font-size: 13px;
  24. <?php if(!empty($RTL)){?> text-align: right;<?php }else{?>text-align: left;<?php }?>
  25. }
  26. </style>
  27. </head>
  28. <body style="min-width: 98%; min-height: 100%; overflow: hidden; alignment-adjust: central;">
  29. <br/>
  30. <div style="width: 100%; border-bottom: 2px solid black;">
  31. <table style="width: 100%; vertical-align: middle;">
  32. <tr>
  33. <td style="width: 50px; border: 0px;">
  34. <img style="width: 50px;height: 50px;margin-bottom: 5px;"
  35. src="<?= base_url() . config_item('company_logo') ?>" alt="" class="img-circle"/>
  36. </td>
  37. <td style="border: 0px;">
  38. <p style="margin-left: 10px; font: 14px lighter;"><?= config_item('company_name') ?></p>
  39. </td>
  40. </tr>
  41. </table>
  42. </div>
  43. <br/>
  44. <div style="width: 100%;">
  45. <table style="width: 100%; font-family: Arial, Helvetica, sans-serif; border-collapse: collapse;">
  46. <tr>
  47. <th style="width: 15%"><?= lang('date') ?></th>
  48. <th style="width: 15%"><?= lang('account') ?></th>
  49. <th><?= lang('type') ?></th>
  50. <th><?= lang('notes') ?></th>
  51. <th><?= lang('amount') ?></th>
  52. <th><?= lang('credit') ?></th>
  53. <th><?= lang('debit') ?></th>
  54. <th><?= lang('balance') ?></th>
  55. </tr>
  56. <?php
  57. $total_amount = 0;
  58. $total_debit = 0;
  59. $total_credit = 0;
  60. $total_balance = 0;
  61. $curency = $this->report_model->check_by(array('code' => config_item('default_currency')), 'tbl_currencies');
  62. if (!empty($all_transaction_info)): foreach ($all_transaction_info as $v_transaction) :
  63. $account_info = $this->report_model->check_by(array('account_id' => $v_transaction->account_id), 'tbl_accounts');
  64. ?>
  65. <tr style="width: 100%;">
  66. <td><?= strftime(config_item('date_format'), strtotime($v_transaction->date)); ?></td>
  67. <td class="vertical-td"><?= $account_info->account_name ?></td>
  68. <td class="vertical-td"><?= lang($v_transaction->type) ?> </td>
  69. <td class="vertical-td"><?= $v_transaction->notes ?></td>
  70. <td><?= display_money($v_transaction->amount, $curency->symbol) ?></td>
  71. <td><?= display_money($v_transaction->credit, $curency->symbol) ?></td>
  72. <td><?= display_money($v_transaction->debit, $curency->symbol) ?></td>
  73. <td><?= display_money($v_transaction->total_balance, $curency->symbol) ?></td>
  74. </tr>
  75. <?php
  76. $total_amount += $v_transaction->amount;
  77. $total_debit += $v_transaction->debit;
  78. $total_credit += $v_transaction->credit;
  79. $total_balance += $v_transaction->total_balance;
  80. ?>
  81. <?php endforeach; ?>
  82. <tr class="custom-color-with-td">
  83. <td style="text-align: right;" colspan="4"><strong><?= lang('total') ?>:</strong></td>
  84. <td><strong><?= display_money($total_amount, $curency->symbol) ?></strong></td>
  85. <td><strong><?= display_money($total_credit, $curency->symbol) ?></strong></td>
  86. <td><strong><?= display_money($total_debit, $curency->symbol) ?></strong></td>
  87. <td><strong><?= display_money($total_credit - $total_debit, $curency->symbol) ?></strong></td>
  88. </tr>
  89. <?php else: ?>
  90. <tr>
  91. <td colspan="7">
  92. <strong>There is no Report to display</strong>
  93. </td>
  94. </tr>
  95. <?php endif; ?>
  96. </table>
  97. </div>
  98. </body>
  99. </html>