-
-
Notifications
You must be signed in to change notification settings - Fork 313
new(#6860), part 1: show scheduled transactions in mmCheckingPanel #6861
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
Conversation
replaced the "Schduled Transactions" checkbox (which had quite long text), with a wxBitmapToggleButton containing the RECURRING bitmap (same as in nav tree). i tested on macOS, according to wxWidgets manual this button is not available in all systems. please check. |
there is an error in static code analysis, about an initialization in |
new commit:
|
new commit: add dynamic tooltip on scheduled button (depending on its state). |
new commit: hide |
Replaced by #6981. |
This PR adds an option to include scheduled transactions in
mmCheckingPanel
, as proposed in #6860.Implementation
Declare struct
Fused_Transaction::Data
derived fromModel_Checking::Data
, which represents either a transaction or a single execution of a scheduled transaction. It contains the additional fieldsm_bdid
andm_repeat_num
. For a transaction,m_bdid
andm_repeat_num
are set to 0. For an execution of a scheduled transaction,m_bdid
is theBDID
of the original scheduled transaction,TRANSID
is set to 0,m_repeat_num
is the repetition number (starting from 1),TRANSDATE
is the date of execution (it may be different than theTRANSDATE
of the original scheduled transaction), and all other data fields are as if the scheduled transaction has been executed.Declare struct
Fused_Transaction::Full_Data
derived fromModel_Checking::Full_Data
, with the additional fieldsm_bdid
andm_repeat_num
. For an execution of a scheduled transaction,m_tags
is set to the tags of the original scheduled transaction, whilem_splits
contains the execution of the original scheduled transaction splits (withTRANSID
set to 0).Define
Model_Billsdeposits::unroll(r, end_date)
, which returns the list (vector) of execution dates for the scheduled transactionr
, untilend_date
. An optional argumentlimit
can be used in order to limit the number of executions.Extend the main loop in
mmCheckingPanel::filterTable()
to also process scheduled transactions. If scheduled transactions are disabled, the loop behavior and efficiency are the same as before. The vector of transactions and the executions of scheduled transactions are processed in parallel (they are both sorted by date), choosing the entry with the smaller date in each iteration (or choosing a transaction, if both have the same date).Interface changes
In the header (top) area of transactions panels, show the balance information above (closer to the title) and the controls below (closer to the main action area).
If all transactions are reconciled, then hide
Reconciled Bal
andDiff
, since they are redundant. If at least one transaction is not reconciled, showReconciled Bal
andDiff
, even if the difference is zero (this also serves as a warning to the user that there are unreconciled transactions).Additional changes
MENU_VIEW_*
toFILTER_ID_*
inmmcheckingpanel.h
.VIEW_TRANS_*_STR
fromconstants
. AddFILTER_STR
inmmcheckingpanel
.Model_Checking::Full_Data
constructors.This change is