Skip to content

Commit

Permalink
[fix] 优化ledger 日期格式 (#111)
Browse files Browse the repository at this point in the history
* 优化ledger 日期格式

* 删除无用文件
  • Loading branch information
ramsayleung authored Jun 18, 2023
1 parent a650ce4 commit 108fca1
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 69 deletions.
12 changes: 6 additions & 6 deletions example/alipay/example-alipay-output.ledger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:Alipay 0 CNY
Assets:Alipay:Invest:Fund 0 CNY
Assets:Alipay:Invest:Gold 0 CNY
Expand All @@ -15,7 +15,7 @@
Income:FIXME 0 CNY
Liabilities:CC:COMM:7449 0 CNY
Equity:Opening Balances
2023-01-18 * xxxx - 转账
2023/01/18 * xxxx - 转账
; category: "转账红包"
; method: "余额"
; orderId: "2xxxxxxxxxxxxxxxxxxxxxxxxx9"
Expand All @@ -26,7 +26,7 @@
Assets:Alipay 222228.50 CNY
Income:FIXME - 222228.50 CNY

2023-02-02 * 蚂蚁财富-蚂蚁(杭州)基金销售有限公司 - 蚂蚁财富-交银定期支付双息平衡混合-卖出至余额宝
2023/02/02 * 蚂蚁财富-蚂蚁(杭州)基金销售有限公司 - 蚂蚁财富-交银定期支付双息平衡混合-卖出至余额宝
; category: "投资理财"
; method: "余额宝"
; orderId: "2xxxxxxxxxxxxxxxxxxxxxxxxxx8"
Expand All @@ -37,7 +37,7 @@
Expenses:FIXME 99.34 CNY
Assets:Alipay - 99.34 CNY

2023-02-04 * xxxxxxx - 退款-亲情卡
2023/02/04 * xxxxxxx - 退款-亲情卡
; category: "退款"
; merchantId: "20xxxxxxxxxxxxxxxx5"
; method: "交通银行信用卡(7449)"
Expand All @@ -49,7 +49,7 @@
Liabilities:CC:COMM:7449 16.03 CNY
Expenses:FIXME - 16.03 CNY

2023-02-08 * x4***6 - 商品示例
2023/02/08 * x4***6 - 商品示例
; category: "日用百货"
; merchantId: "Txxxxxxxxxxxxx0"
; method: "余额"
Expand All @@ -61,7 +61,7 @@
Expenses:Groceries 20.00 CNY
Assets:Alipay - 20.00 CNY

2023-02-12 * xxxxxxxxxxxx - 亲情卡
2023/02/12 * xxxxxxxxxxxx - 亲情卡
; category: "亲友代付"
; merchantId: "20230xxxxxxx014741014xxxxxx"
; method: "交通银行信用卡(7449)"
Expand Down
18 changes: 9 additions & 9 deletions example/htsec/example-htsec-output.ledger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:Htsec:Cash 0 CNY
Assets:Htsec:Positions 0 CNY
Assets:Rule1:Cash 0 CNY
Expand All @@ -8,53 +8,53 @@
Income:Htsec:PnL 0 CNY
Income:Rule1:PnL 0 CNY
Equity:Opening Balances
2022-01-12 * "htsec" "卖-513050-中概互联"
2022/01/12 * "htsec" "卖-513050-中概互联"
Assets:Htsec:Positions -13000.00 "SH513050" @ 1.300 CNY
Assets:Htsec:Cash 16900.00 CNY
Assets:Htsec:Cash -0.85 CNY
Expenses:Htsec:Commission 0.85 CNY
Income:Htsec:PnL

2022-01-13 * htsec-买-002304-洋河股份
2022/01/13 * htsec-买-002304-洋河股份
Assets:Htsec:Cash -16011.00 CNY
Assets:Htsec:Positions 100.00 "SZ002304" @@ 16011.00 CNY; {160.110 CNY}
Assets:Htsec:Cash -1.60 CNY
Expenses:Htsec:Commission 1.60 CNY

2022-01-19 * "htsec" "卖-519888-添富快线"
2022/01/19 * "htsec" "卖-519888-添富快线"
Assets:Htsec:Positions -128.00 "SH519888" @ 0.010 CNY
Assets:Htsec:Cash 1.28 CNY
Assets:Htsec:Cash -0.00 CNY
Expenses:Htsec:Commission 0.00 CNY
Income:Htsec:PnL

2022-01-19 * htsec-买-159938-医药卫生ETF
2022/01/19 * htsec-买-159938-医药卫生ETF
Assets:Htsec:Cash -760.80 CNY
Assets:Htsec:Positions 400.00 "SZ159938" @@ 760.80 CNY; {1.902 CNY}
Assets:Htsec:Cash -0.04 CNY
Expenses:Htsec:Commission 0.04 CNY

2022-01-21 * "htsec" "卖-113052-兴业转债"
2022/01/21 * "htsec" "卖-113052-兴业转债"
Assets:Rule1:Positions -10.00 "SH113052" @ 116.250 CNY
Assets:Rule1:Cash 1162.50 CNY
Assets:Rule1:Cash -0.20 CNY
Expenses:Rule1:Commission 0.20 CNY
Income:Rule1:PnL

2022-01-21 * "htsec" "卖-002027-分众传媒"
2022/01/21 * "htsec" "卖-002027-分众传媒"
Assets:Htsec:Positions -500.00 "SZ002027" @ 8.040 CNY
Assets:Htsec:Cash 4020.00 CNY
Assets:Htsec:Cash -4.42 CNY
Expenses:Htsec:Commission 4.42 CNY
Income:Htsec:PnL

2022-01-21 * htsec-买-159938-医药卫生ETF
2022/01/21 * htsec-买-159938-医药卫生ETF
Assets:Htsec:Cash -5269.30 CNY
Assets:Htsec:Positions 2900.00 "SZ159938" @@ 5269.30 CNY; {1.817 CNY}
Assets:Htsec:Cash -0.26 CNY
Expenses:Htsec:Commission 0.26 CNY

2022-01-27 * htsec-买-072988-豪美发债
2022/01/27 * htsec-买-072988-豪美发债
Assets:Htsec:Cash -1000.00 CNY
Assets:Htsec:Positions 10.00 "SZ072988" @@ 1000.00 CNY; {100.000 CNY}
Assets:Htsec:Cash -0.00 CNY
Expand Down
8 changes: 4 additions & 4 deletions example/huobi/example-huobi-output.ledger
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:Huobi:Cash 0 CNY
Assets:Huobi:Positions 0 CNY
Assets:Rule1:Cash 0 CNY
Expand All @@ -8,19 +8,19 @@
Income:Huobi:PnL 0 CNY
Income:Rule1:PnL 0 CNY
Equity:Opening Balances
2021-02-23 * Huobi-币币交易-买入-BTC/USDT
2021/02/23 * Huobi-币币交易-买入-BTC/USDT
Assets:Rule1:Cash -13.98369600 "USDT"
Assets:Rule1:Positions 0.00030400 "BTC" @@ 13.98369600 "USDT" ; {45999.00000000 "USDT" }
Assets:Rule1:Cash -0.00000060 "BTC" @ 45999.00000000 "USDT"
Expenses:Rule1:Commission 0.00000060 "BTC" @ 45999.00000000 "USDT"

2021-02-23 * Huobi-币币交易-买入-BTC1S/USDT
2021/02/23 * Huobi-币币交易-买入-BTC1S/USDT
Assets:Rule1:Cash -5.60652159 "USDT"
Assets:Rule1:Positions 4.57600000 "BTC1S" @@ 5.60652159 "USDT" ; {1.22520000 "USDT" }
Assets:Rule1:Cash -0.00915201 "BTC1S" @ 1.22520000 "USDT"
Expenses:Rule1:Commission 0.00915201 "BTC1S" @ 1.22520000 "USDT"

2021-02-24 * Huobi-币币交易-卖出-BTC/USDT
2021/02/24 * Huobi-币币交易-卖出-BTC/USDT
Assets:Huobi:Positions -0.00010800 "BTC" @ 49850.00000000 "USDT"
Assets:Huobi:Cash 5.38380000 "USDT"
Assets:Huobi:Cash -0.01076760 "USDT"
Expand Down
10 changes: 5 additions & 5 deletions example/icbc/credit/example-icbc-credit-output.ledger
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:Bank:CN:ICBC:Savings 0 CNY
Assets:FIXME 0 CNY
Expenses:FIXME 0 CNY
Expenses:Transport:Highway 0 CNY
Equity:Opening Balances
2023-03-20 * 广东联合电子收费股份
2023/03/20 * 广东联合电子收费股份
; balances: "-16042.73"
; currency: "人民币"
; source: "中国工商银行"
Expand All @@ -13,7 +13,7 @@
Expenses:Transport:Highway 29.45 CNY
Liabilities:Bank:CN:ICBC - 29.45 CNY

2023-04-22 * XX旗舰店
2023/04/22 * XX旗舰店
; balances: "-6086.11"
; currency: "人民币"
; source: "中国工商银行"
Expand All @@ -22,7 +22,7 @@
Expenses:FIXME 0.01 CNY
Liabilities:Bank:CN:ICBC - 0.01 CNY

2023-04-25 * XX分行银行卡中心
2023/04/25 * XX分行银行卡中心
; balances: "-1971.63"
; currency: "人民币"
; source: "中国工商银行"
Expand All @@ -31,7 +31,7 @@
Liabilities:Bank:CN:ICBC 4621.01 CNY
Assets:Bank:CN:ICBC:Savings - 4621.01 CNY

2023-05-04 * 广东联合电子收费股份
2023/05/04 * 广东联合电子收费股份
; balances: "-3684.62"
; currency: "人民币"
; source: "中国工商银行"
Expand Down
14 changes: 7 additions & 7 deletions example/icbc/debit/example-icbc-debit-output.ledger
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:Borrow 0 CNY
Assets:FIXME 0 CNY
Expenses:FIXME 0 CNY
Income:Bank:ICBC:CreditCard 0 CNY
Liabilities:Bank:CMB:CreditCard 0 CNY
Equity:Opening Balances
2023-02-10 * 总行信用卡合伙人
2023/02/10 * 总行信用卡合伙人
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "总行信用卡合伙人"
Expand All @@ -15,7 +15,7 @@
Assets:Bank:CN:ICBC 30.00 CNY
Income:Bank:ICBC:CreditCard - 30.00 CNY

2023-02-20 * 手机银行 张三
2023/02/20 * 手机银行 张三
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "张三"
Expand All @@ -25,7 +25,7 @@
Assets:Borrow 1234.56 CNY
Assets:Bank:CN:ICBC - 1234.56 CNY

2023-04-14 * ABC公司
2023/04/14 * ABC公司
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "ABC公司"
Expand All @@ -35,7 +35,7 @@
Assets:Bank:CN:ICBC 1234.56 CNY
Assets:FIXME - 1234.56 CNY

2023-04-14 * 手机银行 王五
2023/04/14 * 手机银行 王五
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "王五"
Expand All @@ -45,7 +45,7 @@
Assets:Borrow 500.00 CNY
Assets:Bank:CN:ICBC - 500.00 CNY

2023-04-20 * 银联无卡支付业务((特约)掌上生活还款)
2023/04/20 * 银联无卡支付业务((特约)掌上生活还款)
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "银联无卡支付业务((特约)掌上生活还款)"
Expand All @@ -55,7 +55,7 @@
Liabilities:Bank:CMB:CreditCard 1234.56 CNY
Assets:Bank:CN:ICBC - 1234.56 CNY

2023-04-22 * 李四
2023/04/22 * 李四
; cardName: "这是卡别名"
; currency: "人民币"
; peerAccount: "李四"
Expand Down
20 changes: 10 additions & 10 deletions example/td/example-td-output.ledger
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
1970-01-01 * Open Balance
1970/01/01 * Open Balance
Assets:FIXME 0 CAD
Expenses:FIXME 0 CAD
Expenses:Grocery 0 CAD
Income:FIXME 0 CAD
Income:Salary 0 CAD
Equity:Opening Balances
2023-05-01 * TD - DOLLARAMA # 845 _M
2023/05/01 * TD - DOLLARAMA # 845 _M
; :grocery_tag1:cheap_tag2:
Expenses:Grocery 1.96 CAD
Assets:DebitCard:TDChequing - 1.96 CAD

2023-05-01 * TD - T T SUPERMARKET _M
2023/05/01 * TD - T T SUPERMARKET _M
; :tt_tag:
Expenses:Grocery 12.10 CAD
Assets:DebitCard:TDChequing - 12.10 CAD

2023-05-01 * TD - PTS TO: 02816700587
2023/05/01 * TD - PTS TO: 02816700587
Expenses:FIXME 10.00 CAD
Assets:DebitCard:TDChequing - 10.00 CAD

2023-05-01 * TD - SFCA MSP
2023/05/01 * TD - SFCA MSP
Assets:DebitCard:TDChequing 0.01 CAD
Assets:FIXME - 0.01 CAD

2023-05-01 * TD - ICBC AGENT #942
2023/05/01 * TD - ICBC AGENT #942
Expenses:FIXME 35.00 CAD
Assets:DebitCard:TDChequing - 35.00 CAD

2023-05-01 * TD - DOLLARAMA # 845 _M
2023/05/01 * TD - DOLLARAMA # 845 _M
; :grocery_tag1:cheap_tag2:
Expenses:Grocery 15.68 CAD
Assets:DebitCard:TDChequing - 15.68 CAD

2023-05-01 * TD - T T SUPERMARKET _M
2023/05/01 * TD - T T SUPERMARKET _M
; :tt_tag:
Expenses:Grocery 5.30 CAD
Assets:DebitCard:TDChequing - 5.30 CAD

2023-05-02 * TD - SEND E-TFR ***Y4h
2023/05/02 * TD - SEND E-TFR ***Y4h
Expenses:FIXME 239.13 CAD
Assets:DebitCard:TDChequing - 239.13 CAD

2023-05-03 * TD - DEVELOPM MSP
2023/05/03 * TD - DEVELOPM MSP
Assets:DebitCard:TDChequing 332.22 CAD
Income:Salary - 332.22 CAD

Loading

0 comments on commit 108fca1

Please sign in to comment.