3 Copyright (C) 2024 Dr. Agnibho Mondal
4 This file is part of LibreVax.
5 LibreVax is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6 LibreVax is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7 You should have received a copy of the GNU General Public License along with LibreVax. If not, see <https://www.gnu.org/licenses/>.
10 {% set
title=
"Transaction Record" %}
11 {% extends
"base.html" %}
16 {% if action==
"list" %}
21 <div class=
"col-sm-10"><h2><a href=
"/inventory/view/{{item["iid
"]}}">{{item[
"vaccine"]}} ({{item[
"batch"]}})
</a></h2></div>
22 <div class=
"col-sm-2 d-grid"><a href=
"/transaction/new/{{item["iid
"]}}" class=
"btn btn-outline-primary">Add Transaction
</a></div>
26 <tr><th>Date
</th><th>Type
</th><th>Amount
</th></tr>
28 <tr><td><a href=
"/transaction/view/{{rec["tid
"]}}">{{rec[
"date"]|format_date}}
</a></td><td><a href=
"/transaction/view/{{rec["tid
"]}}">{{rec[
"action"]}}
</a></td><td><a href=
"/transaction/view/{{rec["tid
"]}}">{{rec[
"target"]}}
</a></td></tr>
30 <tr><th>Administered
</th><td></td><td>{{usage}}
</td></tr>
31 <tr><th>Balance
</th><td></td><td>{{balance}}
</td></tr>
34 <h3>Vaccination Record
</h3>
36 <tr><th>Date
</th><th>Patient
</th><th>Dosage
</th></tr>
37 {% for rec in administered %}
38 <tr><td>{{rec[
"date"]|format_date}}
</td><td><a href=
"/patient/view/{{rec["pid
"]}}">{{rec[
"name"]}}
</a></td><td>{{rec[
"dosage"]}}
</tr>
45 {% if action==
"view" %}
49 <tr><th>Item
</th><td><a href=
"/inventory/view/{{item["iid
"]}}">{{item[
"vaccine"]}} ({{item[
"batch"]}})
</a></td></tr>
50 <tr><th>Type
</th><td>{{data[
"action"]}}
</td></tr>
51 <tr><th>Date
</th><td>{{data[
"date"]|format_date}}
</td></tr>
52 <tr><th>Amount
</th><td>{{data[
"target"]}}
</td></tr>
53 <tr><th>Memo
</th><td>{{data[
"memo"]}}
</td></tr>
55 <a href=
"/transaction/edit/{{data["tid
"]}}" class=
"btn btn-primary">Edit
</a>
56 <a href=
"/delete/transaction/{{data["tid
"]}}" class=
"btn btn-danger delete-link">Delete
</a>