Credit card charges and payments

71 views
Skip to first unread message

Oliver Hardy

unread,
Aug 8, 2020, 6:11:45 PM8/8/20
to Ledger
If I run a balance inquiry in ledger, at the end of a long list are 2 entries:
-$2500.00 Liabilities:Credit_Card
  $2300.00 Liabilities:Credit_Card

The first entry is how much I've charged to the card. The second entry is my latest payment. The $200 difference is how much I
currently owe on the card.

2 Questions:

1) Is this how it is supposed to look when one runs a balance report with 2 entries for Liabilities:Credit_Card?
2)Is there a command to run to find what I currently owe or do I always need to pull out a calculator and subtract?

Thank you

Remco Rijnders

unread,
Aug 8, 2020, 7:55:25 PM8/8/20
to ledge...@googlegroups.com
On Sat, Aug 08, 2020 at 03:11:45PM -0700, Oliver wrote in
<0371f69e-5077-4e93...@googlegroups.com>:
>If I run a balance inquiry in ledger, at the end of a long list are 2
>entries:
>-$2500.00 Liabilities:Credit_Card
> $2300.00 Liabilities:Credit_Card
>
>The first entry is how much I've charged to the card. The second entry is
>my latest payment. The $200 difference is how much I
>currently owe on the card.
>
>2 Questions:
>
>1) Is this how it is supposed to look when one runs a balance report with 2
>entries for Liabilities:Credit_Card?

No, the entries should show you the "balance", so in this case
-$200.00 and each account should appear in the balance just once.

>2)Is there a command to run to find what I currently owe or do I always
>need to pull out a calculator and subtract?

The output you get looks suspect. It should work without a calculator
and just show you the balance. Can you show us the command you used to
run the balance report? Do any of your other accounts exhibit this
same problem, or is it just the Credit_Card account? I notice your
amounts are all nice and rounded. Did you change the amounts for the
sake of simplifying your question and/or hiding private details? Are
the 2500 and 2300 amounts single entries in your ledger file, or are
they composed of multiple entries?

Kind regards,

Remco
signature.asc

Michael Cooper

unread,
Aug 8, 2020, 8:12:25 PM8/8/20
to Ledger
In ledger negatives go between the commodity and the amount. So instead of -$100 you should right $-100.

It looks to me like you have 2,300 of the commodity "$" and 2,500 of the commodity "-$", and ledger is treating them as separate, unrelated commodities.

If you change your negatives to the $-100 form, I expect it will work like you want.


--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/Xy87aIyg0MKMoNDC%40settler.

Martin Michlmayr

unread,
Aug 8, 2020, 9:51:42 PM8/8/20
to ledge...@googlegroups.com
* Michael Cooper <myt...@gmail.com> [2020-08-08 17:12]:
> In ledger negatives go between the commodity and the amount. So
> instead of -$100 you should right $-100.

Both should actually work fine and can be mixed.

ledger -f d bal test1 master
$8 Assets:Test1

2020-08-09 * Test
Assets:Test1 $10
Assets:Test2 -$10

2020-08-09 * Test
Assets:Test1 -$1
Assets:Test2 $1

2020-08-09 * Test
Assets:Test1 $-1
Assets:Test2 $1

--
Martin Michlmayr
https://www.cyrius.com/

Yuri Khan

unread,
Aug 9, 2020, 4:20:29 AM8/9/20
to Ledger
On Sun, 9 Aug 2020 at 07:12, Michael Cooper <myt...@gmail.com> wrote:

> In ledger negatives go between the commodity and the amount. So instead of -$100 you should right $-100.

Offtopic and possibly a point of contention: The “$” sign should be
avoided anyway, because it’s ambiguous. It could mean a USD, a CAD, an
AUD, an NZD, or a dozen other currencies.

When using an ISO 4217 currency code, it naturally[^*] stands after
the number so the question never arises whether the negative sign or
the currency comes first.

[^*]: Possibly another point of contention.

Oliver Hardy

unread,
Aug 9, 2020, 9:37:54 AM8/9/20
to Ledger
I've solved the issue of the 2 entries at the end of my balance inquiry - it was the result of a misspelling in one of the entries. I still have the issue
of the entry not being correct.

Running 'ledger balance' shows a credit card balance of $2,273.82. It should show $208.70.

When I charge something to my card, I record the entry as:

2020/08/01 Barbecue
    Expenses:Dining  $50.00
    Liabilities:Credit_Card

When I pay my credit card bill;
2020/08/02 MyBank
    Liabilities:Credit_Card   $50.00 ; credit card payment
    Assets:Checking

If I'm doing something wrong I have no idea what it could be.

Thank you

Remco Rijnders

unread,
Aug 9, 2020, 10:19:12 AM8/9/20
to ledge...@googlegroups.com
On Sun, Aug 09, 2020 at 06:37:53AM -0700, Oliver wrote in
<0d814e00-e940-40cb...@googlegroups.com>:
>I've solved the issue of the 2 entries at the end of my balance inquiry -
>it was the result of a misspelling in one of the entries. I still have the
>issue
>of the entry not being correct.

That's not what your initial email showed though, there both were
spelled the same way.

>Running 'ledger balance' shows a credit card balance of $2,273.82. It
>should show $208.70.

I think you still might have a misspelling somewhere. Run ledger with
the command "accounts" instead of "balance" to show all the accounts
you have in use.

Oliver Hardy

unread,
Aug 9, 2020, 12:04:27 PM8/9/20
to Ledger
I think I've fixed it. It wasn't a mis-spelling but close.
At the beginning of my ledger file I had:
Opening Balances
Liabilities:CreditCard  $1470.76

I changed that to:
Liabilities:CreditCard  $-1470.76

and the credit card balance now seems to be correct.

My thanks to all who replied trying to help and my apologies for taking up the group's time with what
turned out to be a beginner error.

On Saturday, August 8, 2020 at 10:11:45 PM UTC, Oliver Hardy wrote:
Reply all
Reply to author
Forward
0 new messages