Update database schema
Update translations Don't multiple account_amount at startup Use INERT or REPLACE in queries
This commit is contained in:
parent
20245fec2e
commit
12cc163459
|
@ -1,4 +1,4 @@
|
||||||
v0.3 (11/04/2012)
|
v0.3 (27/04/2012)
|
||||||
** User **
|
** User **
|
||||||
New interface in Qt
|
New interface in Qt
|
||||||
Use BDD file from .local/share/kisscount
|
Use BDD file from .local/share/kisscount
|
||||||
|
@ -10,13 +10,15 @@ v0.3 (11/04/2012)
|
||||||
Better auto completion for transfert operation (not two times the same operation completed)
|
Better auto completion for transfert operation (not two times the same operation completed)
|
||||||
|
|
||||||
** Dev **
|
** Dev **
|
||||||
Version 3 of database (account hidden item added)
|
Version 3 of database : account hidden item added, some id deleted, on delete constraints added
|
||||||
|
This version is not compatible with previous ones
|
||||||
|
|
||||||
** Bugs **
|
** Bugs **
|
||||||
Fix a bug in language settings
|
Fix a bug in language settings
|
||||||
Virtual transferts must not be considered as a debit
|
Virtual transferts must not be considered as a debit
|
||||||
Last account/category wasn't taken in account during search
|
Last account/category wasn't taken in account during search
|
||||||
|
New users have system language set instead of English
|
||||||
|
Account/Category modification are immediatly reported in other panels
|
||||||
|
|
||||||
v0.2 (04/07/2011)
|
v0.2 (04/07/2011)
|
||||||
Remove dependancies of libsqlite and libxml
|
Remove dependancies of libsqlite and libxml
|
||||||
|
|
|
@ -2,9 +2,9 @@ CREATE TABLE kisscount(db_version VARCHAR(20));
|
||||||
CREATE TABLE user (id INTEGER PRIMARY KEY, name VARCHAR(255), password VARCHAR(255));
|
CREATE TABLE user (id INTEGER PRIMARY KEY, name VARCHAR(255), password VARCHAR(255));
|
||||||
CREATE TABLE account(id INTEGER PRIMARY KEY, user REFERENCES user(id), name VARCHAR(255), number VARCHAR(255), shared CHAR(1), blocked CHAR(1), default_account CHAR(1), virtual CHAR(1), hidden CHAR(1));
|
CREATE TABLE account(id INTEGER PRIMARY KEY, user REFERENCES user(id), name VARCHAR(255), number VARCHAR(255), shared CHAR(1), blocked CHAR(1), default_account CHAR(1), virtual CHAR(1), hidden CHAR(1));
|
||||||
CREATE TABLE shared_account(account REFERENCES account(id), user REFERENCES user(id));
|
CREATE TABLE shared_account(account REFERENCES account(id), user REFERENCES user(id));
|
||||||
CREATE TABLE account_amount(id INTEGER PRIMARY KEY, account REFERENCES account(id), year INTEGER, month INTEGER, amount FLOAT);
|
CREATE TABLE account_amount(account REFERENCES account(id), year INTEGER, month INTEGER, amount FLOAT, PRIMARY KEY(account, year, month));
|
||||||
CREATE TABLE operation(id INTEGER PRIMARY KEY, parent REFERENCES operation(id), user REFERENCES user(id), account REFERENCES account(id), year INTEGER, month INTEGER, day INTEGER, amount FLOAT, description VARCHAR(255), category REFERENCES category(id), fix_cost CHAR(1), checked CHAR(1), formula VARCHAR(255), transfert REFERENCES operation(id), meta CHAR(1), virtual CHAR(1));
|
CREATE TABLE operation(id INTEGER PRIMARY KEY, parent REFERENCES operation(id), user REFERENCES user(id), account REFERENCES account(id) ON DELETE SET NULL, year INTEGER, month INTEGER, day INTEGER, amount FLOAT, description VARCHAR(255), category REFERENCES category(id) ON DELETE SET NULL, fix_cost CHAR(1), checked CHAR(1), formula VARCHAR(255), transfert REFERENCES operation(id), meta CHAR(1), virtual CHAR(1));
|
||||||
CREATE TABLE category(id INTEGER PRIMARY KEY, user REFERENCES user(id), parent REFERENCES category(id), name VARCHAR(255), backcolor VARCHAR(10), forecolor VARCHAR(10), font VARCHAR(255), fix_cost CHAR(1));
|
CREATE TABLE category(id INTEGER PRIMARY KEY, user REFERENCES user(id), parent REFERENCES category(id) ON DELETE SET NULL, name VARCHAR(255), backcolor VARCHAR(10), forecolor VARCHAR(10), font VARCHAR(255), fix_cost CHAR(1));
|
||||||
CREATE TABLE preference(id INTEGER PRIMARY KEY, user REFERENCES user(id), name VARCHAR(255), value VARCHAR(255));
|
CREATE TABLE preference(user REFERENCES user(id), name VARCHAR(255), value VARCHAR(255), PRIMARY KEY(user, name));
|
||||||
CREATE TABLE import_pattern(id INTEGER PRIMARY KEY, user REFERENCES user(id), description VARCHAR(255), pattern VARCHAR(255), account REFERENCES account(id), category REFERENCES category(id));
|
CREATE TABLE import_pattern(user REFERENCES user(id), description VARCHAR(255), pattern VARCHAR(255), account REFERENCES account(id), category REFERENCES category(id), PRIMARY KEY(user, description));
|
||||||
INSERT INTO kisscount ("db_version") VALUES ("3");
|
INSERT INTO kisscount ("db_version") VALUES ("3");
|
||||||
|
|
Binary file not shown.
|
@ -148,7 +148,7 @@ msgstr "Format de fichier non reconnu"
|
||||||
|
|
||||||
#: src/view/SnapshotsDialog.cpp:169
|
#: src/view/SnapshotsDialog.cpp:169
|
||||||
msgid "Are you sure want to come back to "
|
msgid "Are you sure want to come back to "
|
||||||
msgstr "ëtes vous sûr de vouloir revenir à "
|
msgstr "êtes vous sûr de vouloir revenir à "
|
||||||
|
|
||||||
#: src/view/SnapshotsDialog.cpp:137
|
#: src/view/SnapshotsDialog.cpp:137
|
||||||
#: src/view/PreferencesPanel.cpp:1090
|
#: src/view/PreferencesPanel.cpp:1090
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2012-03-20 20:58+0100\n"
|
"POT-Creation-Date: 2012-04-28 10:33+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -21,9 +21,9 @@ msgstr ""
|
||||||
msgid " - "
|
msgid " - "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/UsersDialog.cpp:120 src/view/PreferencesPanel.cpp:826
|
#: src/view/UsersDialog.cpp:123 src/view/PreferencesPanel.cpp:870
|
||||||
#: src/view/PreferencesPanel.cpp:846 src/view/PreferencesPanel.cpp:978
|
#: src/view/PreferencesPanel.cpp:893 src/view/PreferencesPanel.cpp:1027
|
||||||
#: src/view/PreferencesPanel.cpp:997 src/view/PreferencesPanel.cpp:1038
|
#: src/view/PreferencesPanel.cpp:1049 src/view/PreferencesPanel.cpp:1092
|
||||||
msgid " already exists"
|
msgid " already exists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@ msgstr ""
|
||||||
msgid " not found, aborting"
|
msgid " not found, aborting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:984
|
#: src/view/AccountPanel.cpp:1009
|
||||||
msgid " operations ?"
|
msgid " operations ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:1090
|
#: src/view/PreferencesPanel.cpp:1148
|
||||||
msgid " profil ?"
|
msgid " profil ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -85,23 +85,23 @@ msgstr ""
|
||||||
msgid "1 entry found"
|
msgid "1 entry found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:93 src/view/grid/GridAccount.cpp:72
|
#: src/view/SearchBanner.cpp:93 src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Account"
|
msgid "Account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:826 src/view/PreferencesPanel.cpp:846
|
#: src/view/PreferencesPanel.cpp:870 src/view/PreferencesPanel.cpp:893
|
||||||
msgid "Account "
|
msgid "Account "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:344
|
#: src/controller/KissCount.cpp:341
|
||||||
msgid "Account 1"
|
msgid "Account 1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/ImportPanel.cpp:64 src/view/AccountPanel.cpp:476
|
#: src/view/ImportPanel.cpp:64 src/view/AccountPanel.cpp:501
|
||||||
msgid "Account name"
|
msgid "Account name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:475
|
#: src/view/AccountPanel.cpp:500
|
||||||
msgid "Account number"
|
msgid "Account number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ msgstr ""
|
||||||
msgid "Accounts"
|
msgid "Accounts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:1200
|
#: src/view/AccountPanel.cpp:1244
|
||||||
msgid "Accounts updated until "
|
msgid "Accounts updated until "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ msgstr ""
|
||||||
msgid "Amount to"
|
msgid "Amount to"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:1205
|
#: src/view/AccountPanel.cpp:1249
|
||||||
msgid "Any account updated !"
|
msgid "Any account updated !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -137,12 +137,12 @@ msgstr ""
|
||||||
msgid "Are you sure want to come back to "
|
msgid "Are you sure want to come back to "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SnapshotsDialog.cpp:137 src/view/PreferencesPanel.cpp:1090
|
#: src/view/SnapshotsDialog.cpp:137 src/view/PreferencesPanel.cpp:1148
|
||||||
#: src/view/AccountPanel.cpp:979
|
#: src/view/AccountPanel.cpp:1004
|
||||||
msgid "Are you sure want to delete "
|
msgid "Are you sure want to delete "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:776
|
#: src/view/grid/GridAccount.cpp:777
|
||||||
msgid "Are you sure want to delete : \n"
|
msgid "Are you sure want to delete : \n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ msgstr ""
|
||||||
msgid "Are you sure want to integrate these operations ?"
|
msgid "Are you sure want to integrate these operations ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:470
|
#: src/view/PreferencesPanel.cpp:476
|
||||||
msgid "Ascending"
|
msgid "Ascending"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -158,15 +158,15 @@ msgstr ""
|
||||||
msgid "Back to this snapshot"
|
msgid "Back to this snapshot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:356
|
#: src/view/PreferencesPanel.cpp:354
|
||||||
msgid "Background color"
|
msgid "Background color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:277
|
#: src/view/AccountPanel.cpp:299
|
||||||
msgid "Balance"
|
msgid "Balance"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:223
|
#: src/view/PreferencesPanel.cpp:221
|
||||||
msgid "Blocked"
|
msgid "Blocked"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -175,15 +175,15 @@ msgstr ""
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:1266 src/view/grid/GridAccount.cpp:1279
|
#: src/view/grid/GridAccount.cpp:1272 src/view/grid/GridAccount.cpp:1285
|
||||||
msgid "Cannot group these operations"
|
msgid "Cannot group these operations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:1410 src/view/grid/GridAccount.cpp:1416
|
#: src/view/grid/GridAccount.cpp:1416 src/view/grid/GridAccount.cpp:1422
|
||||||
msgid "Cannot ungroup these operations"
|
msgid "Cannot ungroup these operations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:335
|
#: src/controller/KissCount.cpp:332
|
||||||
msgid "Car"
|
msgid "Car"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -191,11 +191,11 @@ msgstr ""
|
||||||
msgid "Categories"
|
msgid "Categories"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:91 src/view/grid/GridAccount.cpp:72
|
#: src/view/SearchBanner.cpp:91 src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Category"
|
msgid "Category"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:978 src/view/PreferencesPanel.cpp:997
|
#: src/view/PreferencesPanel.cpp:1027 src/view/PreferencesPanel.cpp:1049
|
||||||
msgid "Category "
|
msgid "Category "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ msgstr ""
|
||||||
msgid "Change password"
|
msgid "Change password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:150
|
#: src/view/AccountPanel.cpp:160
|
||||||
msgid "Check"
|
msgid "Check"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ msgstr ""
|
||||||
msgid "Confirm password"
|
msgid "Confirm password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/StatsPanel.cpp:158 src/view/AccountPanel.cpp:99
|
#: src/view/StatsPanel.cpp:158 src/view/AccountPanel.cpp:109
|
||||||
msgid "Cost repartition"
|
msgid "Cost repartition"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -261,23 +261,23 @@ msgstr ""
|
||||||
msgid "Create snapshot"
|
msgid "Create snapshot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:72
|
#: src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Credit"
|
msgid "Credit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:273
|
#: src/view/AccountPanel.cpp:295
|
||||||
msgid "Cur Credit"
|
msgid "Cur Credit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:274
|
#: src/view/AccountPanel.cpp:296
|
||||||
msgid "Cur Debit"
|
msgid "Cur Debit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:478
|
#: src/view/AccountPanel.cpp:503
|
||||||
msgid "Current value"
|
msgid "Current value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:72
|
#: src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -293,16 +293,20 @@ msgstr ""
|
||||||
msgid "Days"
|
msgid "Days"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:72
|
#: src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Debit"
|
msgid "Debit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:221
|
#: src/view/PreferencesPanel.cpp:219
|
||||||
msgid "Default"
|
msgid "Default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:224 src/view/PreferencesPanel.cpp:359
|
#: src/view/PreferencesPanel.cpp:674
|
||||||
#: src/view/AccountPanel.cpp:837
|
msgid "Default account cannot be hidden"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/view/PreferencesPanel.cpp:222 src/view/PreferencesPanel.cpp:357
|
||||||
|
#: src/view/AccountPanel.cpp:862
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -310,11 +314,11 @@ msgstr ""
|
||||||
msgid "Delete snapshot"
|
msgid "Delete snapshot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:471
|
#: src/view/PreferencesPanel.cpp:477
|
||||||
msgid "Descending"
|
msgid "Descending"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:88 src/view/grid/GridAccount.cpp:72
|
#: src/view/SearchBanner.cpp:88 src/view/grid/GridAccount.cpp:73
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -322,33 +326,34 @@ msgstr ""
|
||||||
msgid "Enter a new description"
|
msgid "Enter a new description"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/StatsPanel.cpp:431 src/view/UsersDialog.cpp:90
|
#: src/view/StatsPanel.cpp:431 src/view/UsersDialog.cpp:93
|
||||||
#: src/view/UsersDialog.cpp:120 src/view/SearchBanner.cpp:149
|
#: src/view/UsersDialog.cpp:123 src/view/SearchBanner.cpp:149
|
||||||
#: src/view/SearchBanner.cpp:159 src/view/SearchBanner.cpp:172
|
#: src/view/SearchBanner.cpp:159 src/view/SearchBanner.cpp:172
|
||||||
#: src/view/SearchBanner.cpp:181 src/view/SnapshotsDialog.cpp:117
|
#: src/view/SearchBanner.cpp:181 src/view/SnapshotsDialog.cpp:117
|
||||||
#: src/view/SnapshotsDialog.cpp:133 src/view/SnapshotsDialog.cpp:142
|
#: src/view/SnapshotsDialog.cpp:133 src/view/SnapshotsDialog.cpp:142
|
||||||
#: src/view/SnapshotsDialog.cpp:165 src/view/SnapshotsDialog.cpp:174
|
#: src/view/SnapshotsDialog.cpp:165 src/view/SnapshotsDialog.cpp:174
|
||||||
#: src/view/ImportPanel.cpp:170 src/view/ExportPanel.cpp:118
|
#: src/view/ImportPanel.cpp:170 src/view/ExportPanel.cpp:118
|
||||||
#: src/view/ExportPanel.cpp:131 src/view/ExportPanel.cpp:138
|
#: src/view/ExportPanel.cpp:131 src/view/ExportPanel.cpp:138
|
||||||
#: src/view/PreferencesPanel.cpp:585 src/view/PreferencesPanel.cpp:826
|
#: src/view/PreferencesPanel.cpp:601 src/view/PreferencesPanel.cpp:674
|
||||||
#: src/view/PreferencesPanel.cpp:846 src/view/PreferencesPanel.cpp:978
|
#: src/view/PreferencesPanel.cpp:870 src/view/PreferencesPanel.cpp:893
|
||||||
#: src/view/PreferencesPanel.cpp:997 src/view/PreferencesPanel.cpp:1032
|
#: src/view/PreferencesPanel.cpp:1027 src/view/PreferencesPanel.cpp:1049
|
||||||
#: src/view/PreferencesPanel.cpp:1038 src/view/PreferencesPanel.cpp:1078
|
#: src/view/PreferencesPanel.cpp:1086 src/view/PreferencesPanel.cpp:1092
|
||||||
#: src/view/PasswordDialog.cpp:64 src/view/PasswordDialog.cpp:70
|
#: src/view/PreferencesPanel.cpp:1134 src/view/PasswordDialog.cpp:64
|
||||||
#: src/view/AccountPanel.cpp:975 src/view/grid/GridAccount.cpp:1266
|
#: src/view/PasswordDialog.cpp:70 src/view/AccountPanel.cpp:1000
|
||||||
#: src/view/grid/GridAccount.cpp:1279 src/view/grid/GridAccount.cpp:1410
|
#: src/view/grid/GridAccount.cpp:1272 src/view/grid/GridAccount.cpp:1285
|
||||||
#: src/view/grid/GridAccount.cpp:1416 src/view/grid/FormulaDelegate.cpp:59
|
#: src/view/grid/GridAccount.cpp:1416 src/view/grid/GridAccount.cpp:1422
|
||||||
#: src/model/Database.cpp:56 src/model/Database.cpp:64
|
#: src/view/grid/FormulaDelegate.cpp:59 src/model/Database.cpp:56
|
||||||
#: src/model/Database.cpp:83 src/model/Database.cpp:111
|
#: src/model/Database.cpp:64 src/model/Database.cpp:83
|
||||||
#: src/model/Database.cpp:117 src/model/Database.cpp:123
|
#: src/model/Database.cpp:111 src/model/Database.cpp:117
|
||||||
#: src/model/Database.cpp:133 src/model/Database.cpp:153
|
#: src/model/Database.cpp:123 src/model/Database.cpp:133
|
||||||
#: src/model/Database.cpp:603 src/model/Database.cpp:785
|
#: src/model/Database.cpp:152 src/model/Database.cpp:608
|
||||||
#: src/model/Database.cpp:927 src/model/Database.cpp:1760
|
#: src/model/Database.cpp:784 src/model/Database.cpp:926
|
||||||
#: src/model/DatabaseUpdate.cpp:31 src/model/DatabaseUpdate.cpp:162
|
#: src/model/Database.cpp:1746 src/model/DatabaseUpdate.cpp:31
|
||||||
|
#: src/model/DatabaseUpdate.cpp:162
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/model/Database.cpp:153
|
#: src/model/Database.cpp:152
|
||||||
msgid "Error creating original database"
|
msgid "Error creating original database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -368,20 +373,20 @@ msgstr ""
|
||||||
msgid "File category"
|
msgid "File category"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:479
|
#: src/view/AccountPanel.cpp:504
|
||||||
msgid "Final value"
|
msgid "Final value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:70 src/view/grid/GridAccount.cpp:359
|
#: src/view/SearchBanner.cpp:70 src/view/grid/GridAccount.cpp:360
|
||||||
#: src/controller/KissCount.cpp:335
|
#: src/controller/KissCount.cpp:332
|
||||||
msgid "Fix"
|
msgid "Fix"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:358
|
#: src/view/PreferencesPanel.cpp:356
|
||||||
msgid "Font"
|
msgid "Font"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:357
|
#: src/view/PreferencesPanel.cpp:355
|
||||||
msgid "Foreground color"
|
msgid "Foreground color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -393,7 +398,7 @@ msgstr ""
|
||||||
msgid "From "
|
msgid "From "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/GenerateDialog.cpp:33 src/view/AccountPanel.cpp:834
|
#: src/view/GenerateDialog.cpp:33 src/view/AccountPanel.cpp:859
|
||||||
msgid "Generate month"
|
msgid "Generate month"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -401,19 +406,19 @@ msgstr ""
|
||||||
msgid "Grisbi files (*.gsb)"
|
msgid "Grisbi files (*.gsb)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:335
|
#: src/controller/KissCount.cpp:332
|
||||||
msgid "Groceries"
|
msgid "Groceries"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:168
|
#: src/view/AccountPanel.cpp:184
|
||||||
msgid "Group"
|
msgid "Group"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:225
|
#: src/view/PreferencesPanel.cpp:223
|
||||||
msgid "Hidden"
|
msgid "Hidden"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:335
|
#: src/controller/KissCount.cpp:332
|
||||||
msgid "Hobbies"
|
msgid "Hobbies"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -421,7 +426,7 @@ msgstr ""
|
||||||
msgid "Import"
|
msgid "Import"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:477
|
#: src/view/AccountPanel.cpp:502
|
||||||
msgid "Initial value"
|
msgid "Initial value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -457,7 +462,7 @@ msgstr ""
|
||||||
msgid "Invalid formula !"
|
msgid "Invalid formula !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:1032
|
#: src/view/PreferencesPanel.cpp:1086
|
||||||
msgid "Invalid name !"
|
msgid "Invalid name !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -465,7 +470,7 @@ msgstr ""
|
||||||
msgid "Invalid old password"
|
msgid "Invalid old password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/UsersDialog.cpp:90
|
#: src/view/UsersDialog.cpp:93
|
||||||
msgid "Invalid password"
|
msgid "Invalid password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -473,11 +478,11 @@ msgstr ""
|
||||||
msgid "Invalide date range"
|
msgid "Invalide date range"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:585
|
#: src/view/PreferencesPanel.cpp:601
|
||||||
msgid "It must be at least one account !"
|
msgid "It must be at least one account !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:975
|
#: src/view/AccountPanel.cpp:1000
|
||||||
msgid "It must be at least one month !"
|
msgid "It must be at least one month !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -512,11 +517,11 @@ msgstr ""
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:1078
|
#: src/view/PreferencesPanel.cpp:1134
|
||||||
msgid "Language not changed"
|
msgid "Language not changed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:1075
|
#: src/view/PreferencesPanel.cpp:1131
|
||||||
msgid "Language successfully changed, please go to another panel"
|
msgid "Language successfully changed, please go to another panel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -524,7 +529,7 @@ msgstr ""
|
||||||
msgid "Load operations"
|
msgid "Load operations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:146
|
#: src/view/AccountPanel.cpp:156
|
||||||
msgid "Mode"
|
msgid "Mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -532,16 +537,16 @@ msgstr ""
|
||||||
msgid "Months"
|
msgid "Months"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:59 src/view/PreferencesPanel.cpp:219
|
#: src/view/PreferencesPanel.cpp:59 src/view/PreferencesPanel.cpp:217
|
||||||
#: src/view/PreferencesPanel.cpp:355
|
#: src/view/PreferencesPanel.cpp:353
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:1044
|
#: src/view/PreferencesPanel.cpp:1098
|
||||||
msgid "Name changed"
|
msgid "Name changed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/UsersDialog.cpp:51 src/view/UsersDialog.cpp:111
|
#: src/view/UsersDialog.cpp:51 src/view/UsersDialog.cpp:114
|
||||||
msgid "New User"
|
msgid "New User"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -568,12 +573,12 @@ msgid "No operation to save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/StatsPanel.cpp:134 src/view/SearchBanner.cpp:72
|
#: src/view/StatsPanel.cpp:134 src/view/SearchBanner.cpp:72
|
||||||
#: src/view/AccountPanel.cpp:278
|
#: src/view/AccountPanel.cpp:300
|
||||||
msgid "Non fix"
|
msgid "Non fix"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchPanel.cpp:140 src/view/SearchPanel.cpp:180
|
#: src/view/SearchPanel.cpp:140 src/view/SearchPanel.cpp:180
|
||||||
#: src/view/PreferencesPanel.cpp:601 src/view/PreferencesPanel.cpp:676
|
#: src/view/PreferencesPanel.cpp:617 src/view/PreferencesPanel.cpp:709
|
||||||
msgid "None"
|
msgid "None"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -581,7 +586,7 @@ msgstr ""
|
||||||
msgid "Not checked"
|
msgid "Not checked"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:220
|
#: src/view/PreferencesPanel.cpp:218
|
||||||
msgid "Number"
|
msgid "Number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -602,7 +607,7 @@ msgstr ""
|
||||||
msgid "Operation order"
|
msgid "Operation order"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:92 src/view/AccountPanel.cpp:232
|
#: src/view/SearchBanner.cpp:92 src/view/AccountPanel.cpp:254
|
||||||
msgid "Operations"
|
msgid "Operations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -614,7 +619,7 @@ msgstr ""
|
||||||
msgid "Operations successfuly saved"
|
msgid "Operations successfuly saved"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:336
|
#: src/controller/KissCount.cpp:333
|
||||||
msgid "Other"
|
msgid "Other"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -626,7 +631,7 @@ msgstr ""
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:287
|
#: src/view/wxUI.cpp:295
|
||||||
msgid ""
|
msgid ""
|
||||||
"Personal accounting software\n"
|
"Personal accounting software\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -641,15 +646,15 @@ msgstr ""
|
||||||
msgid "Please retype new password"
|
msgid "Please retype new password"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:205 src/view/PreferencesPanel.cpp:1083
|
#: src/view/PreferencesPanel.cpp:203 src/view/PreferencesPanel.cpp:1139
|
||||||
msgid "Preferences"
|
msgid "Preferences"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:292
|
#: src/view/wxUI.cpp:300
|
||||||
msgid "Quit KissCount ?"
|
msgid "Quit KissCount ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:149
|
#: src/view/AccountPanel.cpp:159
|
||||||
msgid "Real"
|
msgid "Real"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -674,7 +679,7 @@ msgstr ""
|
||||||
msgid "Shared with"
|
msgid "Shared with"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SnapshotsDialog.cpp:32 src/view/AccountPanel.cpp:171
|
#: src/view/SnapshotsDialog.cpp:32 src/view/AccountPanel.cpp:187
|
||||||
msgid "Snapshots"
|
msgid "Snapshots"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -686,15 +691,15 @@ msgstr ""
|
||||||
msgid "To"
|
msgid "To"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:252 src/view/AccountPanel.cpp:275
|
#: src/view/AccountPanel.cpp:274 src/view/AccountPanel.cpp:297
|
||||||
msgid "Total Credit"
|
msgid "Total Credit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:253 src/view/AccountPanel.cpp:276
|
#: src/view/AccountPanel.cpp:275 src/view/AccountPanel.cpp:298
|
||||||
msgid "Total Debit"
|
msgid "Total Debit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:169
|
#: src/view/AccountPanel.cpp:185
|
||||||
msgid "UnGroup"
|
msgid "UnGroup"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -711,7 +716,7 @@ msgid "Unable to open Database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/model/Database.cpp:56 src/model/Database.cpp:64
|
#: src/model/Database.cpp:56 src/model/Database.cpp:64
|
||||||
#: src/model/Database.cpp:83 src/model/Database.cpp:1760
|
#: src/model/Database.cpp:83 src/model/Database.cpp:1746
|
||||||
msgid "Unable to open database"
|
msgid "Unable to open database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -723,14 +728,14 @@ msgstr ""
|
||||||
msgid "Unable to upgrade Database"
|
msgid "Unable to upgrade Database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/controller/KissCount.cpp:336
|
#: src/controller/KissCount.cpp:333
|
||||||
msgid "Unexpected"
|
msgid "Unexpected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/SearchBanner.cpp:61 src/view/SearchBanner.cpp:80
|
#: src/view/SearchBanner.cpp:61 src/view/SearchBanner.cpp:80
|
||||||
#: src/view/AccountPanel.cpp:624 src/view/AccountPanel.cpp:660
|
#: src/view/AccountPanel.cpp:649 src/view/AccountPanel.cpp:685
|
||||||
#: src/view/AccountPanel.cpp:698 src/model/User.cpp:62 src/model/User.cpp:80
|
#: src/view/AccountPanel.cpp:723 src/model/User.cpp:65 src/model/User.cpp:83
|
||||||
#: src/model/User.cpp:158
|
#: src/model/User.cpp:161
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -742,12 +747,12 @@ msgstr ""
|
||||||
msgid "Unresolved categories"
|
msgid "Unresolved categories"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/model/Database.cpp:603 src/model/Database.cpp:785
|
#: src/model/Database.cpp:608 src/model/Database.cpp:784
|
||||||
#: src/model/Database.cpp:927
|
#: src/model/Database.cpp:926
|
||||||
msgid "Update failed !\n"
|
msgid "Update failed !\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/AccountPanel.cpp:170
|
#: src/view/AccountPanel.cpp:186
|
||||||
msgid "Update next months"
|
msgid "Update next months"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -755,8 +760,8 @@ msgstr ""
|
||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/UsersDialog.cpp:40 src/view/UsersDialog.cpp:120
|
#: src/view/UsersDialog.cpp:40 src/view/UsersDialog.cpp:123
|
||||||
#: src/view/PreferencesPanel.cpp:1038
|
#: src/view/PreferencesPanel.cpp:1092
|
||||||
msgid "User "
|
msgid "User "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -764,11 +769,11 @@ msgstr ""
|
||||||
msgid "Users"
|
msgid "Users"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:222 src/view/AccountPanel.cpp:148
|
#: src/view/PreferencesPanel.cpp:220 src/view/AccountPanel.cpp:158
|
||||||
msgid "Virtual"
|
msgid "Virtual"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:1072
|
#: src/view/grid/GridAccount.cpp:1078
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -776,62 +781,62 @@ msgstr ""
|
||||||
msgid "Welcome back to "
|
msgid "Welcome back to "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:606
|
#: src/view/PreferencesPanel.cpp:622
|
||||||
msgid "Wich account will replace this one ?"
|
msgid "Wich account will replace this one ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/PreferencesPanel.cpp:682
|
#: src/view/PreferencesPanel.cpp:715
|
||||||
msgid "Wich category will replace this one ?"
|
msgid "Wich category will replace this one ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/grid/GridAccount.cpp:1072
|
#: src/view/grid/GridAccount.cpp:1078
|
||||||
msgid "You made a debit on a blocked account"
|
msgid "You made a debit on a blocked account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:157
|
#: src/view/wxUI.cpp:158
|
||||||
msgid "april"
|
msgid "april"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:161
|
#: src/view/wxUI.cpp:162
|
||||||
msgid "august"
|
msgid "august"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:165
|
#: src/view/wxUI.cpp:166
|
||||||
msgid "december"
|
msgid "december"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:155
|
#: src/view/wxUI.cpp:156
|
||||||
msgid "february"
|
msgid "february"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:154
|
#: src/view/wxUI.cpp:155
|
||||||
msgid "january"
|
msgid "january"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:160
|
#: src/view/wxUI.cpp:161
|
||||||
msgid "july"
|
msgid "july"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:159
|
#: src/view/wxUI.cpp:160
|
||||||
msgid "june"
|
msgid "june"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:156
|
#: src/view/wxUI.cpp:157
|
||||||
msgid "march"
|
msgid "march"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:158
|
#: src/view/wxUI.cpp:159
|
||||||
msgid "may"
|
msgid "may"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:164
|
#: src/view/wxUI.cpp:165
|
||||||
msgid "november"
|
msgid "november"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:163
|
#: src/view/wxUI.cpp:164
|
||||||
msgid "october"
|
msgid "october"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/view/wxUI.cpp:162
|
#: src/view/wxUI.cpp:163
|
||||||
msgid "september"
|
msgid "september"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -98,9 +98,9 @@ User* KissCount::GetUser()
|
||||||
return _user;
|
return _user;
|
||||||
}
|
}
|
||||||
|
|
||||||
double KissCount::GetAccountAmount(int id, int month, int year)
|
double KissCount::GetAccountAmount(int id, int month, int year, bool* had_value)
|
||||||
{
|
{
|
||||||
return _db->GetAccountAmount(id, month, year);
|
return _db->GetAccountAmount(id, month, year, had_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
double KissCount::CalcAccountAmount(int id, int month, int year, bool* had_values)
|
double KissCount::CalcAccountAmount(int id, int month, int year, bool* had_values)
|
||||||
|
@ -179,7 +179,7 @@ int KissCount::AddAccount(Account& ac)
|
||||||
ac.id = _db->AddAccount(_user, ac);
|
ac.id = _db->AddAccount(_user, ac);
|
||||||
_user->AddAccount(ac);
|
_user->AddAccount(ac);
|
||||||
|
|
||||||
SetAccountAmount(ac.id, curDate.month(), curDate.year(), 0.0);
|
SetAccountAmount(ac.id, curDate.month()-1, curDate.year(), 0.0);
|
||||||
|
|
||||||
return ac.id;
|
return ac.id;
|
||||||
}
|
}
|
||||||
|
@ -188,9 +188,6 @@ void KissCount::UpdateAccount(Account& ac)
|
||||||
{
|
{
|
||||||
_db->UpdateAccount(ac);
|
_db->UpdateAccount(ac);
|
||||||
_user->UpdateAccount(ac);
|
_user->UpdateAccount(ac);
|
||||||
|
|
||||||
// if (ac._default)
|
|
||||||
// std::sort(_user->_accounts.begin(), _user->_accounts.end(), Account());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KissCount::DeleteAccount(Account& ac, int replacement)
|
void KissCount::DeleteAccount(Account& ac, int replacement)
|
||||||
|
@ -338,7 +335,7 @@ QString default_cats[] = {
|
||||||
|
|
||||||
void KissCount::NewUser(const QString& name)
|
void KissCount::NewUser(const QString& name)
|
||||||
{
|
{
|
||||||
QDate curDate = QDate::currentDate();
|
// QDate curDate = QDate::currentDate();
|
||||||
Account ac = {
|
Account ac = {
|
||||||
/*.id = */0,
|
/*.id = */0,
|
||||||
/*.name = */_("Account 1"),
|
/*.name = */_("Account 1"),
|
||||||
|
@ -369,8 +366,6 @@ void KissCount::NewUser(const QString& name)
|
||||||
AddCategory(cat);
|
AddCategory(cat);
|
||||||
|
|
||||||
SetOperationOrder("ASC");
|
SetOperationOrder("ASC");
|
||||||
|
|
||||||
_db->GenerateMonth(_user, -1, -1, (int)curDate.month(), curDate.year());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KissCount::KillMe()
|
void KissCount::KillMe()
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
double MetaAmount(int id);
|
double MetaAmount(int id);
|
||||||
double MetaPositiveAmount(int id);
|
double MetaPositiveAmount(int id);
|
||||||
|
|
||||||
double GetAccountAmount(int id, int month, int year);
|
double GetAccountAmount(int id, int month, int year, bool* had_values=NULL);
|
||||||
void SetAccountAmount(int accountId, int month, int year, double value);
|
void SetAccountAmount(int accountId, int month, int year, double value);
|
||||||
double CalcAccountAmount(int id, int month, int year, bool* had_values);
|
double CalcAccountAmount(int id, int month, int year, bool* had_values);
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,7 @@ User* Database::LoadUser(const QString& name)
|
||||||
|
|
||||||
query.clear();
|
query.clear();
|
||||||
|
|
||||||
req = QString("SELECT * FROM account WHERE user='%1' ORDER BY default_account DESC, virtual, blocked, name ASC").arg(user->_id);
|
req = QString("SELECT * FROM account WHERE user='%1' ORDER BY default_account DESC, blocked, virtual, name ASC").arg(user->_id);
|
||||||
|
|
||||||
EXECUTE_SQL_QUERY_WITH_CODE(req, 0, {delete user;}, {delete user;});
|
EXECUTE_SQL_QUERY_WITH_CODE(req, 0, {delete user;}, {delete user;});
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ void Database::LoadYear(User* user, int year)
|
||||||
query.clear();
|
query.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
double Database::GetAccountAmount(int id, int month, int year)
|
double Database::GetAccountAmount(int id, int month, int year, bool* had_value)
|
||||||
{
|
{
|
||||||
QSqlRecord set;
|
QSqlRecord set;
|
||||||
QString req;
|
QString req;
|
||||||
|
@ -422,9 +422,15 @@ double Database::GetAccountAmount(int id, int month, int year)
|
||||||
{
|
{
|
||||||
set = query.record();
|
set = query.record();
|
||||||
res = set.value("amount").toDouble();
|
res = set.value("amount").toDouble();
|
||||||
|
if (had_value)
|
||||||
|
*had_value = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SetAccountAmount(id, month, year, 0.0);
|
SetAccountAmount(id, month, year, 0.0);
|
||||||
|
if (had_value)
|
||||||
|
*had_value = false;
|
||||||
|
}
|
||||||
|
|
||||||
query.clear();
|
query.clear();
|
||||||
|
|
||||||
|
@ -759,15 +765,9 @@ void Database::SetAccountAmount(int accountId, int month, int year, double amoun
|
||||||
QString req;
|
QString req;
|
||||||
QSqlQuery query(_db);
|
QSqlQuery query(_db);
|
||||||
|
|
||||||
req = QString("UPDATE account_amount SET amount='%1' WHERE account='%2' AND month='%3' AND year='%4'").
|
req = "INSERT or REPLACE INTO account_amount ('account', 'year', 'month', 'amount') VALUES ('%1', '%2', '%3', '%4')" ;
|
||||||
arg(DoubleToString(amount), QString::number(accountId), QString::number(month), QString::number(year));
|
req = req.arg(QString::number(accountId), QString::number(year), QString::number(month), DoubleToString(amount));
|
||||||
|
EXECUTE_SQL_UPDATE(req, );
|
||||||
if (!query.exec(req))
|
|
||||||
{
|
|
||||||
req = "INSERT INTO account_amount ('account', 'year', 'month', 'amount') VALUES ('%1', '%2', '%3', '%4')" ;
|
|
||||||
req = req.arg(QString::number(accountId), QString::number(year), QString::number(month), DoubleToString(amount));
|
|
||||||
EXECUTE_SQL_UPDATE(req, );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Database::AddAccount(User* user, Account& ac)
|
int Database::AddAccount(User* user, Account& ac)
|
||||||
|
@ -936,18 +936,30 @@ int Database::AddCategory(User* user, Category& category)
|
||||||
|
|
||||||
void Database::UpdateCategory(Category& category)
|
void Database::UpdateCategory(Category& category)
|
||||||
{
|
{
|
||||||
QString req;
|
QString req, tmp;
|
||||||
QString backcolor, forecolor;
|
QString backcolor, forecolor;
|
||||||
|
|
||||||
backcolor = "#" ;
|
backcolor = "#" ;
|
||||||
backcolor += QString::number(category.backcolor.red(), 16);
|
tmp = QString::number(category.backcolor.red(), 16);
|
||||||
backcolor += QString::number(category.backcolor.green(), 16);
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
backcolor += QString::number(category.backcolor.blue(), 16);
|
backcolor += tmp;
|
||||||
|
tmp = QString::number(category.backcolor.green(), 16);
|
||||||
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
|
backcolor += tmp;
|
||||||
|
tmp = QString::number(category.backcolor.blue(), 16);
|
||||||
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
|
backcolor += tmp;
|
||||||
|
|
||||||
forecolor = "#" ;
|
forecolor = "#" ;
|
||||||
forecolor += QString::number(category.forecolor.red(), 16);
|
tmp = QString::number(category.forecolor.red(), 16);
|
||||||
forecolor += QString::number(category.forecolor.green(), 16);
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
forecolor += QString::number(category.forecolor.blue(), 16);
|
forecolor += tmp;
|
||||||
|
tmp = QString::number(category.forecolor.green(), 16);
|
||||||
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
|
forecolor += tmp;
|
||||||
|
tmp = QString::number(category.forecolor.blue(), 16);
|
||||||
|
if (tmp.length() == 1) tmp = "0" + tmp;
|
||||||
|
forecolor += tmp;
|
||||||
|
|
||||||
req = "UPDATE category SET" ;
|
req = "UPDATE category SET" ;
|
||||||
req += " parent='" + QString::number(category.parent) + "'";
|
req += " parent='" + QString::number(category.parent) + "'";
|
||||||
|
@ -1104,20 +1116,6 @@ void Database::GenerateMonth(User* user, int monthFrom, int yearFrom, int monthT
|
||||||
double amount;
|
double amount;
|
||||||
QSqlQuery query(_db);
|
QSqlQuery query(_db);
|
||||||
|
|
||||||
if (monthFrom == -1 || yearFrom == -1)
|
|
||||||
{
|
|
||||||
for (it = user->_accounts.begin(); it != user->_accounts.end(); it++)
|
|
||||||
{
|
|
||||||
req = "INSERT INTO account_amount ('account', 'year', 'month', 'amount') VALUES " ;
|
|
||||||
req += "('%1', '%2', '%3', '%4')";
|
|
||||||
req = req.arg(QString::number(it->id), QString::number(yearTo),
|
|
||||||
QString::number(monthTo), "0.0");
|
|
||||||
EXECUTE_SQL_UPDATE(req, );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (it = user->_accounts.begin(); it != user->_accounts.end(); it++)
|
for (it = user->_accounts.begin(); it != user->_accounts.end(); it++)
|
||||||
{
|
{
|
||||||
amount = 0.0;
|
amount = 0.0;
|
||||||
|
@ -1249,14 +1247,9 @@ void Database::UpdatePreference(User* user, const QString& preference)
|
||||||
QString value = user->_preferences[preference];
|
QString value = user->_preferences[preference];
|
||||||
QSqlQuery query(_db);
|
QSqlQuery query(_db);
|
||||||
|
|
||||||
req = QString("UPDATE preference SET name='%1', value='%2' WHERE user='%3'").arg(preference, value, QString::number(user->_id)) ;
|
req = "INSERT or REPLACE INTO preference ('user', 'name', 'value') VALUES ('%1', '%2', '%3')" ;
|
||||||
|
req = req.arg(QString::number(user->_id), preference, value);
|
||||||
if (!query.exec(req))
|
EXECUTE_SQL_UPDATE(req, );
|
||||||
{
|
|
||||||
req = "INSERT INTO preference ('user', 'name', 'value') VALUES ('%1', '%2', '%3')" ;
|
|
||||||
req = req.arg(QString::number(user->_id), preference, value);
|
|
||||||
EXECUTE_SQL_UPDATE(req, );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Operation>* Database::Search(User* user, QString* description, QDate* dateFrom, QDate* dateTo,
|
std::vector<Operation>* Database::Search(User* user, QString* description, QDate* dateFrom, QDate* dateTo,
|
||||||
|
@ -1714,16 +1707,10 @@ void Database::UpdateImportPattern(User* user)
|
||||||
|
|
||||||
key = ImportEngine::RemoveUnused(it->first);
|
key = ImportEngine::RemoveUnused(it->first);
|
||||||
|
|
||||||
req = "UPDATE import_pattern SET pattern='%1', account='%2', category='%3' WHERE description='%4'" ;
|
req = "INSERT or REPLACE INTO import_pattern ('user', 'description', 'pattern', 'account', 'category') VALUES " ;
|
||||||
req = req.arg(it->second.pattern, QString::number(it->second.account), QString::number(it->second.category), key);
|
req += "('%1', '%2', '%3', '%4', '%5')";
|
||||||
|
req = req.arg(QString::number(user->_id), key, it->second.pattern, QString::number(it->second.account), QString::number(it->second.category));
|
||||||
if (!query.exec(req))
|
EXECUTE_SQL_UPDATE(req, );
|
||||||
{
|
|
||||||
req = "INSERT INTO import_pattern ('user', 'description', 'pattern', 'account', 'category') VALUES " ;
|
|
||||||
req += "('%1', '%2', '%3', '%4', '%5')";
|
|
||||||
req = req.arg(QString::number(user->_id), key, it->second.pattern, QString::number(it->second.account), QString::number(it->second.category));
|
|
||||||
EXECUTE_SQL_UPDATE(req, );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
double MetaAmount(int id);
|
double MetaAmount(int id);
|
||||||
double MetaPositiveAmount(int id);
|
double MetaPositiveAmount(int id);
|
||||||
|
|
||||||
double GetAccountAmount(int id, int month, int year);
|
double GetAccountAmount(int id, int month, int year, bool* had_value=NULL);
|
||||||
void SetAccountAmount(int accountId, int month, int year, double amount);
|
void SetAccountAmount(int accountId, int month, int year, double amount);
|
||||||
double CalcAccountAmount(int id, int month, int year, bool* had_values);
|
double CalcAccountAmount(int id, int month, int year, bool* had_values);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user