How does one convert assets to comodities?

So say that I have purchased materials.

I put them in an account like Reserve Inventory, and I put in the entry comments how much of that item has been added to the Reserve Inventory for that material. So that covers how much it costs and what account I used to purchase it.

But now maybe there's only a certain amount of the material; does it then become a commodity where I can track how much of it there as a commodity, with how much I got for what I paid for it, and then as I use up the material it is fed into another account with a batch number on it, so I know how much of that material was used where?

Possibly related links:

Maybe you can show some some pseudo-journal entries of what you have in mind ?

Well here ya go, it looks like the video author has gone off about commodities as they are in the stock market and with those prices here in the example I transcribed below; but the author also tracks time in ledger. And uses different amounts to do so; So I thought maybe I could use it to track how much of the inventory I have and then what recipe it ends up in. With this information I could then see if a recipe is going to cost me more to make because n ingredients went up in price; and then I will also know what to charge for them, because I know how much it cost to make.

2026-01-03 Tom's Restaurant Emporium
  Assets:Reserve Ingredients:Vegetable Oil  12.88 ; No tax on this because we're in PA.  And it's 192 oz. in 2x bottles sold together
  Assets:Cash:Trusty Trust Business Bank  -12.88

Stock Prices of Commodities with ledger example:

So I was watching a video about ledger where they talked about price databases and how to use them with ledger and it went something like this:

We can build a price database with up to the second resolution for tracking long term securities; it's best to use the market close at a single date.

Note that these are not real prices for VTI.

I started that but then the swings simply weren't enough to be able to show the next could of slides.

P 2017/07/01 16:00:00 VTI 124.45 USD
P 2017/07/03 16:00:00 VTI 125.75 USD
P 2017/07/05 16:00:00 VTI 128.89 USD
P 2017/07/07 16:00:00 VTI 139.66 USD
P 2017/07/09 16:00:00 VTI 133.45 USD
P 2017/07/11 16:00:00 VTI 128.58 USD

exercise2.pricedb


ledger -r exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/2
0 Assets
-1000 USD   Cash:Bank:Checking
1000 USD   Investments:Vanguard:RothIRA
-------    
0    

We use a slightly different command to run our balanced report now.

We provide the price database file and then use the -V command to instruct ledger to resolve the current value of the Commondities in the price database.

We also use the --end command to say when we want the report to end instead of running it for all data.


ledger -f excerise2.ledger --price-db exercise2.pricedb bal -V --end 7/4
10 USD Assets
-1000 USD   Cash:Bank:Checking
1010 USD   Investments:Vanguard:RothIRA
-------    
10 USD    

When I run it again a few days later; or a few days later end date, you can see that the value changed.


ledger -f exercise2.ledger --price-db exercise2.pricedb -V --end 7/8

That zero sum is gone because we have a gain!

122 USD Assets
-1000 USD   Cash:Bank:Checking
1122 USD   Investments:Vanguard:RothIRA
-------    
122 USD    

And a few days later we have another gain.


72 USD Assets
-1000 USD   Cash:Bank:Checking
1072 USD   Investments:Vanguard:RothIRA
-------    
72 USD    

OOO! You lost money. It's starting to go down.

You're not broke its just a market down day.

Time Keeping Example:

This is the feature of ledger I use daily, the most. I kept my time in this format for about two years and was recently asked to resume this procedure at my new job where we're now tracking time again.

Here's an example of the timekeeping syntax it's really, really simple.

Accounting]
o 2017/06/23 10:00:00

i 2017/07/09 20:15:00 CodeAndSupply:Talks [Plain Text Accounting]
o 2017/07/10 00:06:48 

i 2017/07/11 22:00:00 CodeAndSupply:Email [Uptime Sponsorship]
o 2017/07/11 22:15:00

i 2017/07/11 22:15:00 CodeAndSupply:Talks [Plain Text Accounting]
o 2017/07/12

What this does under the hood is creates a special commodity just for time.

ledger allows you to specify units within units, so think of you could express cents as hundred cents equals one dollar, and then denote your commodity to be cents instead of dollars...

...or think of like Dungeons & Dragons or something where there was copper, silver, gold and they were all kind of 10 silver was 1 gold, that kind of thing.

In the same way, we can express...here's hours, there's 60 minutes in an hour, there's 60 seconds in a minute; there's 24 hours in a day, those kind of things.

And we're able to have flexibility to show all these units within a single account.


Here's the balance for that file:

ledger -f timekeeping.ledger bal
6.71h CodeAndSupply
15.0m Email [Uptime Sponsorship]
6.46h Talks [Plain Text Accounting]
---------
6.71h

Here's the balance for a format very similar to what I use my consulting days and very similar to what I'm starting to use now.

It's a really good way of tracking your PTO if you don't want to track your PTO explicitly.

It's always good to separate Billable and non-Billable tasks.

ledger technically supports these as comments and they will show up as different accounts and it just makes it easier to read. It's all art of the same account name the ledger doesn't get persnickety about a name's whenever you put things in brackets.

ledger -f timekeeping.ledger bal --end 5/13
10.00h Away
1.00h   DoctorApt
9.00h   Vacation
18.00h Billable
17.25h   Development [front end]
45m   Meeting
7.00h Nonbillable:Training

And here's a register command on time.

There's also a special time report mode that you can put on the balance command.

I find it difficult to read, I don't really like it a whole lot.

If you really want to get into time tracking with ledger please check out my github profile, just colindean where my high...

ledger -f timekeeping.ledger reg --end 5/13
17-May-09 (Billable:Meeting) 45.0m 45.0m
17-May-09 (B:Development [Front end]) 8.25h 9.00h
17-May-10 (B:Development [Front end]) 9.00h 18.00h
17-May-11 (Away:Vacation) 9.00h 27.00h
17-May-12 (Nonbillable:Training) 7.00h 34.00h
17-May-12 (Away:DoctorAppt) 1.00h 35.00h

Away from the ledger Features and Back to the Question:

...Okay it's me helpdeskaleer again...and guess I don't quite understand what commodities are...are they a stock...time keeping? A way of telling ledger how much of something equals how much of something else?

I had this idea in my head where I take amounts of things for instance in our example Vegtable Oil, and as amounts of them are used, the value of those things gets transferred into an account that represents what was in the recipe.

I made a chart of accounts for it, but I haven't really been able to figure out where they go and working with transactions on them for this reason eludes me.

For example, if I made a recipe called BLT I might have accounts that look like this:

Expenses:Recipes:BLT:Instance1
Expenses:Recipes:BLT:Instance1:ingredients
Expenses:Recipes:BLT:Instance1:ingredients:Vegetable Oil

And then I'd have to figure out how much Vegetable Oil is supposed to go into one BLT and transfer it from the Assets:Reserve Ingredients:Vegetable Oil in a monetary amount to the Expenses:Recipes:BLT:Instance1:ingredients:Vegetable Oil account.

And then I suppose before that sandwich is sold, the value of all the ingredients as listed in the Expenses (not just Vegetable Oil, but like Bacon, Lettuce, Tomato and Bread" could be added together to determine a minimum, no-profit price to set a baseline that one should never drop below when selling sandwiches.

(more complicated than that of course, but hopefully you get the idea of what I'm trying to do)

Amounts ... have both a "quantity", which is a signed decimal number, and a "commodity", which is a currency symbol, stock ticker, or any word or phrase describing something you are tracking.

More links:

What commodities are:

If you want to just track quantity of commodities:

If you also want to track cost of commodities in a base currency (what you paid for them):

If you also want to track current market value of commodities (what they're worth):