details.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. {% extends "base/base.html" %}
  2. {% block content %}
  3. <h2>Kommentare</h2>
  4. <table class="table table-striped table-bordered">
  5. <thead>
  6. <tr>
  7. <th>Timestamp</th>
  8. <th>Name</th>
  9. <th>Rolle</th>
  10. <th>Begründung</th>
  11. <th>Wiedervorlage</th>
  12. <th>Kommentar</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {% for row in forderung_kommentar %}
  17. <tr>
  18. <td>{{ row.Timestamp|date_format }}</td>
  19. <td>{{ row.Name }}</td>
  20. <td>{{ row.Rolle }}</td>
  21. <td>{{ row.Begründung or '' }}</td>
  22. <td>{{ row.Wiedervorlage|date_format }}</td>
  23. <td>{{ row.Kommentar or '' }}</td>
  24. </tr>
  25. {% endfor %}
  26. </tbody>
  27. </table>
  28. <h2>Eingabemaske</h2>
  29. <form class="row g-3">
  30. <div class="col-md-6">
  31. <label for="inputEmail4" class="form-label">Email</label>
  32. <input type="email" class="form-control" id="inputEmail4">
  33. </div>
  34. <div class="col-md-6">
  35. <label for="inputPassword4" class="form-label">Password</label>
  36. <input type="password" class="form-control" id="inputPassword4">
  37. </div>
  38. <div class="col-12">
  39. <label for="inputAddress" class="form-label">Address</label>
  40. <input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St">
  41. </div>
  42. <div class="col-12">
  43. <label for="inputAddress2" class="form-label">Address 2</label>
  44. <input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor">
  45. </div>
  46. <div class="col-md-6">
  47. <label for="inputCity" class="form-label">City</label>
  48. <input type="text" class="form-control" id="inputCity">
  49. </div>
  50. <div class="col-md-4">
  51. <label for="inputState" class="form-label">State</label>
  52. <select id="inputState" class="form-select">
  53. <option selected>Choose...</option>
  54. <option>...</option>
  55. </select>
  56. </div>
  57. <div class="col-md-2">
  58. <label for="inputZip" class="form-label">Zip</label>
  59. <input type="text" class="form-control" id="inputZip">
  60. </div>
  61. <div class="col-12">
  62. <div class="form-check">
  63. <input class="form-check-input" type="checkbox" id="gridCheck">
  64. <label class="form-check-label" for="gridCheck">
  65. Check me out
  66. </label>
  67. </div>
  68. </div>
  69. <div class="col-12">
  70. <button type="submit" class="btn btn-primary">Sign in</button>
  71. </div>
  72. </form>
  73. <h2>Forderung Details</h2>
  74. <table class="table table-striped table-bordered">
  75. <tbody>
  76. {% for row in forderung_kopf %}
  77. {% for key, value in row._asdict().items() %}
  78. <tr>
  79. <th>{{ key }}</th>
  80. <td>{{ value }}</td>
  81. </tr>
  82. {% endfor %}
  83. {% endfor %}
  84. </tbody>
  85. </table>
  86. <h2>Mahnungen</h2>
  87. <table class="table table-striped table-bordered">
  88. <thead>
  89. <tr>
  90. <th>Kunde_Nr</th>
  91. <th>Mahnung_Nr</th>
  92. <th>Mahndatum</th>
  93. <th>Mahnstufe</th>
  94. <th>Rechnung_Nr</th>
  95. <th>Rechnung_Datum</th>
  96. <th>Betrag</th>
  97. <th>Offen</th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. {% for row in forderung_mahnung %}
  102. <tr>
  103. <td>{{ row.Kunde_Nr }}</td>
  104. <td>{{ row.Mahnung_Nr }}</td>
  105. <td>{{ row.Mahndatum|date_format }}</td>
  106. <td>{{ row.Rechnung_Nr }}</td>
  107. <td>{{ row.Rechnung_Datum|date_format }}</td>
  108. <td>{{ row.Betrag|number_format }}</td>
  109. <td>{{ row.Offen|number_format }}</td>
  110. </tr>
  111. {% endfor %}
  112. </tbody>
  113. </table>
  114. <h2>Auftragspositionen</h2>
  115. <table class="table table-striped table-bordered">
  116. <thead>
  117. <tr>
  118. <th>Auftrag_Nr</th>
  119. <th>Auftrag_Position</th>
  120. <th>Betrag</th>
  121. </tr>
  122. </thead>
  123. <tbody>
  124. {% for row in auftrag_positionen %}
  125. <tr>
  126. <td>{{ row.Auftrag_Nr }}</td>
  127. <td>{{ row.Auftrag_Position }}</td>
  128. <td>{{ row.Betrag|number_format }}</td>
  129. </tr>
  130. {% endfor %}
  131. </tbody>
  132. </table>
  133. <div class="card mb-3">
  134. <div class="card-body">
  135. <h5 class="card-title">Rechnung {{ forderung.rechnungsnummer }}</h5>
  136. <p>Kunde: {{ forderung.kunde.name if forderung.kunde else '' }}</p>
  137. <p>Betrag: {{ forderung.betrag }}</p>
  138. <p>Fälligkeit: {{ forderung.faelligkeit }}</p>
  139. <div class="mt-3">
  140. <a class="btn btn-outline-secondary me-2" href="/detail/{{ forderung.id }}/export/docx">Export DOCX</a>
  141. <a class="btn btn-outline-primary" href="mailto:?subject=Rechnung%20{{ forderung.rechnungsnummer }}&body=Sie%20finden%20Details%20unter%20{{ request.url }}">E-Mail (mailto)</a>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="card">
  146. <div class="card-body">
  147. <h6>Neue Bemerkung</h6>
  148. <form method="post" action="/detail/{{ forderung.id }}/bemerkung">
  149. <div class="mb-2">
  150. <textarea name="bemerkung" class="form-control" rows="3"></textarea>
  151. </div>
  152. <div class="mb-2">
  153. <label>Wiedervorlage</label>
  154. <input type="date" name="wiedervorlage_datum" class="form-control" />
  155. </div>
  156. <button class="btn btn-primary" type="submit">Speichern</button>
  157. <a class="btn btn-secondary ms-2" href="/forderungen">Zurück</a>
  158. </form>
  159. </div>
  160. </div>
  161. {% if forderung.bemerkungen %}
  162. <div class="mt-3">
  163. <h5>Bemerkungen</h5>
  164. <ul class="list-group">
  165. {% for b in forderung.bemerkungen %}
  166. <li class="list-group-item">{{ b.zeitstempel }} - {{ b.benutzer }}: {{ b.bemerkung }} {% if b.wiedervorlage_datum %} (WV: {{ b.wiedervorlage_datum }}){% endif %}</li>
  167. {% endfor %}
  168. </ul>
  169. </div>
  170. {% endif %}
  171. {% endblock %}