-rw-r--r-- | noncore/apps/qashmoney/config.in | 4 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/qashmoney.pro | 8 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transaction.cpp | 8 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transfer.cpp | 4 |
4 files changed, 18 insertions, 6 deletions
diff --git a/noncore/apps/qashmoney/config.in b/noncore/apps/qashmoney/config.in new file mode 100644 index 0000000..94c39b6 --- a/dev/null +++ b/noncore/apps/qashmoney/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config QASHMONEY | ||
2 | boolean "opie-qashmoney (money manager)" | ||
3 | default "n" | ||
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | ||
diff --git a/noncore/apps/qashmoney/qashmoney.pro b/noncore/apps/qashmoney/qashmoney.pro index 1070767..8b4646a 100755 --- a/noncore/apps/qashmoney/qashmoney.pro +++ b/noncore/apps/qashmoney/qashmoney.pro | |||
@@ -32,10 +32,18 @@ SOURCES = qashmoney.cpp \ | |||
32 | memorydialog.cpp \ | 32 | memorydialog.cpp \ |
33 | newaccount.cpp \ | 33 | newaccount.cpp \ |
34 | calculator.cpp \ | 34 | calculator.cpp \ |
35 | datepicker.cpp \ | 35 | datepicker.cpp \ |
36 | main.cpp \ | 36 | main.cpp \ |
37 | budget.cpp \ | 37 | budget.cpp \ |
38 | budgetdisplay.cpp \ | 38 | budgetdisplay.cpp \ |
39 | currency.cpp | 39 | currency.cpp |
40 | INCLUDEPATH = $(OPIEDIR)/include | ||
41 | DEPENDPATH = $(OPIEDIR)/include | ||
42 | |||
43 | DESTDIR = $(OPIEDIR)/bin | ||
44 | |||
40 | unix:LIBS += -lm | 45 | unix:LIBS += -lm |
41 | LIBS += -lqpe -lqte -lstdc++ -lsqlite | 46 | LIBS += -lqpe -lqte -lstdc++ -lsqlite |
47 | |||
48 | include ( $(OPIEDIR)/include.pro ) | ||
49 | |||
diff --git a/noncore/apps/qashmoney/transaction.cpp b/noncore/apps/qashmoney/transaction.cpp index a3bd9e7..dcf46b1 100755 --- a/noncore/apps/qashmoney/transaction.cpp +++ b/noncore/apps/qashmoney/transaction.cpp | |||
@@ -20,24 +20,24 @@ Transaction::Transaction () | |||
20 | 20 | ||
21 | Transaction::~Transaction () | 21 | Transaction::~Transaction () |
22 | { | 22 | { |
23 | sqlite_close ( tdb ); | 23 | sqlite_close ( tdb ); |
24 | } | 24 | } |
25 | 25 | ||
26 | void Transaction::addTransaction ( QString description, QString payee, int accountid, int parentid, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid ) | 26 | void Transaction::addTransaction ( QString description, QString payee, int accountid, int parentid, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid ) |
27 | { | 27 | { |
28 | sqlite_exec_printf ( tdb, "insert into transactions values ( '%q', %i, %i, %i, %i, %i, %i, %.2f, %i, %i, 0, 0, 0, 0, 0, 0, %i, '%q', 0, | 28 | sqlite_exec_printf ( tdb, "insert into transactions values ( '%q', %i, %i, %i, %i, %i, %i, %.2f, %i, %i, 0, 0, 0, 0, 0, 0, %i, '%q', 0, " |
29 | 0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); | 29 | "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); |
30 | } | 30 | } |
31 | 31 | ||
32 | void Transaction::updateTransaction ( QString description, QString payee, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid, int transactionid ) | 32 | void Transaction::updateTransaction ( QString description, QString payee, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid, int transactionid ) |
33 | { | 33 | { |
34 | sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f, | 34 | sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f," |
35 | cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year, | 35 | "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year, |
36 | amount, cleared, budgetid, lineitemid, transactionid ); | 36 | amount, cleared, budgetid, lineitemid, transactionid ); |
37 | } | 37 | } |
38 | 38 | ||
39 | void Transaction::deleteTransaction ( int transid ) | 39 | void Transaction::deleteTransaction ( int transid ) |
40 | { | 40 | { |
41 | sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid ); | 41 | sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid ); |
42 | } | 42 | } |
43 | 43 | ||
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 | |||
@@ -28,18 +28,18 @@ void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int | |||
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 | ||
34 | void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ) | 34 | void 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 | ||
40 | void Transfer::deleteTransfer ( int transferid ) | 40 | void 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 | ||
45 | void Transfer::deleteAllTransfers ( int accountid ) | 45 | void Transfer::deleteAllTransfers ( int accountid ) |