(cbast): Fix debit sign error.

This commit is contained in:
2026-01-14 00:45:50 +10:00
parent d7cf65d8fc
commit b97ede7371
6 changed files with 190 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
Date,Transaction,Debit,Credit,Balance
2018-04-01,2018 OPENING BALANCE,,,107.95
2018-04-01,Account Fee,6.00,,101.95
2018-04-04,Direct Credit 015895,,399.01,500.96
2018-04-13,Direct Debit 066228 ERGON,882.81,,-381.85
2018-04-17,Direct Debit 062246 CommInsure,53.82,,442.14
2018-04-18,Direct Credit 015895 FAO FAMILIES,,399.01,841.15
2018-04-26,Transfer to xx3555 NetBank,800.00,,41.15
2018-05-01,Account Fee,6.00,,35.15
2018-05-01,Direct Credit 011802 Col First State,,53.62,88.77
2018-05-02,Direct Credit 015895 FAO FAMILIES,,399.01,487.78
2018-05-03,Transfer to xx3555 NetBank,400.00,,87.78
2018-05-16,Direct Credit 015895 FAO FAMILIES,,399.01,486.79
2018-05-17,Direct Debit 062246 CommInsure,53.82,,432.97
2018-05-21,Transfer to xx3555 NetBank,300.00,,132.97
2018-05-30,Direct Credit 015895 FAO FAMILIES,,399.01,531.98
2018-06-01,Account Fee,6.00,,525.98
2018-06-13,Direct Credit 015895 FAO FAMILIES,,399.01,924.99
1 Date Transaction Debit Credit Balance
2 2018-04-01 2018 OPENING BALANCE 107.95
3 2018-04-01 Account Fee 6.00 101.95
4 2018-04-04 Direct Credit 015895 399.01 500.96
5 2018-04-13 Direct Debit 066228 ERGON 882.81 -381.85
6 2018-04-17 Direct Debit 062246 CommInsure 53.82 442.14
7 2018-04-18 Direct Credit 015895 FAO FAMILIES 399.01 841.15
8 2018-04-26 Transfer to xx3555 NetBank 800.00 41.15
9 2018-05-01 Account Fee 6.00 35.15
10 2018-05-01 Direct Credit 011802 Col First State 53.62 88.77
11 2018-05-02 Direct Credit 015895 FAO FAMILIES 399.01 487.78
12 2018-05-03 Transfer to xx3555 NetBank 400.00 87.78
13 2018-05-16 Direct Credit 015895 FAO FAMILIES 399.01 486.79
14 2018-05-17 Direct Debit 062246 CommInsure 53.82 432.97
15 2018-05-21 Transfer to xx3555 NetBank 300.00 132.97
16 2018-05-30 Direct Credit 015895 FAO FAMILIES 399.01 531.98
17 2018-06-01 Account Fee 6.00 525.98
18 2018-06-13 Direct Credit 015895 FAO FAMILIES 399.01 924.99

View File

@@ -0,0 +1,11 @@
[beanify]
default-converter = "cbast_v0"
rule-interface = "json"
theme = "black"
[rules.json]
rulepath = "./rules.json"
[converters.cbast_v0]
asset-account = "Liabilities:CBA:Streamline"
asset-currency = "AUD"

View File

@@ -0,0 +1,80 @@
2018-04-01 * "Account Fees" ""
; Account Fee
Liabilities:CBA:Streamline -6.0 AUD
Expenses:Fees 6.0 AUD
2018-04-04 * "Tenants" ""
; Direct Credit 015895
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD
2018-04-13 * "Ergon Energy" ""
; Direct Debit 066228 ERGON
Liabilities:CBA:Streamline -882.81 AUD
Expenses:Electricity 882.81 AUD
2018-04-17 * "CommInsure" ""
; Direct Debit 062246 CommInsure
Liabilities:CBA:Streamline -53.82 AUD
Expenses:Insurance 53.82 AUD
2018-04-18 * "Tenants" ""
; Direct Credit 015895 FAO FAMILIES
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD
2018-04-26 * "Transfer" ""
; Transfer to xx3555 NetBank
Liabilities:CBA:Streamline -800.0 AUD
Assets:3555 800.0 AUD
2018-05-01 * "Account Fees" ""
; Account Fee
Liabilities:CBA:Streamline -6.0 AUD
Expenses:Fees 6.0 AUD
2018-05-01 * "Colonial First State" ""
; Direct Credit 011802 Col First State
Income:Trading -53.62 AUD
Liabilities:CBA:Streamline 53.62 AUD
2018-05-02 * "Tenants" ""
; Direct Credit 015895 FAO FAMILIES
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD
2018-05-03 * "Transfer" ""
; Transfer to xx3555 NetBank
Liabilities:CBA:Streamline -400.0 AUD
Assets:3555 400.0 AUD
2018-05-16 * "Tenants" ""
; Direct Credit 015895 FAO FAMILIES
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD
2018-05-17 * "CommInsure" ""
; Direct Debit 062246 CommInsure
Liabilities:CBA:Streamline -53.82 AUD
Expenses:Insurance 53.82 AUD
2018-05-21 * "Transfer" ""
; Transfer to xx3555 NetBank
Liabilities:CBA:Streamline -300.0 AUD
Assets:3555 300.0 AUD
2018-05-30 * "Tenants" ""
; Direct Credit 015895 FAO FAMILIES
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD
2018-06-01 * "Account Fees" ""
; Account Fee
Liabilities:CBA:Streamline -6.0 AUD
Expenses:Fees 6.0 AUD
2018-06-13 * "Tenants" ""
; Direct Credit 015895 FAO FAMILIES
Income:Tenants -399.01 AUD
Liabilities:CBA:Streamline 399.01 AUD

View File

@@ -0,0 +1,72 @@
{
"cbast_v0": {
"rules": [
{
"record_fields": {
"target_account": "Account Fee"
},
"transaction_fields": {
"flag": "*",
"payee": "Account Fees",
"target_account": "Expenses:Fees"
},
"extended": false
},
{
"record_fields": {
"target_account": "Direct Debit 066228 ERGON"
},
"transaction_fields": {
"flag": "*",
"payee": "Ergon Energy",
"target_account": "Expenses:Electricity"
},
"extended": false
},
{
"record_fields": {
"target_account": "Direct Debit 062246 CommInsure"
},
"transaction_fields": {
"flag": "*",
"payee": "CommInsure",
"target_account": "Expenses:Insurance"
},
"extended": false
},
{
"record_fields": {
"target_account": "Transfer to xx3555 NetBank"
},
"transaction_fields": {
"flag": "*",
"payee": "Transfer",
"target_account": "Assets:3555"
},
"extended": false
},
{
"record_fields": {
"source_account": "Direct Credit 015895"
},
"transaction_fields": {
"flag": "*",
"payee": "Tenants",
"source_account": "Income:Tenants"
},
"extended": true
},
{
"record_fields": {
"source_account": "Direct Credit 011802 Col First State"
},
"transaction_fields": {
"flag": "*",
"payee": "Colonial First State",
"source_account": "Income:Trading"
},
"extended": true
}
]
}
}

View File

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