Visual improvements, add navbar
This commit is contained in:
parent
b34ec8473e
commit
cf92c9b638
@ -80,6 +80,9 @@ class TrialBalancer:
|
|||||||
|
|
||||||
# TODO: Keep a record of internal transactions?
|
# TODO: Keep a record of internal transactions?
|
||||||
|
|
||||||
|
if source_account not in self.accounts:
|
||||||
|
return
|
||||||
|
|
||||||
if destination_account not in self.accounts:
|
if destination_account not in self.accounts:
|
||||||
self.accounts[destination_account] = Amount(0, '$') # FIXME: Other commodities
|
self.accounts[destination_account] = Amount(0, '$') # FIXME: Other commodities
|
||||||
|
|
||||||
|
@ -25,6 +25,17 @@
|
|||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha256-4RctOgogjPAdwGbwq+rxfwAmSpZhWaafcZR9btzUk18=" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha256-4RctOgogjPAdwGbwq+rxfwAmSpZhWaafcZR9btzUk18=" crossorigin="anonymous">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
{% block body %}
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="/">DrCr</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="container">
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}General journal{% endblock %}
|
{% block title %}General journal{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">General journal</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">General journal</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -51,5 +50,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}General ledger{% endblock %}
|
{% block title %}General ledger{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">General ledger</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">General ledger</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -51,5 +50,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
38
drcr/templates/index.html
Normal file
38
drcr/templates/index.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{# DrCr: Web-based double-entry bookkeeping framework
|
||||||
|
Copyright (C) 2022 Lee Yingtong Li (RunasSudo)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program 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 Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#}
|
||||||
|
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% block title %}DrCr{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1 class="h2 my-4">Data sources</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/general-journal">General journal</a></li>
|
||||||
|
<li><a href="/statement-lines">Statement lines</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1 class="h2 my-4">General reports</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/general-ledger">General ledger</a></li>
|
||||||
|
<li><a href="/trial-balance">Trial balance</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h1 class="h2 my-4">Advanced reports</h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/reports/balance-sheet">Balance sheet</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}Edit statement line charge{% endblock %}
|
{% block title %}Edit statement line charge{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">Statement line</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">Statement line</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -109,8 +108,9 @@
|
|||||||
<button type="submit" class="btn btn-primary">Save</button>
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
<script>
|
<script>
|
||||||
function addPosting(el) {
|
function addPosting(el) {
|
||||||
let trPosting = el.parentNode.parentNode;
|
let trPosting = el.parentNode.parentNode;
|
||||||
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}Statement lines{% endblock %}
|
{% block title %}Statement lines{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">Statement lines</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">Statement lines</h1>
|
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
@ -65,8 +64,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
<script>
|
<script>
|
||||||
function classifyLine(lineId) {
|
function classifyLine(lineId) {
|
||||||
let chargeAccount = prompt('Charge to:');
|
let chargeAccount = prompt('Charge to:');
|
||||||
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}Account transactions{% endblock %}
|
{% block title %}Account transactions{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">Account transactions</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">Account transactions</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -85,5 +84,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -18,9 +18,8 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}Trial balance{% endblock %}
|
{% block title %}Trial balance{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block content %}
|
||||||
<div class="container">
|
<h1 class="h2 my-4">Trial balance</h1>
|
||||||
<h1 class="h2 mt-4 mb-4">Trial balance</h1>
|
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -45,5 +44,4 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -21,7 +21,7 @@ from .webapp import all_transactions, app
|
|||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
return '<a href="/general-journal">General journal</a><br><a href="/statement-lines">Statement lines</a><br><a href="/general-ledger">General ledger</a><br><a href="/trial-balance">Trial balance</a>'
|
return render_template('index.html')
|
||||||
|
|
||||||
@app.route('/general-ledger')
|
@app.route('/general-ledger')
|
||||||
def general_ledger():
|
def general_ledger():
|
||||||
|
Loading…
Reference in New Issue
Block a user