PageRenderTime 61ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 1ms

/src/economy/templates/overview.html

https://bitbucket.org/danseku/fokus
HTML | 118 lines | 95 code | 6 blank | 17 comment | 0 complexity | 3933a008dbf47b1eb381d77d5a0b6933 MD5 | raw file
  1. {% extends "base.html" %}
  2. {% load currency %}
  3. {% block edit_tools %}
  4. <a href="{{ project.get_edit_url }}" class="tool edit project">Rediger prosjektinfo</a>
  5. <a href="javascript:openReportDialog()" onclick="openReportDialog();return false;" class="tool generate report">Gener?r rapport</a>
  6. <a href="{{ project.new_contract_url }}" class="tool new contract">Ny kontrakt</a>
  7. {% endblock %}
  8. {% block content %}
  9. <table class="overview grid">
  10. <thead>
  11. <tr>
  12. <th rowspan="2" class="">Kontrakt</th>
  13. <th rowspan="2" class="">Firmanavn</th>
  14. <th rowspan="2" class="number">Budsjett</th>
  15. <th rowspan="2" class="number">Kontrakt</th>
  16. <th colspan="2" class="center">Endringer</th>
  17. <th colspan="3" class="center">Totalt</th>
  18. <th rowspan="2" class="number">Gjenst&aring;ende</th>
  19. <th rowspan="2" class="">Kommentar</th>
  20. </tr>
  21. <tr>
  22. <th class="number">Godkjent</th>
  23. <th class="number">Uavklart</th>
  24. <th class="number">Sum</th>
  25. <th class="number">Fakturert</th>
  26. <th class="number">%</th>
  27. </tr>
  28. </thead>
  29. {% for category in categories %}
  30. {% if category.contracts %}
  31. <tbody>
  32. <tr>
  33. <th colspan="11">{{ category.title }}</th>
  34. </tr>
  35. {% for contract in category.contracts %}
  36. <tr class="clickable contract" onDblClick="window.location = '{{ contract.get_absolute_url }}';">
  37. <td>{{ contract.code }}</td>
  38. <td>{{ contract.company }}</td>
  39. <td class="number">{{ contract.budget|currency }}</td>
  40. <td class="number">{{ contract.amount|currency }}</td>
  41. <td class="number">{{ contract.total_changes.accepted.amount|currency }}</td>
  42. <td class="number">{{ contract.total_changes.pending.amount|currency }}</td>
  43. <td class="number">{{ contract.total_sum|currency }}</td>
  44. <td class="number">{{ contract.total_invoices|currency }}</td>
  45. <td class="number">{{ contract.total_percent|currency:1 }}&nbsp;%</td>
  46. <td class="number">{{ contract.total_remaining|currency }}</td>
  47. <td>{{ contract.comment }}</td>
  48. </tr>
  49. {% endfor %}
  50. </tbody>
  51. {% endif %}
  52. {% endfor %}
  53. </table>
  54. <div id="reportDialog" style="display: none;" title="Opprett rapport">
  55. <form action="{% url report project.number %}" method="get" id="reportform">
  56. <table class="form">
  57. <tr>
  58. <th>Rapportmal:</th>
  59. <td>
  60. <select name="type" id="">
  61. <option value="" selected="selected">Per prosjekt</option>
  62. <option value="ns">Bygningsdelstabell</option>
  63. </select>
  64. </td>
  65. </tr>
  66. <tr>
  67. <th>Fra dato:</th>
  68. <td>
  69. <span class="floatingcheckbox">
  70. <input type="checkbox" name="from_date_on" onclick="toggleEnabled('#from_date', this)" />
  71. </span>
  72. <span class="floatingdatebox">
  73. <input class="datepicke disabled" type="text" name="from_date" value="" id="from_date" disabled="disabled" />
  74. </span>
  75. </td>
  76. </tr>
  77. <tr>
  78. <th>Til dato:</th>
  79. <td>
  80. <span class="floatingcheckbox">
  81. <input type="checkbox" name="to_date_on" onclick="toggleEnabled('#to_date', this)" />
  82. </span>
  83. <span class="floatingdatebox">
  84. <input class="datepicke disabled" type="text" name="to_date" value="" id="to_date" disabled="disabled" />
  85. </span>
  86. </td>
  87. </tr>
  88. </table>
  89. </form>
  90. </div>
  91. {% endblock %}
  92. {% block extra_headers %}
  93. <script type="text/javascript">
  94. <!--
  95. var openReportDialog = function() {
  96. $("#reportDialog").dialog({
  97. modal: true,
  98. resizable: false,
  99. dialogClass: "generate report",
  100. buttons: {
  101. "Opprett": function(){
  102. $("#reportform").submit();
  103. },
  104. // "Avbryt": function(){
  105. // $(this).dialog("close");
  106. // },
  107. }
  108. });
  109. }
  110. // -->
  111. </script>
  112. {% endblock %}