I find using custom payees for a single part of a transaction works out 
really well:

2014/1/1 Salary
    Income:Salary $100
    Assets:Health Accounts:HSA:HSA Bank    $2.00  ; Payee: Employee 
Contribution
    Assets:Health Accounts:HSA:HSA Bank    $1.00  ; Payee: Individual 
Contribution
    ....

2014/1/12 Transfer/HSA contrib
    Assets:Checking Account
    Assets:Health Accounts:HSA:HSA Bank    $4.00  ; Payee: Individual 
Contribution
    ....

2014/1/12 Transfer/HSA contrib
    Assets:Checking Account
    Assets:Health Accounts:HSA:HSA Bank    $1.00  ; Payee: Nondeductible 
Contribution
    ....

Then, you can determine different types of contributions separately:
ledger reg ".*:HSA.*" and @Individual
ledger reg ".*:HSA.*" and @Employer
ledger reg ".*:HSA.*" and @Nondeductible

Hope that helps.





> On Sunday, July 20, 2014 8:19:11 PM UTC-7, Nathan Grigg wrote:
> I’ve been thinking about how to track transfers into a certain account, 
for example, a Health Savings Account or 401k.
> 
> For example:
> 
> 2014-06-01 Transfer
>     Assets:Health Savings  $500
>     Assets:Checking
> 
> 2014-06-10 Doctor
>     Expenses:Health  $200
>     Assets:Health Savings
> 
> 2014-07-01 Interest
>     Assets:Health Savings  $0.25
>     Income:Interest
> 
> For tax purposes, I care about the total amount transferred in ($500 in 
this case).
> 
> Solution 1: Tags.
> 2014-06-01 Transfer
>     Assets:Health Savings  $500
>     ; Taxes: HSA Contribution
>     Assets:Checking
> 
> Now leger bal "Assets:Health Savings” and “%Taxes=HSA Contribution” gives 
me $500. The downside is that tags can be difficult to work with. (For 
example, can you match a tag value by regex? Not that I can see)
> 
> Solution 2: extra accounts. I’ve put them under Expenses, because that 
seems most apt, but still a little weird.
> 
> 2014-06-01 Transfer
>     Expenses:HSA:Contribution $500
>     Expenses:HSA:Transfer -$500
>     Assets:Health Savings  $500
>     Assets:Checking
> 
> Now leger bal “Expenses:HSA:Contribution" gives me $500. The downside is 
that this is more verbose. You also have a more or less meaningless account 
in Expenses:HSA:Transfer. You can use automated transactions to clean up 
data entry, but it still may not be worth it. Also, I’m soured on automatic 
transactions since rediscovering bug 983 
http://bugs.ledger-cli.org/show_bug.cgi?id=983.
> 
> Does anyone else try to solve this problem? Is there a solution I’m 
overlooking?
> 
> Nathan
> 

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to