summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/transfer.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/transfer.cpp') (more/less context) (show whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/transfer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/noncore/apps/qashmoney/transfer.cpp b/noncore/apps/qashmoney/transfer.cpp
index 77cbb4e..568d584 100755
--- a/noncore/apps/qashmoney/transfer.cpp
+++ b/noncore/apps/qashmoney/transfer.cpp
@@ -65,7 +65,7 @@ int Transfer::getNumberOfTransfers ( int accountid )
65 return transfers; 65 return transfers;
66 } 66 }
67 67
68void Transfer::displayTransfers ( QListView *listview, int accountid, bool children ) 68void Transfer::displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate )
69 { 69 {
70 int showcleared = preferences->getPreference ( 3 ); 70 int showcleared = preferences->getPreference ( 3 );
71 71
@@ -100,6 +100,7 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
100 QString yearstring = results [ counter + 2 ]; 100 QString yearstring = results [ counter + 2 ];
101 int year = yearstring.toInt (); 101 int year = yearstring.toInt ();
102 QString date = preferences->getDate ( year, month, day ); 102 QString date = preferences->getDate ( year, month, day );
103 QDate testdate ( year, month, day );
103 104
104 //construct the amount and id strings 105 //construct the amount and id strings
105 QString amount = results [ counter + 3 ]; 106 QString amount = results [ counter + 3 ];
@@ -112,6 +113,8 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
112 113
113 QString toaccount = account->getAccountName ( atol ( results [ counter + 6 ] ) ); 114 QString toaccount = account->getAccountName ( atol ( results [ counter + 6 ] ) );
114 115
116 if ( testdate >= displaydate || showcleared == 0 )
117 {
115 // display this transfer 118 // display this transfer
116 if ( account->getParentAccountID ( accountid ) == -1 ) 119 if ( account->getParentAccountID ( accountid ) == -1 )
117 { 120 {
@@ -127,7 +130,7 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
127 else 130 else
128 QListViewItem *item = new QListViewItem ( listview, date, transactionname, amount, id ); 131 QListViewItem *item = new QListViewItem ( listview, date, transactionname, amount, id );
129 } 132 }
130 133 }
131 counter = counter + 7; 134 counter = counter + 7;
132 } 135 }
133 136
@@ -163,6 +166,7 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
163 QString yearstring = toresults [ counter + 2 ]; 166 QString yearstring = toresults [ counter + 2 ];
164 int year = yearstring.toInt (); 167 int year = yearstring.toInt ();
165 QString date = preferences->getDate ( year, month, day ); 168 QString date = preferences->getDate ( year, month, day );
169 QDate testdate ( year, month, day );
166 170
167 //construct the amount and id strings 171 //construct the amount and id strings
168 QString amount = toresults [ counter + 3 ]; 172 QString amount = toresults [ counter + 3 ];
@@ -176,6 +180,8 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
176 180
177 QString fromaccount = account->getAccountName ( atol ( toresults [ counter + 5 ] ) ); 181 QString fromaccount = account->getAccountName ( atol ( toresults [ counter + 5 ] ) );
178 182
183 if ( testdate >= displaydate || showcleared == 0 )
184 {
179 // display this transfer 185 // display this transfer
180 if ( account->getParentAccountID ( accountid ) == -1 ) 186 if ( account->getParentAccountID ( accountid ) == -1 )
181 { 187 {
@@ -191,6 +197,7 @@ void Transfer::displayTransfers ( QListView *listview, int accountid, bool child
191 else 197 else
192 QListViewItem *item = new QListViewItem ( listview, date, transactionname, amount, id ); 198 QListViewItem *item = new QListViewItem ( listview, date, transactionname, amount, id );
193 } 199 }
200 }
194 201
195 counter = counter + 7; 202 counter = counter + 7;
196 } 203 }