diff options
author | Sebastian Reichel <sre@ring0.de> | 2013-02-04 22:42:07 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2013-02-04 22:42:07 +0100 |
commit | bb966b14b5ccfc0f2a1508d4065a1294f7e46020 (patch) | |
tree | d5b40fc22e181523b0ba57ea8251fa1c804fa592 /src/db.vala | |
parent | f89a9e9ef3113e21743e8896a06a0e21e7516616 (diff) | |
download | serial-barcode-scanner-bb966b14b5ccfc0f2a1508d4065a1294f7e46020.tar.bz2 |
invoice month is now calendar month
Diffstat (limited to 'src/db.vala')
-rw-r--r-- | src/db.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/db.vala b/src/db.vala index 677fa56..344aa85 100644 --- a/src/db.vala +++ b/src/db.vala @@ -470,7 +470,8 @@ public class Database { switch(rc) { case Sqlite.ROW: pid = uint64.parse(statements["last_purchase"].column_text(0)); - write_to_log("Remove purchase of %llu", pid); + string pname = get_product_name(pid); + write_to_log("Remove purchase of %s", pname); break; case Sqlite.DONE: write_to_log("Error: undo not possible without purchases"); @@ -693,7 +694,7 @@ public class Database { DateTime now = new DateTime.now_local(); DateTime today = new DateTime.local(now.get_year(), now.get_month(), now.get_hour() < 8 ? now.get_day_of_month()-1 : now.get_day_of_month(), 8, 0, 0); - DateTime month = new DateTime.local(now.get_year(), now.get_day_of_month() < 16 ? now.get_month()-1 : now.get_month(), 16, 8, 0, 0); + DateTime month = new DateTime.local(now.get_year(), now.get_month(), 1, 0, 0, 0); DateTime last4weeks = now.add_days(-28); DateTime last4months = now.add_months(-4); |