Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

72 rindas
2.1 KiB

  1. {%
  2. var report_columns = report.get_columns_for_print();
  3. report_columns = report_columns.filter(col => !col.hidden);
  4. if (report_columns.length > 8) {
  5. frappe.throw(__("Too many columns. Export the report and print it using a spreadsheet application."));
  6. }
  7. %}
  8. <style>
  9. .financial-statements-important td {
  10. font-weight: bold;
  11. }
  12. .financial-statements-blank-row td {
  13. height: 37px;
  14. }
  15. </style>
  16. <h2 class="text-center">{%= __(report.report_name) %}</h2>
  17. <h3 class="text-center">{%= filters.company %}</h3>
  18. {% if 'cost_center' in filters %}
  19. <h3 class="text-center">{%= filters.cost_center %}</h3>
  20. {% endif %}
  21. <h3 class="text-center">{%= filters.fiscal_year %}</h3>
  22. <h5 class="text-center">
  23. {%= __("Currency") %} : {%= filters.presentation_currency || erpnext.get_currency(filters.company) %}
  24. </h5>
  25. {% if (filters.from_date) { %}
  26. <h5 class="text-center">
  27. {%= frappe.datetime.str_to_user(filters.from_date) %} - {%= frappe.datetime.str_to_user(filters.to_date) %}
  28. </h5>
  29. {% } %}
  30. <hr>
  31. <table class="table table-bordered">
  32. <thead>
  33. <tr>
  34. <th style="width: {%= 100 - (report_columns.length - 1) * 13 %}%"></th>
  35. {% for (let i=1, l=report_columns.length; i<l; i++) { %}
  36. <th class="text-right">{%= report_columns[i].label %}</th>
  37. {% } %}
  38. </tr>
  39. </thead>
  40. <tbody>
  41. {% for(let j=0, k=data.length; j<k; j++) { %}
  42. {%
  43. var row = data[j];
  44. var row_class = data[j].parent_account ? "" : "financial-statements-important";
  45. row_class += data[j].account_name ? "" : " financial-statements-blank-row";
  46. %}
  47. <tr class="{%= row_class %}">
  48. <td>
  49. <span style="padding-left: {%= cint(data[j].indent) * 2 %}em">{%= row.account_name %}</span>
  50. </td>
  51. {% for(let i=1, l=report_columns.length; i<l; i++) { %}
  52. <td class="text-right">
  53. {% const fieldname = report_columns[i].fieldname; %}
  54. {% if (!is_null(row[fieldname])) { %}
  55. {%= frappe.format(row[fieldname], report_columns[i], {}, row) %}
  56. {% } %}
  57. </td>
  58. {% } %}
  59. </tr>
  60. {% } %}
  61. </tbody>
  62. </table>
  63. <p class="text-right text-muted">
  64. Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
  65. </p>