|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Represents a bank account that has undergone a reconciliation process to ensure that its transactions are consistent with bank statements. More...
#include <Reconciliation.hpp>
Public Member Functions | |
| ReconciledBankAccount () | |
| Constructs an empty instance of a reconciled bank account, representing a default state for an unreconciled account. | |
| ReconciledBankAccount (BankAccount bankAccount, const pecunia::Currency ¤cy) | |
| Minimum value constructor. | |
| ReconciledBankAccount (BankAccount bankAccount, pecunia::Money balance, std::optional<::QDate > reconciledOn) | |
| Full initialisation constructor. | |
| ReconciledBankAccount (const ReconciledBankAccount &other) noexcept | |
| Copy constructor. | |
| ReconciledBankAccount (ReconciledBankAccount &&other) noexcept | |
| Move constructor, transferring ownership of all state from another instance without duplicating data. | |
| ~ReconciledBankAccount () noexcept | |
| Cleans up resources associated with a reconciled bank account instance. | |
| const pecunia::Money & | balance () const noexcept |
| An accessor to the amount of money in the bank account on the date reconciled. | |
| const BankAccount & | bankAccount () const noexcept |
| An accessor to the bank account that is reconciled. | |
| std::strong_ordering | operator<=> (const ReconciledBankAccount &other) const =default |
| ReconciledBankAccount & | operator= (const ReconciledBankAccount &other) noexcept |
| Copy assignment operator. | |
| ReconciledBankAccount & | operator= (ReconciledBankAccount &&other) noexcept |
| Move assignment operator. | |
| void | reconcile (const ::QDate &reconciledOn, const pecunia::Money &balance) |
| Updates the reconciled information. | |
| const std::optional<::QDate > & | reconciledOn () const noexcept |
| An accessor to the date the bank account was reconciled on. | |
Represents a bank account that has undergone a reconciliation process to ensure that its transactions are consistent with bank statements.
This class is designed to manage and reflect accurate financial records by verifying and reconciling transactions against external bank statements. It is particularly useful for financial reporting, auditing, and ensuring the integrity of account balances.
To use this class, provide the necessary details of the bank account and initiate reconciliation through the provided methods. Once reconciled, you can access the updated account state, balance, and any identified discrepancies.
| drn::banking::ReconciledBankAccount::ReconciledBankAccount | ( | ) |
Constructs an empty instance of a reconciled bank account, representing a default state for an unreconciled account.
This constructor initializes the reconciled bank account with default values, ensuring that no unnecessary data is loaded or manipulated. The default-constructed account allows you to safely proceed with further processes without pre-existing account data.
| drn::banking::ReconciledBankAccount::ReconciledBankAccount | ( | BankAccount | bankAccount, |
| const pecunia::Currency & | currency ) |
Minimum value constructor.
Initializes a bank account that is prepared for reconciliation by associating it with a specific currency. This constructor streamlines the setup process necessary to perform reconciliations by creating a baseline using the provided bank account details and a currency framework.
Use this constructor when you need to create a reconciled bank account efficiently with only the essential details like account and currency. Post-instantiation, you can proceed to manage reconciliations and examine the associated financial data.
| bankAccount | The initial bank account to be reconciled. |
| currency | The currency to associate with the bank account, ensuring all balances are denominated consistently. |
| drn::banking::ReconciledBankAccount::ReconciledBankAccount | ( | BankAccount | bankAccount, |
| pecunia::Money | balance, | ||
| std::optional<::QDate > | reconciledOn ) |
Full initialisation constructor.
This constructor initializes a bank account with its associated balance and an optional reconciliation date. It is particularly useful when you have precise information about an account's reconciled state and need to immediately create a usable object that reflects these details.
| bankAccount | The bank account being reconciled. |
| balance | The reconciled balance associated with the bank account. |
| reconciledOn | An optional date representing when the reconciliation occurred. |
|
noexcept |
Copy constructor.
This constructor creates a new instance as an exact copy of an existing one. It ensures that all internal data of the original object is preserved in the copy.
| other | The object to copy from. |
|
noexcept |
Move constructor, transferring ownership of all state from another instance without duplicating data.
This constructor allows efficient transfer of data from one instance to another, avoiding the overhead of copying. Use this when you need to transfer an already initialized reconciled bank account object into a new context without reinitializing or duplicating its contents.
| other | The instance whose state will be transferred. It will leave the source instance in a valid, but unspecified, state after the operation. |
|
noexcept |
Cleans up resources associated with a reconciled bank account instance.
|
nodiscardnoexcept |
An accessor to the amount of money in the bank account on the date reconciled.
|
nodiscardnoexcept |
An accessor to the bank account that is reconciled.
|
default |
|
noexcept |
Copy assignment operator.
| other | The object instance to copy its data from. |
|
noexcept |
Move assignment operator.
| other | The instance whose state will be transferred. It will leave the source instance in a valid, but unspecified, state after the operation. |
| void drn::banking::ReconciledBankAccount::reconcile | ( | const ::QDate & | reconciledOn, |
| const pecunia::Money & | balance ) |
Updates the reconciled information.
| BankError | When the date for reconciliation is in the past of the current reconciliation. |
| reconciledOn | The date for the new balance after a successful reconciliation. |
| balance | The new balance after reconciliation. |
|
nodiscardnoexcept |
An accessor to the date the bank account was reconciled on.