details.html 5.6 KB

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