summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/qashmoney/config.in4
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.pro8
-rwxr-xr-xnoncore/apps/qashmoney/transaction.cpp8
-rwxr-xr-xnoncore/apps/qashmoney/transfer.cpp4
-rw-r--r--packages1
5 files changed, 19 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 @@
+ config QASHMONEY
+ boolean "opie-qashmoney (money manager)"
+ default "n"
+ 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
@@ -16,26 +16,34 @@ HEADERS = qashmoney.h \
calculator.h \
datepicker.h \
budget.h \
budgetdisplay.h \
currency.h
SOURCES = qashmoney.cpp \
accountdisplay.cpp \
account.cpp \
transaction.cpp \
transactiondisplay.cpp \
newtransaction.cpp \
transfer.cpp \
transferdialog.cpp \
preferences.cpp \
preferencedialogs.cpp \
memory.cpp \
memorydialog.cpp \
newaccount.cpp \
calculator.cpp \
datepicker.cpp \
main.cpp \
budget.cpp \
budgetdisplay.cpp \
currency.cpp
+INCLUDEPATH = $(OPIEDIR)/include
+DEPENDPATH = $(OPIEDIR)/include
+
+DESTDIR = $(OPIEDIR)/bin
+
unix:LIBS += -lm
LIBS += -lqpe -lqte -lstdc++ -lsqlite
+
+include ( $(OPIEDIR)/include.pro )
+
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
@@ -4,56 +4,56 @@
// RESERVEDTWO REPRESENTS THE TRANSACTION DESCRIPTION
#include "transaction.h"
#include "account.h"
#include "transactiondisplay.h"
#include <stdlib.h>
#include <iostream.h>
extern Account *account;
extern Preferences *preferences;
Transaction::Transaction ()
{
tdb = sqlite_open ( "qmtransactions.db", 0, NULL );
}
Transaction::~Transaction ()
{
sqlite_close ( tdb );
}
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 )
{
- 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,
- 0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description );
+ 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, "
+ "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description );
}
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 )
{
- sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f,
- cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year,
+ sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f,"
+ "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year,
amount, cleared, budgetid, lineitemid, transactionid );
}
void Transaction::deleteTransaction ( int transid )
{
sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid );
}
void Transaction::deleteAllTransactions ( int accountid )
{
sqlite_exec_printf ( tdb, "delete from transactions where accountid = %i;", 0, 0, 0, accountid );
}
int Transaction::getAccountID ( int id )
{
char **results;
sqlite_get_table_printf ( tdb, "select accountid from transactions where transid= %i;", &results, NULL, NULL, NULL, id );
return atol ( results [ 1 ] );
}
int Transaction::getNumberOfTransactions ()
{
char **results;
sqlite_get_table ( tdb, "select count() from transactions;", &results, NULL, NULL, NULL );
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
@@ -12,50 +12,50 @@ Transfer::Transfer ()
db = sqlite_open ( "qmtransfers.db", 0, 0 );
}
Transfer::~Transfer ()
{
sqlite_close ( db );
}
void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared )
{
int nextrowid = -1;
char **results;
sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 );
if ( atoi ( results [ 1 ] ) != 0 )
{
char **results;
sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 );
nextrowid = ( atoi ( results [ 1 ] ) ) - 1;
}
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 );
}
void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid )
{
- sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i,
- amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid );
+ sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i,"
+ "amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid );
}
void Transfer::deleteTransfer ( int transferid )
{
sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid );
}
void Transfer::deleteAllTransfers ( int accountid )
{
sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid );
sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid );
}
int Transfer::getNumberOfTransfers ()
{
char **results;
sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 );
return atoi ( results [ 1 ] );
}
int Transfer::getNumberOfTransfers ( int accountid )
{
char **results;
sqlite_get_table_printf ( db, "select count() from transfers where fromaccount = %i;", &results, 0, 0, 0, accountid );
diff --git a/packages b/packages
index c48eee8..0e6340f 100644
--- a/packages
+++ b/packages
@@ -99,48 +99,49 @@ CONFIG_OAPP core/apps/oapp oapp.pro
CONFIG_OBEX core/applets/obex2 obex.pro
CONFIG_ODICT noncore/apps/odict odict.pro
CONFIG_OIPKG core/apps/oipkg oipkg.pro
CONFIG_OPIE-CONSOLE noncore/apps/opie-console opie-console.pro
CONFIG_OPIE-LOGIN core/opie-login opie-login.pro
CONFIG_OPIE-READER noncore/apps/opie-reader opie-reader.pro
CONFIG_OPIE-SH noncore/tools/opie-sh opie-sh.pro
CONFIG_OPIE-SHEET noncore/apps/opie-sheet opie-sheet.pro
CONFIG_OPIE-WRITE noncore/apps/opie-write opie-write.pro
CONFIG_OPIEALARM core/opiealarm
CONFIG_OPIEFTP noncore/net/opieftp opieftp.pro
CONFIG_OPIEIRC noncore/net/opieirc opieirc.pro
CONFIG_OPIEMAIL2 noncore/mail mail.pro
CONFIG_OPIEPLAYER core/multimedia/opieplayer opieplayer.pro
CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2 opieplayer2.pro
CONFIG_OPIE-RDESKTOP noncore/net/opierdesktop opierdesktop.pro
CONFIG_OPIEREC noncore/multimedia/opierec opierec.pro
CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/applet applet.pro
CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/manager manager.pro
CONFIG_OSEARCH core/pim/osearch osearch.pro
CONFIG_OXYGEN noncore/apps/oxygen oxygen.pro
CONFIG_PARASHOOT noncore/games/parashoot parashoot.pro
CONFIG_PICKBOARD inputmethods/pickboard pickboard.pro
CONFIG_QASTEROIDS noncore/games/qasteroids qasteroids.pro
+CONFIG_QASHMONEY noncore/apps/qashmoney qashmoney.pro
CONFIG_QCOP core/apps/qcop qcop.pro
CONFIG_QPDF noncore/graphics/qpdf qpdf.pro
CONFIG_QPDF2 noncore/graphics/qpdf2 qpdf2.pro
CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro
CONFIG_QWS core/qws qws.pro
CONFIG_REMOTE noncore/tools/remote remote.pro
CONFIG_RESTARTAPPLET core/applets/restartapplet restartapplet.pro
CONFIG_RESTARTAPPLET2 core/applets/restartapplet2 restartapplet2.pro
CONFIG_ROTATEAPPLET core/applets/rotateapplet rotateapplet.pro
CONFIG_ROTATION noncore/settings/rotation rotation.pro
CONFIG_RUNAPPLET core/applets/runapplet runapplet.pro
CONFIG_SCREENSHOTAPPLET core/applets/screenshotapplet screenshotapplet.pro
CONFIG_SECURITY core/settings/security security.pro
CONFIG_SFCAVE noncore/games/sfcave sfcave.pro
CONFIG_SFCAVE-SDL noncore/games/sfcave-sdl sfcave-sdl.pro
CONFIG_SHOWIMG noncore/multimedia/showimg showimg.pro
CONFIG_SIMPLE noncore/tools/calc2/simple simple.pro
CONFIG_SINGLE single single.pro
CONFIG_SNAKE noncore/games/snake snake.pro
CONFIG_SOLITAIRE noncore/games/solitaire solitaire.pro
CONFIG_SOUND noncore/settings/sound sound.pro
CONFIG_SSHKEYS noncore/settings/sshkeys sshkeys.pro
CONFIG_SUSPENDAPPLET core/applets/suspendapplet suspendapplet.pro
CONFIG_SYSINFO noncore/apps/sysinfo sysinfo.pro