diff --git a/CHANGES.rst b/CHANGES.rst index 3bea1f1f..0d2f0a36 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog ========= +1.2.0 (2024-01-25) +------------------ + +* Add tracking of sales tax paid on each transaction. +* Minor build fixes to get this building again. + 1.1.1 (2022-12-30) ------------------ diff --git a/biweeklybudget/__init__.py b/biweeklybudget/__init__.py index 2a352084..c7d5bdcc 100644 --- a/biweeklybudget/__init__.py +++ b/biweeklybudget/__init__.py @@ -3,7 +3,7 @@ ################################################################################## -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/alembic/env.py b/biweeklybudget/alembic/env.py index f3de9bfb..e83a7113 100644 --- a/biweeklybudget/alembic/env.py +++ b/biweeklybudget/alembic/env.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/alembic/versions/d01774fa3ae3_add_transaction_field_to_store_sales_.py b/biweeklybudget/alembic/versions/d01774fa3ae3_add_transaction_field_to_store_sales_.py new file mode 100644 index 00000000..5af9df9a --- /dev/null +++ b/biweeklybudget/alembic/versions/d01774fa3ae3_add_transaction_field_to_store_sales_.py @@ -0,0 +1,28 @@ +"""add Transaction field to store sales tax paid + +Revision ID: d01774fa3ae3 +Revises: f5a002127934 +Create Date: 2024-01-24 19:47:44.629591 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'd01774fa3ae3' +down_revision = 'f5a002127934' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('transactions', sa.Column('sales_tax', sa.Numeric(precision=10, scale=4), nullable=False)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('transactions', 'sales_tax') + # ### end Alembic commands ### diff --git a/biweeklybudget/backfill_ofx.py b/biweeklybudget/backfill_ofx.py index 08a2da6d..50e0c65e 100644 --- a/biweeklybudget/backfill_ofx.py +++ b/biweeklybudget/backfill_ofx.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/biweeklypayperiod.py b/biweeklybudget/biweeklypayperiod.py index 34ecc786..12755900 100644 --- a/biweeklybudget/biweeklypayperiod.py +++ b/biweeklybudget/biweeklypayperiod.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/cliutils.py b/biweeklybudget/cliutils.py index 006ed373..4add8265 100644 --- a/biweeklybudget/cliutils.py +++ b/biweeklybudget/cliutils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/db.py b/biweeklybudget/db.py index d47bde57..ceb468de 100644 --- a/biweeklybudget/db.py +++ b/biweeklybudget/db.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/db_event_handlers.py b/biweeklybudget/db_event_handlers.py index b026e242..8e3c789c 100644 --- a/biweeklybudget/db_event_handlers.py +++ b/biweeklybudget/db_event_handlers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/__init__.py b/biweeklybudget/flaskapp/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/flaskapp/__init__.py +++ b/biweeklybudget/flaskapp/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/app.py b/biweeklybudget/flaskapp/app.py index 70faec89..3a8b9c4e 100644 --- a/biweeklybudget/flaskapp/app.py +++ b/biweeklybudget/flaskapp/app.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/cli_commands.py b/biweeklybudget/flaskapp/cli_commands.py index 943ec050..183fbffd 100644 --- a/biweeklybudget/flaskapp/cli_commands.py +++ b/biweeklybudget/flaskapp/cli_commands.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/context_processors.py b/biweeklybudget/flaskapp/context_processors.py index 6da341ff..c8b80645 100644 --- a/biweeklybudget/flaskapp/context_processors.py +++ b/biweeklybudget/flaskapp/context_processors.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/filters.py b/biweeklybudget/flaskapp/filters.py index abaecdf7..17f2dd45 100644 --- a/biweeklybudget/flaskapp/filters.py +++ b/biweeklybudget/flaskapp/filters.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/jinja_tests.py b/biweeklybudget/flaskapp/jinja_tests.py index c6eb51eb..e540700f 100644 --- a/biweeklybudget/flaskapp/jinja_tests.py +++ b/biweeklybudget/flaskapp/jinja_tests.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/jsonencoder.py b/biweeklybudget/flaskapp/jsonencoder.py index 30e07fe0..af68c05e 100644 --- a/biweeklybudget/flaskapp/jsonencoder.py +++ b/biweeklybudget/flaskapp/jsonencoder.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/notifications.py b/biweeklybudget/flaskapp/notifications.py index 41406866..1989134c 100644 --- a/biweeklybudget/flaskapp/notifications.py +++ b/biweeklybudget/flaskapp/notifications.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/account_transfer_modal.js b/biweeklybudget/flaskapp/static/js/account_transfer_modal.js index 33a53b29..c3b74956 100644 --- a/biweeklybudget/flaskapp/static/js/account_transfer_modal.js +++ b/biweeklybudget/flaskapp/static/js/account_transfer_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/accounts_modal.js b/biweeklybudget/flaskapp/static/js/accounts_modal.js index 671105a5..a7b1e5f2 100644 --- a/biweeklybudget/flaskapp/static/js/accounts_modal.js +++ b/biweeklybudget/flaskapp/static/js/accounts_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/bom_items.js b/biweeklybudget/flaskapp/static/js/bom_items.js index c838d993..2eee4c5b 100644 --- a/biweeklybudget/flaskapp/static/js/bom_items.js +++ b/biweeklybudget/flaskapp/static/js/bom_items.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/bom_items_modal.js b/biweeklybudget/flaskapp/static/js/bom_items_modal.js index 6cb28dac..71db5856 100644 --- a/biweeklybudget/flaskapp/static/js/bom_items_modal.js +++ b/biweeklybudget/flaskapp/static/js/bom_items_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/budget_charts.js b/biweeklybudget/flaskapp/static/js/budget_charts.js index 50dc1919..49d25e9b 100644 --- a/biweeklybudget/flaskapp/static/js/budget_charts.js +++ b/biweeklybudget/flaskapp/static/js/budget_charts.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/budget_transfer_modal.js b/biweeklybudget/flaskapp/static/js/budget_transfer_modal.js index 7a496369..ec8ff2ac 100644 --- a/biweeklybudget/flaskapp/static/js/budget_transfer_modal.js +++ b/biweeklybudget/flaskapp/static/js/budget_transfer_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/budgets.js b/biweeklybudget/flaskapp/static/js/budgets.js index 4d283223..3732ef0e 100644 --- a/biweeklybudget/flaskapp/static/js/budgets.js +++ b/biweeklybudget/flaskapp/static/js/budgets.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/budgets_modal.js b/biweeklybudget/flaskapp/static/js/budgets_modal.js index ded44242..8c014d85 100644 --- a/biweeklybudget/flaskapp/static/js/budgets_modal.js +++ b/biweeklybudget/flaskapp/static/js/budgets_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/creditPayoffErrorModal.js b/biweeklybudget/flaskapp/static/js/creditPayoffErrorModal.js index 48f0c006..e279e391 100644 --- a/biweeklybudget/flaskapp/static/js/creditPayoffErrorModal.js +++ b/biweeklybudget/flaskapp/static/js/creditPayoffErrorModal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/credit_payoffs.js b/biweeklybudget/flaskapp/static/js/credit_payoffs.js index 1f9cb52d..52af05f5 100644 --- a/biweeklybudget/flaskapp/static/js/credit_payoffs.js +++ b/biweeklybudget/flaskapp/static/js/credit_payoffs.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/custom.js b/biweeklybudget/flaskapp/static/js/custom.js index 7d4ae622..12c6571e 100644 --- a/biweeklybudget/flaskapp/static/js/custom.js +++ b/biweeklybudget/flaskapp/static/js/custom.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/formBuilder.js b/biweeklybudget/flaskapp/static/js/formBuilder.js index ad54e243..48424c9a 100644 --- a/biweeklybudget/flaskapp/static/js/formBuilder.js +++ b/biweeklybudget/flaskapp/static/js/formBuilder.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/forms.js b/biweeklybudget/flaskapp/static/js/forms.js index 9c5169a0..11b348d7 100644 --- a/biweeklybudget/flaskapp/static/js/forms.js +++ b/biweeklybudget/flaskapp/static/js/forms.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/fuel.js b/biweeklybudget/flaskapp/static/js/fuel.js index 611ab672..ee469d26 100644 --- a/biweeklybudget/flaskapp/static/js/fuel.js +++ b/biweeklybudget/flaskapp/static/js/fuel.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/fuel_charts.js b/biweeklybudget/flaskapp/static/js/fuel_charts.js index a7278224..c4782bed 100644 --- a/biweeklybudget/flaskapp/static/js/fuel_charts.js +++ b/biweeklybudget/flaskapp/static/js/fuel_charts.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/index.js b/biweeklybudget/flaskapp/static/js/index.js index 9a6c9457..e4a21585 100644 --- a/biweeklybudget/flaskapp/static/js/index.js +++ b/biweeklybudget/flaskapp/static/js/index.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/ofx.js b/biweeklybudget/flaskapp/static/js/ofx.js index 9d373d12..f1ce223e 100644 --- a/biweeklybudget/flaskapp/static/js/ofx.js +++ b/biweeklybudget/flaskapp/static/js/ofx.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/payperiod_modal.js b/biweeklybudget/flaskapp/static/js/payperiod_modal.js index 1b123c59..d102581f 100644 --- a/biweeklybudget/flaskapp/static/js/payperiod_modal.js +++ b/biweeklybudget/flaskapp/static/js/payperiod_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/projects.js b/biweeklybudget/flaskapp/static/js/projects.js index b87a0705..b7d4b53c 100644 --- a/biweeklybudget/flaskapp/static/js/projects.js +++ b/biweeklybudget/flaskapp/static/js/projects.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/reconcile.js b/biweeklybudget/flaskapp/static/js/reconcile.js index d2b4cbc5..6e2501d8 100644 --- a/biweeklybudget/flaskapp/static/js/reconcile.js +++ b/biweeklybudget/flaskapp/static/js/reconcile.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/reconcile_modal.js b/biweeklybudget/flaskapp/static/js/reconcile_modal.js index 15c9b541..a9cac090 100644 --- a/biweeklybudget/flaskapp/static/js/reconcile_modal.js +++ b/biweeklybudget/flaskapp/static/js/reconcile_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/scheduled.js b/biweeklybudget/flaskapp/static/js/scheduled.js index 3ffaf210..74b523ee 100644 --- a/biweeklybudget/flaskapp/static/js/scheduled.js +++ b/biweeklybudget/flaskapp/static/js/scheduled.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/scheduled_modal.js b/biweeklybudget/flaskapp/static/js/scheduled_modal.js index f4454301..e78a9f4d 100644 --- a/biweeklybudget/flaskapp/static/js/scheduled_modal.js +++ b/biweeklybudget/flaskapp/static/js/scheduled_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/static/js/transactions.js b/biweeklybudget/flaskapp/static/js/transactions.js index 598002ad..dfa1e88d 100644 --- a/biweeklybudget/flaskapp/static/js/transactions.js +++ b/biweeklybudget/flaskapp/static/js/transactions.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -114,6 +114,20 @@ $(document).ready(function() { } } }, + { + data: "sales_tax", + "render": function(data, type, row) { + if(type === "display" || type === "filter") { + if(data === null || data === '' || data === 0) { + return ' '; + } else { + return fmt_currency(data); + } + } else { + return data; + } + } + }, { data: "reconcile_id", "render": function(data, type, row) { diff --git a/biweeklybudget/flaskapp/static/js/transactions_modal.js b/biweeklybudget/flaskapp/static/js/transactions_modal.js index 7ec72330..25eb42d4 100644 --- a/biweeklybudget/flaskapp/static/js/transactions_modal.js +++ b/biweeklybudget/flaskapp/static/js/transactions_modal.js @@ -3,7 +3,7 @@ The latest version of this package is available at: ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -46,6 +46,7 @@ function transModalDivForm() { .addHidden('trans_frm_id', 'id', '') .addDatePicker('trans_frm_date', 'date', 'Date') .addCurrency('trans_frm_amount', 'amount', 'Amount', { helpBlock: 'Transaction amount (positive for expenses, negative for income).' }) + .addCurrency('trans_frm_sales_tax', 'sales_tax', 'Sales Tax', { helpBlock: 'Sales tax paid on this transaction (default 0.0).' }) .addText('trans_frm_description', 'description', 'Description') .addLabelToValueSelect('trans_frm_account', 'account', 'Account', acct_names_to_id, 'None', true) .addCheckbox( @@ -79,6 +80,7 @@ function transModalDivFillAndShow(msg) { $('#trans_frm_description').val(msg['description']); $('#trans_frm_date').val(msg['date']['str']); $('#trans_frm_amount').val(msg['actual_amount']); + $('#trans_frm_sales_tax').val(msg['sales_tax']); $('#trans_frm_account option[value=' + msg['account_id'] + ']').prop('selected', 'selected').change(); $('#trans_frm_notes').val(msg['notes']); if(msg['transfer_id'] !== null) { diff --git a/biweeklybudget/flaskapp/templates/transactions.html b/biweeklybudget/flaskapp/templates/transactions.html index 9ad0ae43..497e14dc 100644 --- a/biweeklybudget/flaskapp/templates/transactions.html +++ b/biweeklybudget/flaskapp/templates/transactions.html @@ -40,6 +40,7 @@ Budget Scheduled? Budgeted Amount + Sales Tax Reconciled? @@ -52,6 +53,7 @@ Budget Scheduled? Budgeted Amount + Sales Tax Reconciled? diff --git a/biweeklybudget/flaskapp/views/__init__.py b/biweeklybudget/flaskapp/views/__init__.py index 2fe0b9ed..0bdb7813 100644 --- a/biweeklybudget/flaskapp/views/__init__.py +++ b/biweeklybudget/flaskapp/views/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/accounts.py b/biweeklybudget/flaskapp/views/accounts.py index dd86f459..e5086aaa 100644 --- a/biweeklybudget/flaskapp/views/accounts.py +++ b/biweeklybudget/flaskapp/views/accounts.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/budgets.py b/biweeklybudget/flaskapp/views/budgets.py index afc9311d..87ce456c 100644 --- a/biweeklybudget/flaskapp/views/budgets.py +++ b/biweeklybudget/flaskapp/views/budgets.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/credit_payoffs.py b/biweeklybudget/flaskapp/views/credit_payoffs.py index 5f9780c8..56108b1e 100644 --- a/biweeklybudget/flaskapp/views/credit_payoffs.py +++ b/biweeklybudget/flaskapp/views/credit_payoffs.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/example.py b/biweeklybudget/flaskapp/views/example.py index 8b4efe05..93f481af 100644 --- a/biweeklybudget/flaskapp/views/example.py +++ b/biweeklybudget/flaskapp/views/example.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/formhandlerview.py b/biweeklybudget/flaskapp/views/formhandlerview.py index a1513a00..30b747bb 100644 --- a/biweeklybudget/flaskapp/views/formhandlerview.py +++ b/biweeklybudget/flaskapp/views/formhandlerview.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/fuel.py b/biweeklybudget/flaskapp/views/fuel.py index 61805c1d..0ded0ce7 100644 --- a/biweeklybudget/flaskapp/views/fuel.py +++ b/biweeklybudget/flaskapp/views/fuel.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/help.py b/biweeklybudget/flaskapp/views/help.py index c6a070b4..5aa8aa7a 100644 --- a/biweeklybudget/flaskapp/views/help.py +++ b/biweeklybudget/flaskapp/views/help.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/index.py b/biweeklybudget/flaskapp/views/index.py index 89c89c1a..44a63b36 100644 --- a/biweeklybudget/flaskapp/views/index.py +++ b/biweeklybudget/flaskapp/views/index.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/ofx.py b/biweeklybudget/flaskapp/views/ofx.py index db888829..d3444d40 100644 --- a/biweeklybudget/flaskapp/views/ofx.py +++ b/biweeklybudget/flaskapp/views/ofx.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/payperiods.py b/biweeklybudget/flaskapp/views/payperiods.py index 6cbc9d55..f7f414c4 100644 --- a/biweeklybudget/flaskapp/views/payperiods.py +++ b/biweeklybudget/flaskapp/views/payperiods.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/plaid.py b/biweeklybudget/flaskapp/views/plaid.py index 6aabd7ad..98ada9b0 100644 --- a/biweeklybudget/flaskapp/views/plaid.py +++ b/biweeklybudget/flaskapp/views/plaid.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/projects.py b/biweeklybudget/flaskapp/views/projects.py index b606b82d..bce63f58 100644 --- a/biweeklybudget/flaskapp/views/projects.py +++ b/biweeklybudget/flaskapp/views/projects.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/reconcile.py b/biweeklybudget/flaskapp/views/reconcile.py index 18efe8e3..b3ebd90c 100644 --- a/biweeklybudget/flaskapp/views/reconcile.py +++ b/biweeklybudget/flaskapp/views/reconcile.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/scheduled.py b/biweeklybudget/flaskapp/views/scheduled.py index 2c1fb34c..9dad19ba 100644 --- a/biweeklybudget/flaskapp/views/scheduled.py +++ b/biweeklybudget/flaskapp/views/scheduled.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/searchableajaxview.py b/biweeklybudget/flaskapp/views/searchableajaxview.py index 3b201150..66e18279 100644 --- a/biweeklybudget/flaskapp/views/searchableajaxview.py +++ b/biweeklybudget/flaskapp/views/searchableajaxview.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/flaskapp/views/transactions.py b/biweeklybudget/flaskapp/views/transactions.py index e9021c34..2a652b6a 100644 --- a/biweeklybudget/flaskapp/views/transactions.py +++ b/biweeklybudget/flaskapp/views/transactions.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -165,7 +165,7 @@ def _filterhack(self, qs, s, args): def get(self): """ - Render and return JSON response for GET /ajax/ofx + Render and return JSON response for GET /ajax/transactions """ args = request.args.to_dict() args_dict = self._args_dict(args) @@ -196,6 +196,11 @@ def get(self): ( 'budgeted_amount' ), + ( + 'sales_tax', + 'sales_tax', + lambda a: float(a.sales_tax) + ), ( 'reconcile_id', 'reconcile', @@ -358,6 +363,10 @@ def submit(self, data): trans.date = datetime.strptime(data['date'], '%Y-%m-%d').date() trans.account_id = int(data['account']) trans.notes = data['notes'].strip() + if data['sales_tax'].strip() != '': + trans.sales_tax = Decimal(data['sales_tax']) + else: + trans.sales_tax = Decimal('0.0') budg_amts = {} for bid, budg_amt in data['budgets'].items(): budg = db_session.query(Budget).get(int(bid)) diff --git a/biweeklybudget/flaskapp/views/utils.py b/biweeklybudget/flaskapp/views/utils.py index be05831d..2c2351fa 100644 --- a/biweeklybudget/flaskapp/views/utils.py +++ b/biweeklybudget/flaskapp/views/utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/initdb.py b/biweeklybudget/initdb.py index 123dbae0..649f815c 100644 --- a/biweeklybudget/initdb.py +++ b/biweeklybudget/initdb.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/interest.py b/biweeklybudget/interest.py index 84afc113..2d52cca9 100644 --- a/biweeklybudget/interest.py +++ b/biweeklybudget/interest.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/load_data.py b/biweeklybudget/load_data.py index 237e5301..596cf5a3 100644 --- a/biweeklybudget/load_data.py +++ b/biweeklybudget/load_data.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/__init__.py b/biweeklybudget/models/__init__.py index 4f79baf5..b711330d 100644 --- a/biweeklybudget/models/__init__.py +++ b/biweeklybudget/models/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/account.py b/biweeklybudget/models/account.py index be3264d4..7eee907b 100644 --- a/biweeklybudget/models/account.py +++ b/biweeklybudget/models/account.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/account_balance.py b/biweeklybudget/models/account_balance.py index c7fbe70f..19ddd303 100644 --- a/biweeklybudget/models/account_balance.py +++ b/biweeklybudget/models/account_balance.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/base.py b/biweeklybudget/models/base.py index f87b460d..9b8fe5ea 100644 --- a/biweeklybudget/models/base.py +++ b/biweeklybudget/models/base.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/budget_model.py b/biweeklybudget/models/budget_model.py index 4520f04b..07127ec6 100644 --- a/biweeklybudget/models/budget_model.py +++ b/biweeklybudget/models/budget_model.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/budget_transaction.py b/biweeklybudget/models/budget_transaction.py index 50436113..a1c346a6 100644 --- a/biweeklybudget/models/budget_transaction.py +++ b/biweeklybudget/models/budget_transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/dbsetting.py b/biweeklybudget/models/dbsetting.py index 39cf47c2..ef6595b3 100644 --- a/biweeklybudget/models/dbsetting.py +++ b/biweeklybudget/models/dbsetting.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/fuel.py b/biweeklybudget/models/fuel.py index 408457a9..e3cbedfc 100644 --- a/biweeklybudget/models/fuel.py +++ b/biweeklybudget/models/fuel.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/ofx_statement.py b/biweeklybudget/models/ofx_statement.py index 874cdff1..510aef59 100644 --- a/biweeklybudget/models/ofx_statement.py +++ b/biweeklybudget/models/ofx_statement.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/ofx_transaction.py b/biweeklybudget/models/ofx_transaction.py index 926f7bc4..eda89f02 100644 --- a/biweeklybudget/models/ofx_transaction.py +++ b/biweeklybudget/models/ofx_transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/plaid_accounts.py b/biweeklybudget/models/plaid_accounts.py index d156b377..7e61df81 100644 --- a/biweeklybudget/models/plaid_accounts.py +++ b/biweeklybudget/models/plaid_accounts.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/plaid_items.py b/biweeklybudget/models/plaid_items.py index aa1369ca..2e1a8538 100644 --- a/biweeklybudget/models/plaid_items.py +++ b/biweeklybudget/models/plaid_items.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/projects.py b/biweeklybudget/models/projects.py index 90d9ba82..61fef38b 100644 --- a/biweeklybudget/models/projects.py +++ b/biweeklybudget/models/projects.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2017 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/reconcile_rule.py b/biweeklybudget/models/reconcile_rule.py index 34edea52..3afd2c1b 100644 --- a/biweeklybudget/models/reconcile_rule.py +++ b/biweeklybudget/models/reconcile_rule.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/scheduled_transaction.py b/biweeklybudget/models/scheduled_transaction.py index dc2530dc..91bcfb45 100644 --- a/biweeklybudget/models/scheduled_transaction.py +++ b/biweeklybudget/models/scheduled_transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/transaction.py b/biweeklybudget/models/transaction.py index 0f51abc0..67403793 100644 --- a/biweeklybudget/models/transaction.py +++ b/biweeklybudget/models/transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -131,6 +131,11 @@ class Transaction(Base, ModelAsDict): "Transaction", remote_side=[id], post_update=True, uselist=False ) + #: Amount of sales tax paid on this transaction. + sales_tax = Column( + Numeric(precision=10, scale=4), nullable=False, default=0.0 + ) + def __init__(self, **kwargs): """ Custom constructor for Transaction class to allow setting/syncing diff --git a/biweeklybudget/models/txn_reconcile.py b/biweeklybudget/models/txn_reconcile.py index edcbb95f..fe9235a7 100644 --- a/biweeklybudget/models/txn_reconcile.py +++ b/biweeklybudget/models/txn_reconcile.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/models/utils.py b/biweeklybudget/models/utils.py index 4492320d..cc505ff2 100644 --- a/biweeklybudget/models/utils.py +++ b/biweeklybudget/models/utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/ofxapi/__init__.py b/biweeklybudget/ofxapi/__init__.py index a4875093..343dedbf 100644 --- a/biweeklybudget/ofxapi/__init__.py +++ b/biweeklybudget/ofxapi/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/ofxapi/exceptions.py b/biweeklybudget/ofxapi/exceptions.py index aa23f016..d628ed96 100644 --- a/biweeklybudget/ofxapi/exceptions.py +++ b/biweeklybudget/ofxapi/exceptions.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/ofxapi/local.py b/biweeklybudget/ofxapi/local.py index cb81b254..95ba09cd 100644 --- a/biweeklybudget/ofxapi/local.py +++ b/biweeklybudget/ofxapi/local.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/ofxapi/remote.py b/biweeklybudget/ofxapi/remote.py index 5f7db3ad..df39895b 100644 --- a/biweeklybudget/ofxapi/remote.py +++ b/biweeklybudget/ofxapi/remote.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/ofxgetter.py b/biweeklybudget/ofxgetter.py index 59ddcfd7..2e6462fc 100755 --- a/biweeklybudget/ofxgetter.py +++ b/biweeklybudget/ofxgetter.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/plaid_updater.py b/biweeklybudget/plaid_updater.py index 659acb7c..ce775a43 100644 --- a/biweeklybudget/plaid_updater.py +++ b/biweeklybudget/plaid_updater.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/prime_rate.py b/biweeklybudget/prime_rate.py index 82894062..866940bb 100644 --- a/biweeklybudget/prime_rate.py +++ b/biweeklybudget/prime_rate.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/screenscraper.py b/biweeklybudget/screenscraper.py index 5c6d5d60..ce6c9204 100644 --- a/biweeklybudget/screenscraper.py +++ b/biweeklybudget/screenscraper.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/settings.py b/biweeklybudget/settings.py index 87e0377f..cd36e398 100644 --- a/biweeklybudget/settings.py +++ b/biweeklybudget/settings.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/settings_example.py b/biweeklybudget/settings_example.py index 7934abaf..3fd62990 100644 --- a/biweeklybudget/settings_example.py +++ b/biweeklybudget/settings_example.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/__init__.py b/biweeklybudget/tests/__init__.py index 2a352084..c7d5bdcc 100644 --- a/biweeklybudget/tests/__init__.py +++ b/biweeklybudget/tests/__init__.py @@ -3,7 +3,7 @@ ################################################################################## -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/__init__.py b/biweeklybudget/tests/acceptance/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/acceptance/__init__.py +++ b/biweeklybudget/tests/acceptance/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/__init__.py b/biweeklybudget/tests/acceptance/flaskapp/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/__init__.py +++ b/biweeklybudget/tests/acceptance/flaskapp/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/__init__.py b/biweeklybudget/tests/acceptance/flaskapp/views/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/__init__.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_accounts.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_accounts.py index 5f8f7e8a..fa363f4a 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_accounts.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_accounts.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_base_template.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_base_template.py index caa305c8..30ac16ce 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_base_template.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_base_template.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_budgets.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_budgets.py index a98a5a2e..7cb73938 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_budgets.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_budgets.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_credit_payoffs.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_credit_payoffs.py index d0129b7d..fa859203 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_credit_payoffs.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_credit_payoffs.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_fuel.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_fuel.py index 856cd018..583afa93 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_fuel.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_fuel.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_index.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_index.py index f7dc70da..5b4ff939 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_index.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_index.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_ofx.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_ofx.py index 3128f296..0026245a 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_ofx.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_ofx.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_payperiods.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_payperiods.py index 43279b1c..68a6fd0c 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_payperiods.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_payperiods.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_plaid.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_plaid.py index 206c7739..426e296a 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_plaid.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_plaid.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_projects.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_projects.py index 0516a536..60e8a8d7 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_projects.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_projects.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_reconcile.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_reconcile.py index 07d7aa51..ebb69b84 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_reconcile.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_reconcile.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_scheduled.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_scheduled.py index 7dca9795..975e0b54 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_scheduled.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_scheduled.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -39,6 +39,7 @@ from datetime import timedelta, date from selenium.webdriver.support.ui import Select from decimal import Decimal +from time import sleep from biweeklybudget.utils import dtnow from biweeklybudget.tests.acceptance_helpers import AcceptanceHelper @@ -238,6 +239,7 @@ def test_search(self, selenium): '//input[@type="search"]' ) search.send_keys('ST3') + sleep(3) # yeah, yeah, I know... table = self.retry_stale( selenium.find_element_by_id, 'table-scheduled-txn' diff --git a/biweeklybudget/tests/acceptance/flaskapp/views/test_transactions.py b/biweeklybudget/tests/acceptance/flaskapp/views/test_transactions.py index d53f782b..2d1057dd 100644 --- a/biweeklybudget/tests/acceptance/flaskapp/views/test_transactions.py +++ b/biweeklybudget/tests/acceptance/flaskapp/views/test_transactions.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -98,6 +98,7 @@ def test_table(self, selenium): 'Periodic1 (1)', 'Yes (1)', '$111.11', + '', 'Yes (1)' ], [ @@ -108,6 +109,7 @@ def test_table(self, selenium): 'Standing1 (4)', 'Yes (3)', '', + '', '' ], [ @@ -118,6 +120,7 @@ def test_table(self, selenium): 'Periodic2 (2)', '', '', + '$12.34', '' ], [ @@ -128,6 +131,7 @@ def test_table(self, selenium): 'Periodic2 (2) ($222.22)\nPeriodic1 (1) ($100.10)', '', '', + '$34.56', '' ] ] @@ -137,7 +141,7 @@ def test_table(self, selenium): c[3].get_attribute('innerHTML'), c[4].get_attribute('innerHTML'), c[5].get_attribute('innerHTML'), - c[7].get_attribute('innerHTML') + c[8].get_attribute('innerHTML') ] for c in elems ] @@ -324,6 +328,7 @@ def test_0_verify_db(self, testdb): assert len(t.budget_transactions) == 1 assert t.budget_transactions[0].budget_id == 2 assert t.budget_transactions[0].amount == Decimal('222.22') + assert t.sales_tax == Decimal('12.34') def test_1_modal(self, base_url, selenium): self.baseurl = base_url @@ -338,6 +343,8 @@ def test_1_modal(self, base_url, selenium): dtnow() - timedelta(days=2)).date().strftime('%Y-%m-%d') assert body.find_element_by_id( 'trans_frm_amount').get_attribute('value') == '222.22' + assert body.find_element_by_id( + 'trans_frm_sales_tax').get_attribute('value') == '12.34' assert body.find_element_by_id( 'trans_frm_description').get_attribute('value') == 'T3' acct_sel = Select(body.find_element_by_id('trans_frm_account')) @@ -387,6 +394,7 @@ def test_00_simple_modal_verify_db(self, testdb): assert t.account_id == 2 assert t.scheduled_trans_id == 3 assert t.notes == 'notesT2' + assert t.sales_tax == Decimal('0.0') assert len(t.budget_transactions) == 1 assert t.budget_transactions[0].budget_id == 4 assert t.budget_transactions[0].amount == Decimal('-333.33') @@ -407,6 +415,8 @@ def test_01_simple_modal_modal_on_click(self, base_url, selenium): ).strftime('%Y-%m-%d') assert body.find_element_by_id( 'trans_frm_amount').get_attribute('value') == '-333.33' + assert body.find_element_by_id( + 'trans_frm_sales_tax').get_attribute('value') == '0' assert body.find_element_by_id( 'trans_frm_description').get_attribute('value') == 'T2' acct_sel = Select(body.find_element_by_id('trans_frm_account')) @@ -464,6 +474,9 @@ def test_02_simple_modal_modal_edit(self, base_url, selenium): budget_sel.select_by_value('5') notes = selenium.find_element_by_id('trans_frm_notes') notes.send_keys('edited') + tax = body.find_element_by_id('trans_frm_sales_tax') + tax.clear() + tax.send_keys('45.67') # submit the form selenium.find_element_by_id('modalSaveButton').click() self.wait_for_jquery_done(selenium) @@ -492,6 +505,7 @@ def test_03_simple_modal_verify_db(self, testdb): assert t.planned_budget_id == 4 assert t.scheduled_trans_id == 3 assert t.notes == 'notesT2edited' + assert t.sales_tax == Decimal('45.67') assert len(t.budget_transactions) == 1 assert t.budget_transactions[0].budget_id == 5 assert t.budget_transactions[0].amount == Decimal('-123.45') @@ -641,6 +655,7 @@ def test_23_modal_add_verify_db(self, testdb): assert t.planned_budget_id is None assert t.scheduled_trans_id is None assert t.notes == 'NewTransNotes' + assert t.sales_tax == Decimal('0.0') assert len(t.budget_transactions) == 1 assert t.budget_transactions[0].budget_id == 2 assert t.budget_transactions[0].amount == Decimal('123.45') @@ -679,6 +694,8 @@ def test_32_modal_add(self, base_url, selenium): budget_sel.select_by_value('5') notes = selenium.find_element_by_id('trans_frm_notes') notes.send_keys('NewTransNotes') + tax = selenium.find_element_by_id('trans_frm_sales_tax') + tax.send_keys('67.89') # submit the form selenium.find_element_by_id('modalSaveButton').click() self.wait_for_jquery_done(selenium) @@ -707,6 +724,7 @@ def test_33_verify_db(self, testdb): assert t.planned_budget_id is None assert t.scheduled_trans_id is None assert t.notes == 'NewTransNotes' + assert t.sales_tax == Decimal('67.89') assert len(t.budget_transactions) == 1 assert t.budget_transactions[0].budget_id == 5 assert t.budget_transactions[0].amount == Decimal('345.67') @@ -1163,6 +1181,7 @@ def test_01_verify_db(self, testdb): assert t.account_id == 3 assert t.scheduled_trans_id is None assert t.notes == 'notesT4split' + assert t.sales_tax == Decimal('34.56') assert {bt.budget_id: bt.amount for bt in t.budget_transactions} == { 1: Decimal('100.10'), 2: Decimal('222.22') @@ -1181,7 +1200,8 @@ def test_02_resave_transaction(self, base_url): 'budgets': { '2': '222.22', '1': '100.10' - } + }, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1202,6 +1222,7 @@ def test_03_verify_db(self, testdb): assert t.account_id == 3 assert t.scheduled_trans_id is None assert t.notes == 'notesT4split' + assert t.sales_tax == Decimal('34.56') assert {bt.budget_id: bt.amount for bt in t.budget_transactions} == { 1: Decimal('100.10'), 2: Decimal('222.22') @@ -1219,7 +1240,8 @@ def test_10_backend_validation_amounts(self, base_url): 'account': '3', 'budgets': { '2': '422.32' - } + }, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1235,7 +1257,8 @@ def test_10_backend_validation_amounts(self, base_url): 'date': [], 'description': [], 'id': [], - 'notes': [] + 'notes': [], + 'sales_tax': [] } } @@ -1252,7 +1275,8 @@ def test_11_backend_validation_amounts(self, base_url): 'budgets': { '1': '222.32', '2': '200.12' - } + }, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1268,7 +1292,8 @@ def test_11_backend_validation_amounts(self, base_url): 'date': [], 'description': [], 'id': [], - 'notes': [] + 'notes': [], + 'sales_tax': [] } } @@ -1282,7 +1307,8 @@ def test_12_backend_validation_no_budgets(self, base_url): 'description': 'T4split', 'notes': 'notesT4split', 'account': '3', - 'budgets': {} + 'budgets': {}, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1297,7 +1323,8 @@ def test_12_backend_validation_no_budgets(self, base_url): 'date': [], 'description': [], 'id': [], - 'notes': [] + 'notes': [], + 'sales_tax': [] } } @@ -1310,7 +1337,8 @@ def test_13_backend_validation_invalid_budget_id(self, base_url): 'description': 'T4split', 'notes': 'notesT4split', 'account': '3', - 'budgets': {'99': '322.32'} + 'budgets': {'99': '322.32'}, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1324,7 +1352,8 @@ def test_13_backend_validation_invalid_budget_id(self, base_url): ], 'date': [], 'description': [], - 'notes': [] + 'notes': [], + 'sales_tax': [] } } @@ -1337,7 +1366,8 @@ def test_14_backend_validation_inactive_budget(self, base_url): 'description': 'T4split', 'notes': 'notesT4split', 'account': '3', - 'budgets': {'3': '322.32'} + 'budgets': {'3': '322.32'}, + 'sales_tax': '34.56' } ) assert res.status_code == 200 @@ -1352,7 +1382,8 @@ def test_14_backend_validation_inactive_budget(self, base_url): ], 'date': [], 'description': [], - 'notes': [] + 'notes': [], + 'sales_tax': [] } } diff --git a/biweeklybudget/tests/acceptance/models/__init__.py b/biweeklybudget/tests/acceptance/models/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/acceptance/models/__init__.py +++ b/biweeklybudget/tests/acceptance/models/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/models/test_ofx_transaction.py b/biweeklybudget/tests/acceptance/models/test_ofx_transaction.py index cd20aa6a..2f20bf3a 100644 --- a/biweeklybudget/tests/acceptance/models/test_ofx_transaction.py +++ b/biweeklybudget/tests/acceptance/models/test_ofx_transaction.py @@ -1,6 +1,6 @@ """ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/test_0sane_test_settings.py b/biweeklybudget/tests/acceptance/test_0sane_test_settings.py index 9d6dc131..0160e666 100644 --- a/biweeklybudget/tests/acceptance/test_0sane_test_settings.py +++ b/biweeklybudget/tests/acceptance/test_0sane_test_settings.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/test_biweeklypayperiod.py b/biweeklybudget/tests/acceptance/test_biweeklypayperiod.py index d1a9b179..43172392 100644 --- a/biweeklybudget/tests/acceptance/test_biweeklypayperiod.py +++ b/biweeklybudget/tests/acceptance/test_biweeklypayperiod.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/test_db_event_handlers.py b/biweeklybudget/tests/acceptance/test_db_event_handlers.py index a9ed9b37..f33eec18 100644 --- a/biweeklybudget/tests/acceptance/test_db_event_handlers.py +++ b/biweeklybudget/tests/acceptance/test_db_event_handlers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/test_interest.py b/biweeklybudget/tests/acceptance/test_interest.py index 24747ede..4add45f8 100644 --- a/biweeklybudget/tests/acceptance/test_interest.py +++ b/biweeklybudget/tests/acceptance/test_interest.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance/test_plaidlink.py b/biweeklybudget/tests/acceptance/test_plaidlink.py index efbcaa86..ad52ea69 100644 --- a/biweeklybudget/tests/acceptance/test_plaidlink.py +++ b/biweeklybudget/tests/acceptance/test_plaidlink.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2022 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/acceptance_helpers.py b/biweeklybudget/tests/acceptance_helpers.py index ed3e44c4..cf2192c4 100644 --- a/biweeklybudget/tests/acceptance_helpers.py +++ b/biweeklybudget/tests/acceptance_helpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/conftest.py b/biweeklybudget/tests/conftest.py index 9110246a..594de81e 100644 --- a/biweeklybudget/tests/conftest.py +++ b/biweeklybudget/tests/conftest.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/docker_build.py b/biweeklybudget/tests/docker_build.py index 07304596..9fd6f5dd 100755 --- a/biweeklybudget/tests/docker_build.py +++ b/biweeklybudget/tests/docker_build.py @@ -19,7 +19,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -93,7 +93,7 @@ {copy} RUN /usr/local/bin/pip install virtualenv -RUN /usr/local/bin/virtualenv /app +RUN /usr/local/bin/virtualenv --system-site-packages /app RUN set -ex \ && apk add --no-cache \ fontconfig \ @@ -103,6 +103,7 @@ libxslt-dev \ tini \ git \ + py3-cryptography \ && apk add --no-cache --virtual .build-deps \ gcc \ libffi-dev \ diff --git a/biweeklybudget/tests/fixtures/__init__.py b/biweeklybudget/tests/fixtures/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/fixtures/__init__.py +++ b/biweeklybudget/tests/fixtures/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/fixtures/sampledata.py b/biweeklybudget/tests/fixtures/sampledata.py index bfc7c993..c0abb969 100644 --- a/biweeklybudget/tests/fixtures/sampledata.py +++ b/biweeklybudget/tests/fixtures/sampledata.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. @@ -284,7 +284,8 @@ def _transactions(self): notes='notesT1', account=self.accounts['BankOne']['account'], scheduled_trans=self.scheduled_transactions[0], - planned_budget=self.budgets['Periodic1'] + planned_budget=self.budgets['Periodic1'], + sales_tax=Decimal('0.0') ), Transaction( date=self.dt.date(), @@ -301,7 +302,8 @@ def _transactions(self): budget_amounts={self.budgets['Periodic2']: Decimal('222.22')}, description='T3', notes='notesT3', - account=self.accounts['CreditOne']['account'] + account=self.accounts['CreditOne']['account'], + sales_tax=Decimal('12.34') ), Transaction( date=(self.dt - timedelta(days=35)).date(), @@ -311,7 +313,8 @@ def _transactions(self): }, description='T4split', notes='notesT4split', - account=self.accounts['CreditOne']['account'] + account=self.accounts['CreditOne']['account'], + sales_tax=Decimal('34.56') ) ] for x in res: diff --git a/biweeklybudget/tests/fixtures/test_settings.py b/biweeklybudget/tests/fixtures/test_settings.py index 3561ace8..135f4615 100644 --- a/biweeklybudget/tests/fixtures/test_settings.py +++ b/biweeklybudget/tests/fixtures/test_settings.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/__init__.py b/biweeklybudget/tests/migrations/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/migrations/__init__.py +++ b/biweeklybudget/tests/migrations/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/alembic_helpers.py b/biweeklybudget/tests/migrations/alembic_helpers.py index d57a082d..4611a12e 100644 --- a/biweeklybudget/tests/migrations/alembic_helpers.py +++ b/biweeklybudget/tests/migrations/alembic_helpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/migration_test_helpers.py b/biweeklybudget/tests/migrations/migration_test_helpers.py index b91fbf8f..a039f1b5 100644 --- a/biweeklybudget/tests/migrations/migration_test_helpers.py +++ b/biweeklybudget/tests/migrations/migration_test_helpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/test_alembic_verify.py b/biweeklybudget/tests/migrations/test_alembic_verify.py index e3991933..d4ecfbd9 100644 --- a/biweeklybudget/tests/migrations/test_alembic_verify.py +++ b/biweeklybudget/tests/migrations/test_alembic_verify.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/test_migration_04e61490804b.py b/biweeklybudget/tests/migrations/test_migration_04e61490804b.py index 34e74ba1..c9191576 100644 --- a/biweeklybudget/tests/migrations/test_migration_04e61490804b.py +++ b/biweeklybudget/tests/migrations/test_migration_04e61490804b.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/migrations/test_migration_d01774fa3ae3.py b/biweeklybudget/tests/migrations/test_migration_d01774fa3ae3.py new file mode 100644 index 00000000..9acc2fca --- /dev/null +++ b/biweeklybudget/tests/migrations/test_migration_d01774fa3ae3.py @@ -0,0 +1,72 @@ +""" +The latest version of this package is available at: + + +################################################################################ +Copyright 2016-2024 Jason Antman + + This file is part of biweeklybudget, also known as biweeklybudget. + + biweeklybudget 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. + + biweeklybudget 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 biweeklybudget. If not, see . + +The Copyright and Authors attributions contained herein may not be removed or +otherwise altered, except to add the Author attribution of a contributor to +this work. (Additional Terms pursuant to Section 7b of the AGPL v3) +################################################################################ +While not legally required, I sincerely request that anyone who finds +bugs please submit them at or +to me via email, and that you send any contributions or improvements +either as a pull request on GitHub, or to me via email. +################################################################################ + +AUTHORS: +Jason Antman +################################################################################ +""" + +import pytest +import logging +from decimal import Decimal +from datetime import date + +from biweeklybudget.tests.migrations.migration_test_helpers import MigrationTest + +logger = logging.getLogger(__name__) + + +@pytest.mark.migrations +class TestAddSalesTaxField(MigrationTest): + """ + Test for revision d01774fa3ae3 + """ + + migration_rev = 'd01774fa3ae3' + + def data_setup(self, engine): + """method to setup sample data in empty tables""" + return + + def verify_before(self, engine): + """method to verify data before forward migration, and after reverse""" + conn = engine.connect() + columns = conn.execute('SELECT * FROM transactions WHERE 1=2;').keys() + conn.close() + assert 'sales_tax' not in columns + + def verify_after(self, engine): + """method to verify data after forward migration""" + conn = engine.connect() + columns = conn.execute('SELECT * FROM transactions WHERE 1=2;').keys() + conn.close() + assert 'sales_tax' in columns diff --git a/biweeklybudget/tests/selenium_helpers.py b/biweeklybudget/tests/selenium_helpers.py index a6e0416b..b98cb5d6 100644 --- a/biweeklybudget/tests/selenium_helpers.py +++ b/biweeklybudget/tests/selenium_helpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/sqlhelpers.py b/biweeklybudget/tests/sqlhelpers.py index c3346b3d..39e37265 100644 --- a/biweeklybudget/tests/sqlhelpers.py +++ b/biweeklybudget/tests/sqlhelpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/__init__.py b/biweeklybudget/tests/unit/__init__.py index 1cfb4f8f..5368e458 100644 --- a/biweeklybudget/tests/unit/__init__.py +++ b/biweeklybudget/tests/unit/__init__.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/flaskapp/test_notifications.py b/biweeklybudget/tests/unit/flaskapp/test_notifications.py index 8db0a83a..b00c40f0 100644 --- a/biweeklybudget/tests/unit/flaskapp/test_notifications.py +++ b/biweeklybudget/tests/unit/flaskapp/test_notifications.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/flaskapp/views/test_plaid.py b/biweeklybudget/tests/unit/flaskapp/views/test_plaid.py index 7cfd5d72..a45479c4 100644 --- a/biweeklybudget/tests/unit/flaskapp/views/test_plaid.py +++ b/biweeklybudget/tests/unit/flaskapp/views/test_plaid.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/flaskapp/views/test_utils.py b/biweeklybudget/tests/unit/flaskapp/views/test_utils.py index 108a0ad8..b7e14a7a 100644 --- a/biweeklybudget/tests/unit/flaskapp/views/test_utils.py +++ b/biweeklybudget/tests/unit/flaskapp/views/test_utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/models/test_ofx_transaction.py b/biweeklybudget/tests/unit/models/test_ofx_transaction.py index 494611e7..42c4f875 100644 --- a/biweeklybudget/tests/unit/models/test_ofx_transaction.py +++ b/biweeklybudget/tests/unit/models/test_ofx_transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/models/test_transaction.py b/biweeklybudget/tests/unit/models/test_transaction.py index c3c9c329..f82f76fe 100644 --- a/biweeklybudget/tests/unit/models/test_transaction.py +++ b/biweeklybudget/tests/unit/models/test_transaction.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/models/test_utils.py b/biweeklybudget/tests/unit/models/test_utils.py index 1587de21..4105caca 100644 --- a/biweeklybudget/tests/unit/models/test_utils.py +++ b/biweeklybudget/tests/unit/models/test_utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_0_sane_test_settings.py b/biweeklybudget/tests/unit/test_0_sane_test_settings.py index 0e1acd40..00c2e026 100644 --- a/biweeklybudget/tests/unit/test_0_sane_test_settings.py +++ b/biweeklybudget/tests/unit/test_0_sane_test_settings.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_1_disabled_tests.py b/biweeklybudget/tests/unit/test_1_disabled_tests.py index d98fbaba..01647f1b 100644 --- a/biweeklybudget/tests/unit/test_1_disabled_tests.py +++ b/biweeklybudget/tests/unit/test_1_disabled_tests.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_biweeklypayperiod.py b/biweeklybudget/tests/unit/test_biweeklypayperiod.py index 49d4cf40..5b883c44 100644 --- a/biweeklybudget/tests/unit/test_biweeklypayperiod.py +++ b/biweeklybudget/tests/unit/test_biweeklypayperiod.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_cliutils.py b/biweeklybudget/tests/unit/test_cliutils.py index 44045106..913fb229 100644 --- a/biweeklybudget/tests/unit/test_cliutils.py +++ b/biweeklybudget/tests/unit/test_cliutils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_interest.py b/biweeklybudget/tests/unit/test_interest.py index aab7754b..033af255 100644 --- a/biweeklybudget/tests/unit/test_interest.py +++ b/biweeklybudget/tests/unit/test_interest.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_plaid_updater.py b/biweeklybudget/tests/unit/test_plaid_updater.py index 6c725803..9d4285fe 100644 --- a/biweeklybudget/tests/unit/test_plaid_updater.py +++ b/biweeklybudget/tests/unit/test_plaid_updater.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2020 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_utils.py b/biweeklybudget/tests/unit/test_utils.py index 6a7cfa49..e14ebd09 100644 --- a/biweeklybudget/tests/unit/test_utils.py +++ b/biweeklybudget/tests/unit/test_utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit/test_version.py b/biweeklybudget/tests/unit/test_version.py index 08e06737..aefb500d 100644 --- a/biweeklybudget/tests/unit/test_version.py +++ b/biweeklybudget/tests/unit/test_version.py @@ -3,7 +3,7 @@ ################################################################################## -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/tests/unit_helpers.py b/biweeklybudget/tests/unit_helpers.py index 92cd58c1..79653d11 100644 --- a/biweeklybudget/tests/unit_helpers.py +++ b/biweeklybudget/tests/unit_helpers.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/utils.py b/biweeklybudget/utils.py index 56862495..ee5a3cd7 100644 --- a/biweeklybudget/utils.py +++ b/biweeklybudget/utils.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/vault.py b/biweeklybudget/vault.py index 7ad223d8..27659e08 100644 --- a/biweeklybudget/vault.py +++ b/biweeklybudget/vault.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/version.py b/biweeklybudget/version.py index 54c55b64..f59ef124 100644 --- a/biweeklybudget/version.py +++ b/biweeklybudget/version.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/biweeklybudget/wishlist2project.py b/biweeklybudget/wishlist2project.py index 02a1fa4c..21fefa3b 100644 --- a/biweeklybudget/wishlist2project.py +++ b/biweeklybudget/wishlist2project.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/dev/setup_test_db.py b/dev/setup_test_db.py index 8962f5fa..817a51ee 100644 --- a/dev/setup_test_db.py +++ b/dev/setup_test_db.py @@ -7,7 +7,7 @@ ################################################################################ -Copyright 2022 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/docs/make_jsdoc.py b/docs/make_jsdoc.py index ada31d3a..5a57cfe5 100755 --- a/docs/make_jsdoc.py +++ b/docs/make_jsdoc.py @@ -4,7 +4,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/docs/make_screenshots.py b/docs/make_screenshots.py index 789269d0..bdfd57a8 100644 --- a/docs/make_screenshots.py +++ b/docs/make_screenshots.py @@ -4,7 +4,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget. diff --git a/docs/source/conf.py b/docs/source/conf.py index 55a8104e..60f2e779 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,6 +16,7 @@ import os import re import glob +from datetime import datetime # to let sphinx find the actual source... sys.path.insert(0, os.path.abspath("../..")) from biweeklybudget.version import VERSION, PROJECT_URL @@ -71,9 +72,9 @@ master_doc = 'index' # General information about the project. -project = u'biweeklybudget' -copyright = u'2017 Jason Antman' -author = u'Jason Antman' +project = 'biweeklybudget' +copyright = f'{datetime.now().strftime("Y%")} Jason Antman' +author = 'Jason Antman' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/requirements.txt b/requirements.txt index 94ec13f5..a268cb06 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ babel==2.8.0 beautifulsoup4==4.8.2 cffi==1.15.1 click==7.0 -cryptography==2.8 +cryptography datatables==0.4.9 httplib2==0.17.0 humanize==0.5.1 @@ -26,7 +26,7 @@ lxml==4.9.1 nulltype==2.3.1 ofxhome==0.3.3 ofxparse==0.20 -packaging==22.0 +packaging plaid-python==11.3.0 pycparser==2.19 pyparsing==2.4.6 diff --git a/setup.py b/setup.py index f63b5160..fbad1010 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ ################################################################################ -Copyright 2016 Jason Antman +Copyright 2016-2024 Jason Antman This file is part of biweeklybudget, also known as biweeklybudget.