How to track commodities from acquiring to selling them?

119 views
Skip to first unread message

Ella Lobatina

unread,
Mar 20, 2018, 3:01:28 AM3/20/18
to Ledger
Hi all.

I'll simplify my use case into that of a cabbage farmer who wants to track his produce until and including sales.
I see the harvested produce as income of some commodity (cabbage), want to store it somewhere, move it somewhere else, then process it (into salad), move the salad to yet another location, then sell it.

So here's my assumption: harvested produce is income, no? (Otherwise, where else would it come from?)
So the harvest looks like:

2018/03/21 farm
  income           -5 cabbage
  inventory:farm    5 cabbage


From the farm they go to the processing plant, where they will be transformed into 2 salads:

2018/03/21 farm
  inventory:farm   -5 cabbage
  inventory:plant   2 salad


Note that the cabbages have not received any financial value, because there was no attempt to sell them.
Now I move the salad to the store and sell them there the same day:

2018/03/21 farm
  inventory:plant  -2 salad
  inventory:store   2 salad

2018/03/21 buyer
  income           -2 salad {= $ 2}
  cash


My problem is that the assets:store account still contains a positive balance of the salad commodity, while there is none.
So according to ledger (not its fault, purely mine, hence this question) there is still an inventory of salad.

Can anybody help me with this? I'd like the inventory (assets:store) to be cleaned up after we've got rid of all those cabbages.
Clearly I need an entry with assets:store  -2 salad to do this, but I can't imagine what to use as the balancing account.

Another problem is that I'm noting a double income here.

Well, I see that I'm still developing the question, so please hang on and bear with me:


Would a better way maybe be to see the 5 cabbages used in the plant as an expense against the previous income at harvest time? As in:

2018/03/21 farm
  ; harvest
  income           -5 cabbage
  inventory:farm    5 cabbage

2018/03/21 farm
  ; moved to production plant
  inventory:farm   -5 cabbage
  inventory:plant   5 cabbage

2018/03/21 farm
  ; consumed in plant
  expenses          5 cabbage
  inventory:plant  -5 cabbage
  ; great, this got rid of the inventory of cabbages which are being transformed into salads right now!

2018/03/21 farm
  ; entry of salads
produced
  income           -2 salad
  inventory:store   2 salad

2018/03/21 farm
  ; Now the salads are produced and in store and need to be sold. Can I write this as follows?
  inventory:store  -2 salad {= 2 $}
  cash              2 salad {= 2 $}


The only problem I have with this is that the income from salad is recorded before selling it, but then, they were derived from the income during harvest anyway, so maybe that's not a big deal?
To mitigate this we could probably split the sale into an accounts receivable in which the income is accounted as an aggregate asset, and a payment part, like

2018/03/21
  assets:store                -2 salad {= 2 $}
  assets:accounts receivable   2 salad {= 2 $}
  ; the sale
  assets:accounts receivable  -2 salad {= 2 $}
  assets:cash                  2 salad {= 2 $}
  ; the payment


Any ideas?
Suggestions as to how to do it better? (According to official accounting rules?)

Thanks in advance.

Klauss Hass

unread,
Mar 20, 2018, 6:39:49 AM3/20/18
to ledge...@googlegroups.com
You have to put the cost of getting that revenue along with the cash position.

As such it would be:

Revenue $2
Expenses:cost:salad 2 salad
Inventory: plant -2 salad
Cash

The way it is being done revenue is getting confused with cost
--

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

Ella Lobatina

unread,
Mar 20, 2018, 7:29:47 AM3/20/18
to Ledger
Thank you so much for you response, but this confuses me a bit.

I understand that you use 'Revenue' where I use 'income?
But then, shouldn't it have a negative value, in order for the
balancing amount in cash to increase, instead of decrease?

Further, I'm not really expending anything when I sell 2 salads at $2 each,
so I have no idea where that 'expense' comes from or goes to.

Another problem is that the conversion from cabbage into salad can be
on another day than the sales of the salads. That would complicate your
solution, I'm afraid.

But ok, let's try to go on with your solution.
So we'll introduce your 'expense' and 'revenue', but then in the form of income,
and on another date than the salads entered the store.
How about:


2018/03/21 farm
  ; entry of salads
produced
  income           -2 salad
  inventory:store   2 salad

2018/03/24 buyer
  ; Now the salads are produced and in store and need to be sold. Can I write this as follows?
  income           -2 salad {= 2 $}
  expenses:cost     2 salad
  inventory:store  -2 salad

  cash              2 salad {= 2 $}


In this notation I can understand the income from sales (2 salads @ $2) and the cash inflow as a result.
The decrease in inventory is also understandable to me, but the 'expenses:costs' still feels counter intuitive to me, although it is clearly associated with that inventory decrease.

Would it be ok this way?
Sorry if things are over-obvious to me, but I'm just an amateur in accounting, so I'm just swimming around a bit.

Ismael Bouya

unread,
Mar 20, 2018, 8:01:20 AM3/20/18
to ledge...@googlegroups.com
Hi Ella,
I think you’re missing something important in your workflow.

Your income should be the net gain: At some point, you bought something
to start with (or farmed/found them, which should(?) be seen as the same
as buying them for $0):

2018/03/21 farm
inventory:farm 5 cabbage @ $0
cash

Those cabbage grow into a salad:

2018/03/21 farm
inventory:plant 2 salad @ $0
inventory:farm -5 cabbage {$0} @ $0

And you sell that salad:

2018/03/21 farm
cash $4
inventory:plant -2 salad {$0} @ $0
income:farm

------------------
Now let’s be a little more complete (you’ll adapt it to your need)

You buy 6 cabbage at $1 each
2018/03/21 farm
inventory:farm 6 cabbage @ $1
cash

Each of your cabbage is priced $1, and you spend $6.

You farm them, you need 2 cabbages to make one salad (I’m not a farmer
maybe it doesn’t exist :p ), but a pair of them is lost:

2018/03/21 farm
inventory:plant 2 salad
inventory:farm -6 cabbage
expenses:farm loss 2 cabbage

Then you sell those two salad (each costed 2 cabbages, i.e. $2), at $5 each:

2018/03/21 farm
cash $10
inventory:plant -2 salad @ $2
income:farming

You end up with a $6 net income ($10 - $4 cost), and $4 in your pocket

$ ledger bal:
$4 cash
$-6 income:farming
2 cabbage expenses:farm loss

if you want to track the losses in terms of cash, just add costs ("@")
in the middle one:
2018/03/21 farm
inventory:plant 2 salad @ $2
inventory:farm -6 cabbage @ $1
expenses:farm loss

$ ledger bal:
$4 cash
$-6 income:farming
$2 expenses:farm loss

Hope it helps/answer your questions
--
Ismael
signature.asc

Ella Lobatina

unread,
Mar 20, 2018, 8:38:21 AM3/20/18
to Ledger
Ismael, thanks for your write-up.
For me though net gain = income - expenses.
That's why I booked the harvested cabbages as income in term of commodities, and why not? At the time of selling the ultimate processed produce we can apply the market price to the remaining commodity (that which is not consumed in the process).
If you want to apply a price to the cabbages, that would be equal to the expenses of plowing the land, planting the seeds, putting fertilizer, harvesting etc.
It's difficult if not impossible to implement the cost of produce like that in ledger.
That's why we aggregate the expenses so that later we can divide them by the number of cabbages and calculate their price of production.

Then income - expenses = net gain

Your way of 'finding' the cabbages appears cool to me though.
And maybe accounting-wise more correct, I don't know.

Thanks for your food for thought!

Ismael Bouya

unread,
Mar 20, 2018, 11:35:10 AM3/20/18
to ledge...@googlegroups.com
Hi Ella,
What will follow will probably not solve your problem, but hopefully
it will give a better understanding :)

I understand that from your point of view, buying cabbage is an expense.
However, it is not the case here since you’re not making an expense:
you’re swapping dollars (one commodity) for cabbage (another
commodity) at a given rate (1 for 1). An expense would be an entry like:

2018/03/21 Buy cabbage
Expenses:Farm tools $6
Cash

But then you lose track of your cabbages! In other words, you cannot
consider your cabbage both as an expense and as an asset, it has to be
something. In your case, since you want to track its becoming, it’s an
asset. Or, said another way, your $6 has become 6 cabbage, you didn’t
"lose" them.

To see the difference, you can imagine that scenario:
Say that while buying your cabbage at your local grocery store, you used
your credit cards, and that your bank charges you $1 for each
transaction. Also, you buy at the mean time 1kg of carrots at $3. You
would have a transaction like that:

2018/03/21 My best grocery store
Expenses:Bank charges $1
Expenses:Vegetables $3
Inventory:Farm 6 cabbage @ $1
Cash -$10

In that example, the charge expense goes to your bank, so it’s lost
forever (and your bank won it).

The vegetables you have them in your hands, but you don’t want to track
them (they’re lost once you eat them) You could of course track them as
an asset, and tomorrow when you eat them, add an expense of 1kg carrots
from your cellar to expense, but today you didn’t spend money, you only
swapped them for another thing.

And the cabbage you’ve got in your hand will be used later as an asset
(to track its becoming), so it cannot be counted as an expense.

It’s really all a matter of what is an expense (you spent it) and what
is an asset (you get it, and track its becoming)

(Tue, Mar 20, 2018 at 05:38:21AM -0700) Ella Lobatina :
> --
>
> ---
> 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.
> For more options, visit https://groups.google.com/d/optout.

> --
>
> ---
> 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 [1]ledger-cli+...@googlegroups.com.
> For more options, visit [2]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:ledger-cli+...@googlegroups.com
> 2. https://groups.google.com/d/optout



--
Ismael
signature.asc

o1bigtenor

unread,
Mar 20, 2018, 1:00:21 PM3/20/18
to ledge...@googlegroups.com
On Tue, Mar 20, 2018 at 7:01 AM, Ismael Bouya <ismael....@normalesup.org> wrote:
Hi Ella,
I think you’re missing something important in your workflow.

Your income should be the net gain: At some point, you bought something
to start with (or farmed/found them, which should(?) be seen as the same
as buying them for $0):

It might be even easier if you think of this as a discrete number of steps.

1. grow cabbage
    (expenses . . . seed,tools, supplies, labor, depreciation, profit and likely some more!.)
    (value of inventory (cost accounting here) change is what is noted (same for following)

2. harvest cabbage
   (expenses . . . equipment, labor, depreciation, profit etc)
   (value of inventory (again cost accounting)

3. process cabbage
   (expenses . . . equipment, labor, depreciation, profit etc)
   (value of inventory)

4. storage
   (expenses . . . refrigeration, profit, depreciation, labor etc)
   (value of inventory)

5. market salad packages
   (expenses . . . ALL selling costs, profit)
   (income)

What I haven't included is losses present (in EACH step) like waste, unfit, destroyed,
the deer ate, DH drove over w pick-up (you should even include here what you give away
but that is going to depend upon how strict you're working your books) etc.

This business stuff is really simple not tracking it and making it work - - - on the other hand
- - - - isn't so simple!  (grin!)

Dee
 
--

---
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+unsubscribe@googlegroups.com.

o1bigtenor

unread,
Mar 20, 2018, 1:03:35 PM3/20/18
to ledge...@googlegroups.com

On Tue, Mar 20, 2018 at 12:00 PM, o1bigtenor <o1big...@gmail.com> wrote:

This business stuff is really simple, now (edit for mis-spelling) tracking it and making it work

Ella Lobatina

unread,
Mar 20, 2018, 1:49:20 PM3/20/18
to Ledger
Ok, I got what you mean, but I'm not buying cabbage, I'm growing them.
So they become assets without direct expenses.
Of course there are expenses, but they are still hidden behind plowing, sowing etc. at the time of acquisition of the cabbages.
That's why I started posting them to the ledger as an income:


2018/03/21 farm
  income           -5 cabbage
  inventory:farm    5 cabbage


Now Ismael suggested to 'buy' them at a zero price.
That's ok with me, as long as I can track them as a commodity from harvest to sales along the different locations ('warehouses') where they may pass, and as long as I can clean up the inventories when they leave.

Klauss suggested to put the sales revenue in an account separate from income but although I perfectly understand why that may be good, I'm a bit hesitant to do that because that would change the whole way I'm keeping books until now, and I'm not saying I'm doing it wrong all the time. I just want to track the items through the inventories. :)
My opinion is that I will be able to calculate the net revenue by just subtracting total expenses from total income.

Your explanation about expenses and assets is re-assuring to me in the sense that I think I can 'get away' with my maybe unconventional style of farm accounting, so I guess I'll just try to write it like this:

2018/03/21 plant
  ; consumed in plant
  ; balance of cabbages is zero
  expenses          5 cabbage
  inventory:plant  -5 cabbage

2018/03/21 plant
  ; entry of salads
produced
  income           -2 salad
  inventory:store   2 salad

2018/03/24 buyer
  ; Now the salads are in store and being sold.
  inventory:store  -2 salad {= 2 $}
  cash              2 salad {= 2 $}

Now the cabbages and salads are both gone,
the income is from the 2 salads sold,
at a price of $ 2,
the revenue is in cash,
and net revenue can be calculated as income-expenses.



Thanks for your help!

Ismael Bouya

unread,
Mar 20, 2018, 2:00:55 PM3/20/18
to ledge...@googlegroups.com
If it makes sense to you, then it’s the right way, no matter what I said
about it :p As far as I see, the only thing you lose track of is the
fact that some cabbage(s) has become a salad

> Your explanation about expenses and assets is re-assuring to me in the
> sense that I think I can 'get away' with my maybe unconventional style of
> farm accounting, so I guess I'll just try to write it like this:
>
> 2018/03/21 plant
> ; consumed in plant
> ; balance of cabbages is zero
> expenses 5 cabbage
> inventory:plant -5 cabbage
>
> 2018/03/21 plant
> ; entry of salads produced
> income -2 salad
> inventory:store 2 salad
>
> 2018/03/24 buyer
> ; Now the salads are in store and being sold.
> inventory:store -2 salad {= 2 $}
> cash 2 salad {= 2 $}

--
Ismael
signature.asc

Ella Lobatina

unread,
Mar 20, 2018, 2:16:23 PM3/20/18
to Ledger
Yes, you're right, I could/should put them in the same transaction:

2018/03/21 plant
  expenses          5 cabbage
  inventory:plant  -5 cabbage
  income           -2 salad
  inventory:store   2 salad


Thanks for pointing that out. :)

o1bigtenor

unread,
Mar 20, 2018, 3:12:19 PM3/20/18
to ledge...@googlegroups.com

>
>      Hope it helps/answer your questions
>      --
>      Ismael
>
>    --
>
>    ---
>    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
  cash              2 salad {= 2 $}

Now the cabbages and salads are both gone,
the income is from the 2 salads sold,
at a price of $ 2,
the revenue is in cash,
and net revenue can be calculated as income-expenses.

One minor problem.
 $4 income - 2 cabbages (expenses) = an undefined value that the IRS will throw a hissy fit at.

Don't know if it made it through but I gave a multi-step process for doing this. And yes I'm a farmer mostly have
been in a bigger scale than a market garden but I DO understand the complexities required to describe what are simple process when one is using financial record keeping to do that.

Regards

Dee
Message has been deleted

Ella Lobatina

unread,
Mar 21, 2018, 1:40:49 AM3/21/18
to Ledger
That's why I posted the cabbages at a price of $2 each in the last entries. For your inventory overview you post the balance listing all the commodities, for the IRS (I don't have an IRS by the way) you run ledger with the --market flag (or was it --value?) and get everything listed in your base currency.
Actually this is what happens if you sell goods at a price and use cash as the balancing account as in

2018/03/21 farm
  income:sales:revenue  -2 salad {= 2 $}
  cash


The cash account will then show 2 salad in its balance.

Further I'm not a 'garden farmer' either, neither sophisticated, but I was just using this simplified example to get a clear view.
Reply all
Reply to author
Forward
0 new messages