This commit is contained in:
Yisroel Baum 2024-12-25 21:20:27 +02:00
parent c7868c6b4e
commit da1210a862
15 changed files with 105 additions and 5 deletions

View file

@ -0,0 +1,25 @@
{% extends 'base.html' %}
{% block title %}Split Line{% endblock title %}
{% block content %}
<main>
<div class="container mt-5">
<div class="card">
<div class="card-header bg-primary text-white">
Select file to import
</div>
<!-- Display Details Section -->
<div class="card-body">
{% for file in files %}
<p><a href="{{url_for('upload_file_for_line_split', file_name=file, line_item_id=li.id)}}">{{file}}</a></p>
{% endfor %}
</div>
<div class="card-body">
</div>
</div>
</div>
<!-- <script src="{{url_for('.static', filename='split_line.js')}}"></script> -->
</main>
{% endblock content %}

View file

@ -21,7 +21,7 @@
<tbody>
{% for file in files %}
<tr>
<th scope="row"><a href="{{url_for('upload_file', filename=file)}}">{{file}}</a></th>
<th scope="row"><a href="{{url_for('upload_bank_statement', filename=file)}}">{{file}}</a></th>
</tr>
{% endfor %}
</tbody>

View file

@ -27,6 +27,9 @@
<th scope="row">Date:</th>
<td>{{ li.display_date() }}</td>
</tr>
<tr>
<th><a class="btn btn-primary" href="{{url_for('import_file_selector', line_item_id=li.id)}}">Import File</a></th>
</tr>
</tbody>
</table>
</div>
@ -37,7 +40,25 @@
<table class="table table-bordered">
<input type="hidden" name="parent-id" value="{{li.id}}"/>
<input type="hidden" name="date" value="{{li.date}}"/>
<tbody id="table-body"></tbody>
<tbody id="table-body">
{% if existing_child_lines %}
<tr>
<th>Amount</th>
<th>Vendor</th>
<th>Confirmation Code</th>
<th>Note</th>
</tr>
{% for line in existing_child_lines %}
<tr>
<td>{{line.amount}}</td>
<td>{{line.get_vendor()}}</td>
<td>{{line.confirmation_code}}</td>
<td>{{line.note}}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
<button type="button" class="btn btn-primary" id="add-line-button">Add Another Line?</button>