浏览代码

Fix lifetime date range on coffee purchase previous years comparison

Neal Wilson 9 年前
父节点
当前提交
7c102dec72
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      config/Reports/fypurchase.xml

+ 1
- 1
config/Reports/fypurchase.xml 查看文件

@@ -18,7 +18,7 @@
18 18
 			/* Set Lifetime range. */
19 19
 			var dateSelect = findChildObject(this, 'dates');
20 20
 			var query = new QSqlQuery();
21
-			query.exec("SELECT concat(EXTRACT(YEAR FROM time::date), '-01-01') FROM purchase WHERE time = (SELECT min(time) FROM purchase) UNION SELECT concat(EXTRACT(YEAR FROM 'now'::date), '-12-31')");
21
+			query.exec("SELECT concat(EXTRACT(YEAR FROM time::date), '-01-01') FROM purchase WHERE time = (SELECT min(time) FROM purchase) UNION SELECT concat(EXTRACT(YEAR FROM 'now'::date), '-12-31') ORDER BY concat ASC");
22 22
 			query.next();
23 23
 			var lifetimeStartDate = query.value(0);
24 24
 			query.next();

正在加载...
取消
保存