Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Budget split for transactions - implement split #178

Closed
30 tasks done
jantman opened this issue Feb 6, 2018 · 2 comments
Closed
30 tasks done

Budget split for transactions - implement split #178

jantman opened this issue Feb 6, 2018 · 2 comments
Milestone

Comments

@jantman
Copy link
Owner

jantman commented Feb 6, 2018

This is the second part of adding support for allocating a single transaction against multiple budgets. This must maintain the actual transaction amount (for OFX reconcile, etc.) but allow allocating that amount either to one budget, or split across multiple budgets.

The first part was done in #105 to update the models to use BudgetTransactions to associate a Transaction with a budget. Once that's done and verified, implement the pieces to allow splits, i.e. multiple budgets for a Transaction. OFX reconcile must still work, and allocated vs spent must still work as well.

Planning:

  • How to display transactions with split budgets on the various table and datatable views (i.e. payperiod, transactions, etc.).

Implementation:

  • Validation in the DB layer to ensure that all BudgetTransactions equal the amount of the parent Transaction. This is already done via Transaction.set_budget_amounts().
  • Ensure that everywhere we do calculations based on BudgetTransactions, we support splits
  • UI support for display of split transactions
  • UI support for splitting a transaction across multiple budgets, including editing of existing transactions.
    • Transaction modal and reconcile modal - populate with budget split - transactions view single txn ajax /ajax/transactions/ID
    • Transaction modal, form and backend - (/forms/transaction validation and /forms/transaction submission) and modal
    • Transaction modal - new transaction with budget split
      • Client-side validation of budget split amounts/total
    • Transaction modal - edit/save transaction that was already split (different budgets and/or amounts)
      • Client-side validation of budget split amounts/total
    • Transaction modal - edit/save transaction that was not previously split, now is
      • Client-side validation of budget split amounts/total
    • Transaction modal - edit/save transaction that was previously split, but isn't anymore
      • Client-side validation of budget split amounts/total
    • Verify (direct POST) backend validation of budget split amounts/total on existing Transaction
    • Verify (direct POST) backend validation of budget split amounts/total on new Transaction
    • When changing a txn from not split to split, select proper budget and set initial amount
    • On split txn, when a budget is selected and its amount is empty, set amount to the remaining from total
  • Grep flaskapp for budget_id and budget_name; be sure to remove any straggling uses
  • Add some split transactions to sampledata (ensure that overall amount doesn't change)
    • Update all acceptance tests for new budget sums for the payperiod
@jantman jantman added this to the 0.8.0 milestone Mar 4, 2018
@jantman jantman added the ready label Mar 4, 2018
@jantman
Copy link
Owner Author

jantman commented Mar 9, 2018

For display, I want to show the total amount as it is now, but if a transaction is split the Budget cell should show multiple budgets, one per line, with the amount against that budget in parentheses after the budget name/link.

jantman added a commit that referenced this issue Mar 11, 2018
jantman added a commit that referenced this issue Mar 11, 2018
jantman added a commit that referenced this issue Mar 11, 2018
…ble at point... Other element would receive the click' error
jantman added a commit that referenced this issue Mar 12, 2018
…ith timeout errors trying to get the modal
jantman added a commit that referenced this issue Mar 12, 2018
…ravisCI errors when clicking a JS link that triggers a modal
jantman added a commit that referenced this issue Mar 18, 2018
…sorting; disable ordering on budget column
jantman added a commit that referenced this issue Mar 24, 2018
jantman added a commit that referenced this issue Mar 24, 2018
…xes to use bool instead of 'true' string now that forms submit as JSON
jantman added a commit that referenced this issue Mar 24, 2018
jantman added a commit that referenced this issue Mar 24, 2018
@jantman jantman added in progress and removed ready labels Mar 25, 2018
jantman added a commit that referenced this issue Mar 25, 2018
jantman added a commit that referenced this issue Mar 25, 2018
jantman added a commit that referenced this issue Mar 25, 2018
jantman added a commit that referenced this issue Mar 25, 2018
Fixes #178 - UI support for budget splits
@jantman jantman reopened this Mar 25, 2018
@jantman
Copy link
Owner Author

jantman commented Jul 7, 2018

Released today in 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant