File indexing completed on 2024-05-19 16:15:31
0001 /* 0002 SPDX-FileCopyrightText: 2002-2017 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-FileCopyrightText: 2004 Kevin Tambascio <ktambascio@users.sourceforge.net> 0004 SPDX-FileCopyrightText: 2005-2006 Ace Jones <acejones@users.sourceforge.net> 0005 SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef MYMONEYSPLIT_P_H 0010 #define MYMONEYSPLIT_P_H 0011 0012 #include "mymoneysplit.h" 0013 0014 // ---------------------------------------------------------------------------- 0015 // QT Includes 0016 0017 #include <QString> 0018 #include <QDate> 0019 0020 // ---------------------------------------------------------------------------- 0021 // KDE Includes 0022 0023 // ---------------------------------------------------------------------------- 0024 // Project Includes 0025 0026 #include "mymoneyobject_p.h" 0027 #include "mymoneymoney.h" 0028 #include "mymoneytransaction.h" 0029 #include "mymoneyenums.h" 0030 0031 using namespace eMyMoney; 0032 0033 class MyMoneySplitPrivate : public MyMoneyObjectPrivate 0034 { 0035 0036 public: 0037 MyMoneySplitPrivate() : 0038 m_reconcileFlag(eMyMoney::Split::State::NotReconciled), 0039 m_isMatched(false) 0040 { 0041 } 0042 0043 /** 0044 * This member contains the ID of the payee 0045 */ 0046 QString m_payee; 0047 0048 /** 0049 * This member contains a list of the IDs of the tags 0050 */ 0051 QList<QString> m_tagList; 0052 0053 /** 0054 * This member contains the ID of the account 0055 */ 0056 QString m_account; 0057 0058 /** 0059 * This member contains the ID of the cost center 0060 */ 0061 QString m_costCenter; 0062 0063 /** 0064 */ 0065 MyMoneyMoney m_shares; 0066 0067 /** 0068 */ 0069 MyMoneyMoney m_value; 0070 0071 /** 0072 * If the quotient of m_shares divided by m_values is not the correct price 0073 * because of truncation, the price can be stored in this member. For display 0074 * purpose and transaction edit this value can be used by the application. 0075 */ 0076 MyMoneyMoney m_price; 0077 0078 QString m_memo; 0079 0080 /** 0081 * This member contains information about the reconciliation 0082 * state of the split. Possible values are 0083 * 0084 * @li NotReconciled 0085 * @li Cleared 0086 * @li Reconciled 0087 * @li Frozen 0088 * 0089 */ 0090 eMyMoney::Split::State m_reconcileFlag; 0091 0092 /** 0093 * In case the reconciliation flag is set to Reconciled or Frozen 0094 * this member contains the date of the reconciliation. 0095 */ 0096 QDate m_reconcileDate; 0097 0098 /** 0099 * The m_action member is an arbitrary string, but is intended to 0100 * be conveniently limited to a menu of selections such as 0101 * "Buy", "Sell", "Interest", etc. 0102 */ 0103 QString m_action; 0104 0105 /** 0106 * The m_number member is used to store a reference number to 0107 * the split supplied by the user (e.g. check number, etc.). 0108 */ 0109 QString m_number; 0110 0111 /** 0112 * This member keeps the bank's unique ID for the split, so we can 0113 * avoid duplicates. This is only used for electronic statement downloads. 0114 * 0115 * This should only be set on the split which refers to the account 0116 * that was downloaded. 0117 */ 0118 QString m_bankID; 0119 0120 /** 0121 * This member keeps a backward id to the transaction that this 0122 * split can be found in. It is the purpose of the MyMoneyTransaction 0123 * object to maintain this member variable. 0124 */ 0125 QString m_transactionId; 0126 0127 MyMoneyTransaction m_matchedTransaction; 0128 bool m_isMatched; 0129 0130 }; 0131 0132 #endif