Add converter test data

This commit is contained in:
2026-01-05 19:40:26 +10:00
parent 3b37c62f17
commit 6ad7c0362a
10 changed files with 279 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
29/06/2025,"-70.40","AMAZON AU MARKETPLACE SYDNEY",""
24/06/2025,"-322.39","APIA BRISBANE QLD",""
24/06/2025,"-8.00","MONTHLY FEE",""
17/06/2025,"-515.43","BPAYN ERGON ENERGY RETAILBPAY",""
15/06/2025,"-1.19","INTNL TRANSACTION FEE",""
14/06/2025,"-8.64","INTNL TRANSACTION FEE",""
11/06/2025,"-0.86","INTNL TRANSACTION FEE",""
04/06/2025,"+2897.86","PAYMENT RECEIVED, THANK YOU",""
1 29/06/2025 -70.40 AMAZON AU MARKETPLACE SYDNEY
2 24/06/2025 -322.39 APIA BRISBANE QLD
3 24/06/2025 -8.00 MONTHLY FEE
4 17/06/2025 -515.43 BPAYN ERGON ENERGY RETAILBPAY
5 15/06/2025 -1.19 INTNL TRANSACTION FEE
6 14/06/2025 -8.64 INTNL TRANSACTION FEE
7 11/06/2025 -0.86 INTNL TRANSACTION FEE
8 04/06/2025 +2897.86 PAYMENT RECEIVED, THANK YOU

View File

@@ -0,0 +1,10 @@
[beanify]
default-converter = "cbacsv_v0"
rule-interface = "json"
[rules.json]
rulepath = "./rules.json"
[converters.cbacsv_v0]
asset-account = "Liabilities:CBA:CreditCard"
asset-currency = "AUD"

View File

@@ -0,0 +1,40 @@
2025-06-29 ! "Amazon" "Something from Amazon AU"
; AMAZON AU MARKETPLACE SYDNEY
Liabilities:CBA:CreditCard -70.4 AUD
Expenses:Shopping:Amazon 70.4 AUD
2025-06-24 * "APIA" "House Insurance"
; APIA BRISBANE QLD
Liabilities:CBA:CreditCard -322.39 AUD
Expenses:House:Insurance 322.39 AUD
2025-06-24 * "CBA" "Bank Fees"
; MONTHLY FEE
Liabilities:CBA:CreditCard -8.0 AUD
Expenses:Fees 8.0 AUD
2025-06-17 * "Ergon Energy" "Electricity Bill"
; BPAYN ERGON ENERGY RETAILBPAY
Liabilities:CBA:CreditCard -515.43 AUD
Expenses:House:Electricity 515.43 AUD
2025-06-15 ! "CBA" "International Transaction Fee"
; INTNL TRANSACTION FEE
Liabilities:CBA:CreditCard -1.19 AUD
Expenses:CBA:Fees 1.19 AUD
2025-06-14 ! "CBA" "International Transaction Fee"
; INTNL TRANSACTION FEE
Liabilities:CBA:CreditCard -8.64 AUD
Expenses:CBA:Fees 8.64 AUD
2025-06-11 ! "CBA" "International Transaction Fee"
; INTNL TRANSACTION FEE
Liabilities:CBA:CreditCard -0.86 AUD
Expenses:CBA:Fees 0.86 AUD
2025-06-04 ! "" "Credit Card Payment"
; PAYMENT RECEIVED, THANK YOU
Assets:OtherBankAccount -2897.86 AUD
Liabilities:CBA:CreditCard 2897.86 AUD

View File

@@ -0,0 +1,69 @@
{
"cbacsv_v0": {
"rules": [
{
"record_fields": {
"target_account": "AMAZON AU MARKETPLACE"
},
"transaction_fields": {
"payee": "Amazon",
"narration": "Something from Amazon AU",
"target_account": "Expenses:Shopping:Amazon"
}
},
{
"record_fields": {
"target_account": "APIA"
},
"transaction_fields": {
"flag": "*",
"payee": "APIA",
"narration": "House Insurance",
"target_account": "Expenses:House:Insurance"
}
},
{
"record_fields": {
"target_account": "MONTHLY FEE"
},
"transaction_fields": {
"flag": "*",
"payee": "CBA",
"narration": "Bank Fees",
"target_account": "Expenses:Fees"
}
},
{
"record_fields": {
"target_account": "BPAYN ERGON ENERGY RETAILBPAY"
},
"transaction_fields": {
"flag": "*",
"payee": "Ergon Energy",
"narration": "Electricity Bill",
"target_account": "Expenses:House:Electricity"
}
},
{
"record_fields": {
"target_account": "INTNL TRANSACTION FEE"
},
"transaction_fields": {
"payee": "CBA",
"narration": "International Transaction Fee",
"target_account": "Expenses:CBA:Fees"
}
},
{
"record_fields": {
"source_account": "PAYMENT RECEIVED, THANK YOU",
"target_account": "ACCOUNT"
},
"transaction_fields": {
"narration": "Credit Card Payment",
"source_account": "Assets:OtherBankAccount"
}
}
]
}
}

View File

@@ -0,0 +1,7 @@
COMMAND="beanify --config config.toml cbacsv_transactions.csv --batch"
if diff <($COMMAND) expected.ledger; then
echo "Files match"
else
echo "Files do not match"
fi