summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/transfer.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/transfer.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/transfer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/qashmoney/transfer.cpp b/noncore/apps/qashmoney/transfer.cpp
index 568d584..c4bbaf9 100755
--- a/noncore/apps/qashmoney/transfer.cpp
+++ b/noncore/apps/qashmoney/transfer.cpp
@@ -24,26 +24,26 @@ void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int
24 sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); 24 sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 );
25 if ( atoi ( results [ 1 ] ) != 0 ) 25 if ( atoi ( results [ 1 ] ) != 0 )
26 { 26 {
27 char **results; 27 char **results;
28 sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 ); 28 sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 );
29 nextrowid = ( atoi ( results [ 1 ] ) ) - 1; 29 nextrowid = ( atoi ( results [ 1 ] ) ) - 1;
30 } 30 }
31 sqlite_exec_printf ( db, "insert into transfers values ( %i, %i, %i, %i, %i, %i, %i, 0, 0, %.2f, %i, 0, 0, 0, 0, 0, %i );", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, nextrowid ); 31 sqlite_exec_printf ( db, "insert into transfers values ( %i, %i, %i, %i, %i, %i, %i, 0, 0, %.2f, %i, 0, 0, 0, 0, 0, %i );", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, nextrowid );
32 } 32 }
33 33
34void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ) 34void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid )
35 { 35 {
36 sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i, 36 sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i,"
37 amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid ); 37 "amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid );
38 } 38 }
39 39
40void Transfer::deleteTransfer ( int transferid ) 40void Transfer::deleteTransfer ( int transferid )
41 { 41 {
42 sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid ); 42 sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid );
43 } 43 }
44 44
45void Transfer::deleteAllTransfers ( int accountid ) 45void Transfer::deleteAllTransfers ( int accountid )
46 { 46 {
47 sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid ); 47 sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid );
48 sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid ); 48 sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid );
49 } 49 }