beancount-gs/service/stats.go

513 lines
16 KiB
Go
Raw Normal View History

2021-11-19 09:54:02 +00:00
package service
import (
2021-11-26 09:12:07 +00:00
"encoding/json"
2021-11-22 14:50:10 +00:00
"fmt"
2021-12-22 15:13:37 +00:00
"sort"
"strings"
"time"
2021-11-19 09:54:02 +00:00
"github.com/beancount-gs/script"
"github.com/gin-gonic/gin"
2021-11-26 09:12:07 +00:00
"github.com/shopspring/decimal"
2021-11-19 09:54:02 +00:00
)
2021-11-22 08:47:49 +00:00
type YearMonth struct {
Year string `bql:"distinct year(date)" json:"year"`
Month string `bql:"month(date)" json:"month"`
}
2021-11-19 09:54:02 +00:00
2021-11-22 08:47:49 +00:00
func MonthsList(c *gin.Context) {
2021-11-21 14:37:13 +00:00
ledgerConfig := script.GetLedgerConfigFromContext(c)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
// 添加排序
queryParams := script.GetQueryParams(c)
queryParams.OrderBy = "year, month desc"
2021-11-22 08:47:49 +00:00
yearMonthList := make([]YearMonth, 0)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
err := script.BQLQueryList(ledgerConfig, &queryParams, &yearMonthList)
2021-11-19 09:54:02 +00:00
if err != nil {
2021-11-22 08:47:49 +00:00
InternalError(c, err.Error())
2021-11-19 09:54:02 +00:00
return
}
2021-11-22 08:47:49 +00:00
months := make([]string, 0)
for _, yearMonth := range yearMonthList {
months = append(months, yearMonth.Year+"-"+yearMonth.Month)
2021-11-21 14:37:13 +00:00
}
OK(c, months)
2021-11-19 09:54:02 +00:00
}
2021-11-22 14:50:10 +00:00
2021-11-24 15:45:45 +00:00
type StatsResult struct {
Key string
Value string
2021-11-22 14:50:10 +00:00
}
func StatsTotal(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
queryParams := script.GetQueryParams(c)
selectBql := fmt.Sprintf("SELECT '\\', root(account, 1), '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
2021-11-24 15:45:45 +00:00
accountTypeTotalList := make([]StatsResult, 0)
2021-11-22 14:50:10 +00:00
err := script.BQLQueryListByCustomSelect(ledgerConfig, selectBql, &queryParams, &accountTypeTotalList)
if err != nil {
InternalError(c, err.Error())
return
}
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
result := make(map[string]string)
2021-11-22 14:50:10 +00:00
for _, total := range accountTypeTotalList {
2021-11-24 15:45:45 +00:00
fields := strings.Fields(total.Value)
2021-11-22 14:50:10 +00:00
if len(fields) > 1 {
2021-11-24 15:45:45 +00:00
result[total.Key] = fields[0]
2021-11-22 14:50:10 +00:00
}
}
OK(c, result)
}
2021-11-24 15:45:45 +00:00
type StatsQuery struct {
Prefix string `form:"prefix" binding:"required"`
Year int `form:"year"`
Month int `form:"month"`
Level int `form:"level"`
Type string `form:"type"`
}
2021-11-26 09:12:07 +00:00
type AccountPercentQueryResult struct {
Account string
Position string
}
2021-11-24 15:45:45 +00:00
type AccountPercentResult struct {
2021-11-26 09:12:07 +00:00
Account string `json:"account"`
Amount json.Number `json:"amount"`
OperatingCurrency string `json:"operatingCurrency"`
2021-11-24 15:45:45 +00:00
}
func StatsAccountPercent(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
var statsQuery StatsQuery
if err := c.ShouldBindQuery(&statsQuery); err != nil {
BadRequest(c, err.Error())
return
}
queryParams := script.QueryParams{
AccountLike: statsQuery.Prefix,
Year: statsQuery.Year,
Month: statsQuery.Month,
Where: true,
}
var bql string
if statsQuery.Level != 0 {
prefixNodeLen := len(strings.Split(strings.Trim(statsQuery.Prefix, ":"), ":"))
bql = fmt.Sprintf("SELECT '\\', root(account, %d) as subAccount, '\\', sum(convert(value(position), '%s')), '\\'", statsQuery.Level+prefixNodeLen, ledgerConfig.OperatingCurrency)
} else {
bql = fmt.Sprintf("SELECT '\\', account, '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
}
2021-11-26 09:12:07 +00:00
statsQueryResultList := make([]AccountPercentQueryResult, 0)
err := script.BQLQueryListByCustomSelect(ledgerConfig, bql, &queryParams, &statsQueryResultList)
2021-11-24 15:45:45 +00:00
if err != nil {
InternalError(c, err.Error())
return
}
2021-11-26 09:12:07 +00:00
result := make([]AccountPercentResult, 0)
for _, queryRes := range statsQueryResultList {
if queryRes.Position != "" {
fields := strings.Fields(queryRes.Position)
result = append(result, AccountPercentResult{Account: queryRes.Account, Amount: json.Number(fields[0]), OperatingCurrency: fields[1]})
}
2021-11-24 15:45:45 +00:00
}
2021-11-26 09:12:07 +00:00
OK(c, result)
2021-11-24 15:45:45 +00:00
}
type AccountTrendResult struct {
2021-11-26 09:12:07 +00:00
Date string `json:"date"`
Amount json.Number `json:"amount"`
OperatingCurrency string `json:"operatingCurrency"`
2021-11-24 15:45:45 +00:00
}
func StatsAccountTrend(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
var statsQuery StatsQuery
if err := c.ShouldBindQuery(&statsQuery); err != nil {
BadRequest(c, err.Error())
return
}
queryParams := script.QueryParams{
AccountLike: statsQuery.Prefix,
Year: statsQuery.Year,
Month: statsQuery.Month,
Where: true,
}
var bql string
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
switch {
case statsQuery.Type == "day":
2021-11-24 15:45:45 +00:00
bql = fmt.Sprintf("SELECT '\\', date, '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
case statsQuery.Type == "month":
bql = fmt.Sprintf("SELECT '\\', year, '-', month, '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
case statsQuery.Type == "year":
bql = fmt.Sprintf("SELECT '\\', year, '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
case statsQuery.Type == "sum":
2021-11-24 15:45:45 +00:00
bql = fmt.Sprintf("SELECT '\\', date, '\\', convert(balance, '%s'), '\\'", ledgerConfig.OperatingCurrency)
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
default:
2021-11-24 15:45:45 +00:00
OK(c, new([]string))
return
}
statsResultList := make([]StatsResult, 0)
err := script.BQLQueryListByCustomSelect(ledgerConfig, bql, &queryParams, &statsResultList)
if err != nil {
InternalError(c, err.Error())
return
}
result := make([]AccountTrendResult, 0)
for _, stats := range statsResultList {
commodities := strings.Split(stats.Value, ",")
// 多币种的处理方式:例如 75799.78 USD, 18500.00 IRAUSD, 176 VACHR
// 选择账本默认ledgerConfig.OperatingCurrency币种的值
var selectedCommodity = commodities[0]
for _, commodity := range commodities {
if strings.Contains(commodity, " "+ledgerConfig.OperatingCurrency) {
selectedCommodity = commodity
break
}
}
fields := strings.Fields(selectedCommodity)
2021-11-26 09:12:07 +00:00
amount, _ := decimal.NewFromString(fields[0])
var date = stats.Key
// 月格式化日期
if statsQuery.Type == "month" {
yearMonth := strings.Split(date, "-")
date = fmt.Sprintf("%s-%s", strings.Trim(yearMonth[0], " "), strings.Trim(yearMonth[1], " "))
}
result = append(result, AccountTrendResult{Date: date, Amount: json.Number(amount.Round(2).String()), OperatingCurrency: fields[1]})
2021-11-24 15:45:45 +00:00
}
OK(c, result)
}
2021-11-25 07:41:28 +00:00
2021-12-02 14:48:45 +00:00
type AccountBalanceBQLResult struct {
Year string `bql:"year" json:"year"`
Month string `bql:"month" json:"month"`
Day string `bql:"day" json:"day"`
Balance string `bql:"balance" json:"balance"`
}
type AccountBalanceResult struct {
Date string `json:"date"`
Amount json.Number `json:"amount"`
OperatingCurrency string `json:"operatingCurrency"`
}
func StatsAccountBalance(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
var statsQuery StatsQuery
if err := c.ShouldBindQuery(&statsQuery); err != nil {
BadRequest(c, err.Error())
return
}
queryParams := script.QueryParams{
AccountLike: statsQuery.Prefix,
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
Year: statsQuery.Year,
Month: statsQuery.Month,
2021-12-02 14:48:45 +00:00
Where: true,
}
balResultList := make([]AccountBalanceBQLResult, 0)
bql := fmt.Sprintf("select '\\', year, '\\', month, '\\', day, '\\', last(convert(balance, '%s')), '\\'", ledgerConfig.OperatingCurrency)
err := script.BQLQueryListByCustomSelect(ledgerConfig, bql, &queryParams, &balResultList)
if err != nil {
InternalError(c, err.Error())
return
}
resultList := make([]AccountBalanceResult, 0)
for _, bqlResult := range balResultList {
if bqlResult.Balance != "" {
fields := strings.Fields(bqlResult.Balance)
amount, _ := decimal.NewFromString(fields[0])
resultList = append(resultList, AccountBalanceResult{
Date: bqlResult.Year + "-" + bqlResult.Month + "-" + bqlResult.Day,
Amount: json.Number(amount.Round(2).String()),
OperatingCurrency: fields[1],
})
}
}
OK(c, resultList)
}
2021-11-25 07:41:28 +00:00
type MonthTotalBQLResult struct {
Year int
Month int
Value string
}
type MonthTotal struct {
2021-11-26 09:12:07 +00:00
Type string `json:"type"`
Month string `json:"month"`
Amount json.Number `json:"amount"`
OperatingCurrency string `json:"operatingCurrency"`
2021-11-25 07:41:28 +00:00
}
2021-12-22 15:13:37 +00:00
type MonthTotalSort []MonthTotal
func (s MonthTotalSort) Len() int {
return len(s)
}
func (s MonthTotalSort) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
func (s MonthTotalSort) Less(i, j int) bool {
iYearMonth, _ := time.Parse("2006-1", s[i].Month)
jYearMonth, _ := time.Parse("2006-1", s[j].Month)
return iYearMonth.Before(jYearMonth)
}
2021-11-25 07:41:28 +00:00
func StatsMonthTotal(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
monthSet := make(map[string]bool)
queryParams := script.QueryParams{
AccountLike: "Income",
Where: true,
OrderBy: "year, month",
}
// 按月查询收入
queryIncomeBql := fmt.Sprintf("select '\\', year, '\\', month, '\\', neg(sum(convert(value(position), '%s'))), '\\'", ledgerConfig.OperatingCurrency)
monthIncomeTotalResultList := make([]MonthTotalBQLResult, 0)
err := script.BQLQueryListByCustomSelect(ledgerConfig, queryIncomeBql, &queryParams, &monthIncomeTotalResultList)
if err != nil {
InternalError(c, err.Error())
return
}
monthIncomeMap := make(map[string]MonthTotalBQLResult)
for _, income := range monthIncomeTotalResultList {
month := fmt.Sprintf("%d-%d", income.Year, income.Month)
monthSet[month] = true
monthIncomeMap[month] = income
}
// 按月查询支出
queryParams.AccountLike = "Expenses"
queryExpensesBql := fmt.Sprintf("select '\\', year, '\\', month, '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
monthExpensesTotalResultList := make([]MonthTotalBQLResult, 0)
err = script.BQLQueryListByCustomSelect(ledgerConfig, queryExpensesBql, &queryParams, &monthExpensesTotalResultList)
if err != nil {
InternalError(c, err.Error())
return
}
monthExpensesMap := make(map[string]MonthTotalBQLResult)
for _, expenses := range monthExpensesTotalResultList {
month := fmt.Sprintf("%d-%d", expenses.Year, expenses.Month)
monthSet[month] = true
monthExpensesMap[month] = expenses
}
monthTotalResult := make([]MonthTotal, 0)
// 合并结果
var monthIncome, monthExpenses MonthTotal
2021-11-26 09:12:07 +00:00
var monthIncomeAmount, monthExpensesAmount decimal.Decimal
2021-11-25 07:41:28 +00:00
for month := range monthSet {
if monthIncomeMap[month].Value != "" {
fields := strings.Fields(monthIncomeMap[month].Value)
2021-11-26 09:12:07 +00:00
amount, _ := decimal.NewFromString(fields[0])
monthIncomeAmount = amount
monthIncome = MonthTotal{Type: "收入", Month: month, Amount: json.Number(amount.Round(2).String()), OperatingCurrency: fields[1]}
2021-11-25 07:41:28 +00:00
} else {
2021-11-26 09:12:07 +00:00
monthIncome = MonthTotal{Type: "收入", Month: month, Amount: "0", OperatingCurrency: ledgerConfig.OperatingCurrency}
2021-11-25 07:41:28 +00:00
}
monthTotalResult = append(monthTotalResult, monthIncome)
if monthExpensesMap[month].Value != "" {
fields := strings.Fields(monthExpensesMap[month].Value)
2021-11-26 09:12:07 +00:00
amount, _ := decimal.NewFromString(fields[0])
monthExpensesAmount = amount
monthExpenses = MonthTotal{Type: "支出", Month: month, Amount: json.Number(amount.Round(2).String()), OperatingCurrency: fields[1]}
2021-11-25 07:41:28 +00:00
} else {
2021-11-26 09:12:07 +00:00
monthExpenses = MonthTotal{Type: "支出", Month: month, Amount: "0", OperatingCurrency: ledgerConfig.OperatingCurrency}
2021-11-25 07:41:28 +00:00
}
monthTotalResult = append(monthTotalResult, monthExpenses)
2021-11-26 09:12:07 +00:00
monthTotalResult = append(monthTotalResult, MonthTotal{Type: "结余", Month: month, Amount: json.Number(monthIncomeAmount.Sub(monthExpensesAmount).Round(2).String()), OperatingCurrency: ledgerConfig.OperatingCurrency})
2021-11-25 07:41:28 +00:00
}
2021-12-22 15:13:37 +00:00
sort.Sort(MonthTotalSort(monthTotalResult))
2021-11-25 07:41:28 +00:00
OK(c, monthTotalResult)
}
2021-11-26 09:12:07 +00:00
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
type StatsMonthQuery struct {
Year int `form:"year"`
Month int `form:"month"`
}
type StatsCalendarQueryResult struct {
Date string
Account string
Position string
}
type StatsCalendarResult struct {
Date string `json:"date"`
Account string `json:"account"`
Amount json.Number `json:"amount"`
Currency string `json:"currency"`
CurrencySymbol string `json:"currencySymbol"`
}
func StatsMonthCalendar(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
var statsMonthQuery StatsMonthQuery
if err := c.ShouldBindQuery(&statsMonthQuery); err != nil {
BadRequest(c, err.Error())
return
}
queryParams := script.QueryParams{
Year: statsMonthQuery.Year,
Month: statsMonthQuery.Month,
Where: true,
}
bql := fmt.Sprintf("SELECT '\\', date, '\\', root(account, 1), '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
statsCalendarQueryResult := make([]StatsCalendarQueryResult, 0)
err := script.BQLQueryListByCustomSelect(ledgerConfig, bql, &queryParams, &statsCalendarQueryResult)
if err != nil {
InternalError(c, err.Error())
return
}
resultList := make([]StatsCalendarResult, 0)
for _, queryRes := range statsCalendarQueryResult {
if queryRes.Position != "" {
fields := strings.Fields(queryRes.Position)
resultList = append(resultList,
StatsCalendarResult{
Date: queryRes.Date,
Account: queryRes.Account,
Amount: json.Number(fields[0]),
Currency: fields[1],
CurrencySymbol: script.GetCommoditySymbol(ledgerConfig.Id, fields[1]),
})
}
}
OK(c, resultList)
}
2021-11-26 09:12:07 +00:00
type StatsPayeeQueryResult struct {
Payee string
Count int32
Position string
}
type StatsPayeeResult struct {
Payee string `json:"payee"`
Currency string `json:"operatingCurrency"`
Value json.Number `json:"value"`
}
type StatsPayeeResultSort []StatsPayeeResult
func (s StatsPayeeResultSort) Len() int {
return len(s)
}
func (s StatsPayeeResultSort) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
func (s StatsPayeeResultSort) Less(i, j int) bool {
a, _ := s[i].Value.Float64()
b, _ := s[j].Value.Float64()
return a <= b
}
func StatsPayee(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
var statsQuery StatsQuery
if err := c.ShouldBindQuery(&statsQuery); err != nil {
BadRequest(c, err.Error())
return
}
queryParams := script.QueryParams{
AccountLike: statsQuery.Prefix,
Year: statsQuery.Year,
Month: statsQuery.Month,
Where: true,
Currency: ledgerConfig.OperatingCurrency,
}
bql := fmt.Sprintf("SELECT '\\', payee, '\\', count(payee), '\\', sum(convert(value(position), '%s')), '\\'", ledgerConfig.OperatingCurrency)
statsPayeeQueryResultList := make([]StatsPayeeQueryResult, 0)
err := script.BQLQueryListByCustomSelect(ledgerConfig, bql, &queryParams, &statsPayeeQueryResultList)
if err != nil {
InternalError(c, err.Error())
return
}
result := make([]StatsPayeeResult, 0)
for _, l := range statsPayeeQueryResultList {
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
// 交易账户名称非空
2021-11-26 09:12:07 +00:00
if l.Payee != "" {
payee := StatsPayeeResult{
Payee: l.Payee,
Currency: ledgerConfig.OperatingCurrency,
}
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
//查询交易次数
2021-11-26 09:12:07 +00:00
if statsQuery.Type == "cot" {
payee.Value = json.Number(decimal.NewFromInt32(l.Count).String())
} else {
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
//查询交易金额,要过滤掉空白交易金额的科目,
// 比如 记账购买后又全额退款导致科目交易条目数>0但是累计金额=0
if l.Position != "" {
// 读取交易金额相关信息
fields := strings.Fields(l.Position)
// 交易金额
total, err := decimal.NewFromString(fields[0])
// 错误处理
if err != nil {
panic(err)
}
if statsQuery.Type == "avg" {
// 如果是查询平均交易金额
payee.Value = json.Number(total.Div(decimal.NewFromInt32(l.Count)).Round(2).String())
} else {
// 如果是查询总交易金额
payee.Value = json.Number(fields[0])
}
2021-11-26 09:12:07 +00:00
}
}
result = append(result, payee)
}
}
sort.Sort(StatsPayeeResultSort(result))
OK(c, result)
}
Squashed commit of the following: commit 7dc209490ba5aeca44ab736bc48727437e2af569 Author: liangzai450 <liangzai450@sina.com> Date: Tue Mar 12 00:47:07 2024 +0800 fixbug: 换行符导致的数组越界 commit 5875a7872b4f0a70e1cfbe38b81e62f7e788a9b5 Author: liangzai450 <liangzai450@sina.com> Date: Mon Mar 11 23:51:18 2024 +0800 暂存 commit 037e17569f49cc9ecea1ef1f5ca5c966e2a0a547 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:42:22 2024 +0800 fixbug: 换行符导致的数组越界 commit 9012ef633be647af212caa5d6d61316d7a7c3a1c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:30:05 2024 +0800 v1.1.15 commit 254e3e81bcae54cf146f615d54edf43e3a77babc Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 23:29:20 2024 +0800 update view, event sort rule commit 70ddfe9d5de8489632a0457f3b5054a19ec082a2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:44:29 2024 +0800 update viewpage commit cc66151531e7fc9298b656f13022f0a03618c8c7 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:30:56 2024 +0800 add: event api commit dfc2f1b36a4488428ffd3c06aab5c7799047a09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 10 22:05:40 2024 +0800 fixbug: 账户多次关闭或打开处理逻辑异常 commit 942c8595721a09076648e5703aee3f577d813ff4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 9 10:43:07 2024 +0800 fix: #71 account startDate endDate commit 51597551099cc37ec43dbe401527e1a8fcfef239 Author: RenLangMan <34146131+RenLangMan@users.noreply.github.com> Date: Fri Mar 8 13:00:30 2024 +0800 Update stats.go 商户消费排行某个月份返回无效值 解决方案 [#14 ](https://github.com/BaoXuebin/beancount-gs/issues/14) commit a339e1afe83c365efd03cf9a36601f78410d85cd Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 4 22:51:25 2024 +0800 fix: #66 multi currency transactions commit 344a6782ae2827e4862caae5639c80e5a8b41452 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:10:16 2023 +0800 add empty file commit 986e19b00f6e93ea96b7c0e34f905ae821638102 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 23:02:23 2023 +0800 update readme commit 618355a07d6dc2d37bf276ccc8e08e3b5a645eed Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:58 2023 +0800 v1.1.14 commit 01966ce2ec476fcb3220315bdb394eca7baa14ad Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:54:09 2023 +0800 update webview commit 017bf20c562de43a1aea73004a2b1a8a707bd7f2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 22:52:24 2023 +0800 update: auto refresh currency cache commit f0aa8ab0c0da53bf2d84c6230f2d42888ea32be3 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:52:23 2023 +0800 update viewpage commit 0743e59458677da80b31dcab5d190a12154f2c88 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:50:57 2023 +0800 update viewpage commit fd72ba8a2bc25865c2e5162c3139e9867158f509 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 18:47:49 2023 +0800 refactor price var commit e905eebf60ba51825d1c99a0100809b9fd04f110 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Dec 10 17:56:21 2023 +0800 temp commit commit 19dae50c072bdd4e240f64c7b7aaf25a1c8bce84 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 23:59:28 2023 +0800 multi currency transaction commit 89f287fe9053bd3dc96c70038971195c6aabd3bc Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 13:57:43 2023 +0800 feat: currency account add excahnge rate value and currency flag commit 512a6799c59172a76717d47253b942b6c4574354 Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Dec 7 01:24:24 2023 +0800 opti: multi currency appi commit 4ffe60112c936643c41662c1777b510f4278704c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 6 00:29:38 2023 +0800 add event api commit 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 17:57:48 2023 +0800 define event api commit a40875e78b57142e47c159efb48d4c637f6e11d1 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 5 16:21:12 2023 +0800 opti: multi commodity commit 29ca04a4763defe4eaf617fef6dda09f9f5c0042 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:40 2023 +0800 v1.1.13 commit 2e77a053c1d25e6f5be9ee51174091121c6acb17 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 3 00:01:26 2023 +0800 update webview commit 4841fe346a8c0f6c1e324394315e10813d6534e2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:32:52 2023 +0800 update webview commit ef9d5dd7c8ed72a412da477243a7df823e01396a Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 2 23:31:30 2023 +0800 update: stats account balance api add year and month query condition commit d88cd008a5ab5583eec8c80fa4ef955e22f8a8aa Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 1 23:23:59 2023 +0800 update: change alipay ledger template #54 commit 650f1e955fd786f3ccea3d302026e84436490d2a Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:14:01 2023 +0800 upgrade python version commit 0c5b866064e329dc86ad2cec720a544dc8de26ff Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 02:00:03 2023 +0800 fixbug commit a36aed000baeea4c6ca96fd86cdd7673fff728a4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 01:27:41 2023 +0800 fixbug commit b427d649b63cd7f66731d6dcb155c0d86f43aaf9 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:18:08 2023 +0800 update docker.yml commit 3da869bdd573a5a21ffab62faacb87e9c213fb06 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 10 00:04:24 2023 +0800 add logs folder commit 1f92f1ac7649abf3d7e2afcc7d63027332a69961 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:56:18 2023 +0800 update: github action commit cc6331cc81da2ed7ca3250bf59d55210d9203f2d Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:46:16 2023 +0800 update: dockerfile commit f4ce2fcef40bfe35b92fd455872b30b76c5ca411 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 23:13:16 2023 +0800 update: github action commit 40929240958d6aab2f776302f1d129e07f5ac894 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:56:22 2023 +0800 version 1.1.12 commit 8c027f1d0c1532037766dbde4088a23ecdb9ecb8 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:55:12 2023 +0800 update webview commit f497cfb000068ae64db6ac340dc75c0c7b5ce85e Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:54:43 2023 +0800 update webview commit 878b17f049685befc52439654b9eb489ce604f99 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:42 2023 +0800 doc: README.md commit 20afafd138f43c73586cfbeb4577b8b5044cae27 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Apr 9 22:53:26 2023 +0800 update: docker compose add env and default port change 10000 commit 222dc6af3ace1eaa950f40622e7ef884f0dda1da Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Feb 16 13:43:39 2023 +0800 fix: cannot include bean file #46 commit 7375c2b7d454aef8657fb6fb45abe139b143cfd2 Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:40 2022 +0800 v1.1.11 commit a035dcfe1e0b726d229655ac17100bec84e8443c Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Dec 28 00:03:13 2022 +0800 update webview commit 1da322e0938ba40a348bd406f18daec7401b0706 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 23:55:53 2022 +0800 add: icbc and abc batch import commit 46ea0c14604cf559cb91ebbc16092e56e07c0f32 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Dec 27 22:12:05 2022 +0800 del: source file content required validator commit 3ad974e4eba88446da4bf1baca1b83ad66531ac0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 18:41:34 2022 +0800 update: config dir from .beancount-ns change to .beancount-gs commit 7f83b3a3807141d3bbde1aae57dde05072682aa0 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Tue Dec 27 17:22:06 2022 +0800 docs: update readme guide link url commit f2d1e7329b48570afce7a0a8309abac1ecd14f88 Author: baoxuebin <baoxuebin@ienglish.cn> Date: Sat Oct 22 23:34:28 2022 +0800 fix: account balance failed when file is not exist. commit 09f58fef642d46eab7211ea543427351b2cad5e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:35:21 2022 +0800 version 1.1.10 commit 0d172a3988ea2a819a251a9e95d6599deaa205db Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:24:49 2022 +0800 check ledger api default return empty list commit ab6188da2b577379204c98cf9d2f1154f6a0275b Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Oct 15 19:02:06 2022 +0800 fixbug commit 0522600cde6a6a7276c7fa53c83aa15e999a5083 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:30:13 2022 +0800 version: 1.1.9 commit 264c9f584aab633f7e49514e97525fba6597b669 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Oct 11 23:29:16 2022 +0800 update new webview commit cb72b18513ffc4c0fb9ec5a10e209875c4bfbfbd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Sep 3 23:21:25 2022 +0800 update: 月份查询改为时间倒序 commit 735e32294201b67f16a67aa2e4dc135015cae400 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Aug 15 00:38:50 2022 +0800 add beancount syntax check api commit 2839749306057e50f570684639fdbe5d53729923 Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:59:51 2022 +0800 update readme commit 6d85a8ab993db7345e1d2ce5caf204aa556eaebf Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:30:48 2022 +0800 update webview commit 8c8b635f2e65ec16081219b365ae61ff88556a2b Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:28:40 2022 +0800 优化docker镜像大小#23 commit 19862e8e7138904883758739c6c416cc86fba2ca Author: BaoXuebin <baoxbin@hotmail.com> Date: Tue Jul 26 22:09:27 2022 +0800 fix: 支付宝账单过滤关闭的交易 commit 2c9b83c907d99a986fb061c96480cccc357d0d7d Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Jul 25 03:35:20 2022 +0800 version 1.1.8 commit 506e606591af391557612fc9c40d84d36f18a9c5 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:20:28 2022 +0800 fix: cannot close account #22 commit 517cb25e73afbc64e17625ed4135dfb515e829e6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jul 23 12:19:35 2022 +0800 fix: failed to bak file cause by linux file system case sensitivity #20 commit 81738c09d902cbd8307f14efbe3bc970ed1b584c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 23:26:48 2022 +0800 lint code commit 4f0284c5a066b646edd08fb594f4a5f8ad3fa968 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jul 3 22:59:01 2022 +0800 inte:golangci-lint commit 14cf8b3dec4e9b52a0b543a09e67ad1f1a828952 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:15:29 2022 +0800 version 1.1.7 commit f3a88c4b36bf135d4f2c61a99a2accc862f708e4 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:14:29 2022 +0800 update webview commit 8520e7d75fd280646b22c935331937df81f68676 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Jun 5 11:07:03 2022 +0800 add: query month calendar api commit 108dba4ea944356a8def92f03e89f68e55d90abd Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Jun 4 13:31:40 2022 +0800 fix: unix 换行符 change to '\n' commit 7cb64969b673e69590312142cca2302939d9ed45 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:59 2022 +0800 version 1.1.6 commit 7b2a06e5e28ab9d63b429490d9ebf5683b737f16 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat May 28 22:04:05 2022 +0800 update webview commit ad591921f7fd05b524c4aeec2c861a4d8fbeb09a Author: BaoXuebin <baoxbin@hotmail.com> Date: Thu Apr 14 00:23:08 2022 +0800 add: query commodity prices api commit 4fd6a57215d5542bf4d9ada7f6229ac6bebcf4ae Author: BaoXuebin <baoxbin@hotmail.com> Date: Wed Apr 13 00:30:38 2022 +0800 add: bean-report all_prices commit 659c1d7e151bf1d740cbd6b4d68bfbe830efdd53 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Apr 11 21:25:34 2022 +0800 fixbug: 账户平衡计算导致新增交易异常 commit 15a79c5790dd32aa47d82b398969a3e6433d6753 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:44:45 2022 +0800 update readme commit 8250e96c876ed2209cf06b4c7a7a95d96eb012d6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:12:50 2022 +0800 update 1.1.5 static file commit cae95602c5dcb8159047b2ec0cff1ffaa99908b6 Author: BaoXuebin <baoxbin@hotmail.com> Date: Mon Mar 21 00:01:15 2022 +0800 update 1.1.5 static file commit 5f28dec14df73f4f04ea10044a34a1951ff11173 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:57:14 2022 +0800 version 1.1.5 commit 8fcdbb43e6538cd47351d748abebc2a49db4532c Author: BaoXuebin <baoxbin@hotmail.com> Date: Sun Mar 20 23:55:05 2022 +0800 add multi stage transaction commit a2a29702d3767dc0a24179547822576e92110bba Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 16:18:27 2022 +0800 delete ledger add error handle commit 9f05766287230f99fd97846e052aa2199973dc55 Author: BaoXuebin <baoxbin@hotmail.com> Date: Sat Mar 19 15:44:15 2022 +0800 fix: alipay mobile csv file cannot import (#8) # Conflicts: # dockerfile
2024-03-17 15:57:21 +00:00
type StatsPricesResult struct {
Date string `json:"date"`
Commodity string `json:"commodity"`
Currency string `json:"operatingCurrency"`
Value string `json:"value"`
}
func StatsCommodityPrice(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
output := script.BeanReportAllPrices(ledgerConfig)
script.LogInfo(ledgerConfig.Mail, output)
statsPricesResultList := make([]StatsPricesResult, 0)
lines := strings.Split(output, "\n")
// foreach lines
for _, line := range lines {
if strings.Trim(line, " ") == "" {
continue
}
// split line by " "
words := strings.Fields(line)
statsPricesResultList = append(statsPricesResultList, StatsPricesResult{
Date: words[0],
Commodity: words[2],
Value: words[3],
Currency: words[4],
})
}
OK(c, statsPricesResultList)
}