Ledger for inventory System

150 views
Skip to first unread message

dmitrib...@gmail.com

unread,
Jul 15, 2020, 8:15:34 AM7/15/20
to Ledger
Hi guys. I'm trying to apply ledger for an inventory system. The main question I'm struggling with is can I create a separate Account per pallet for example? Initially I thought my accounts would be OnCustomerSide, InTransit, OnHand, Reserved, Defected, Lost, Dispatched. Now I see that we have a functionality when you have 55 bags on pallet, and you can take 1 bag from that pallet and move it to another pallet. That logic brings me to the idea that I could program each pallet as an account. Or am I wrong? How granular accounts maybe? And could they be created and removed by the system? Or in most of the cases they are a predefined static list? Any help is much appreciated. Thanks!

Kent R. Spillner

unread,
Jul 15, 2020, 11:36:40 AM7/15/20
to ledge...@googlegroups.com
Perhaps something like this (those are tabs, '\t', in inventory.ledger):

$ cat inventory.ledger
2020-07-01 * Initial inventory
Inventory:OnHand:Bags:Pallet 7 55 bag
Inventory:OnHand:Bags:Pallet 42 0 bag
Inventory:OnHand:Bags:Initial Inventory

2020-07-15 * (order id#12345) Acme, Inc.
Inventory:OnHand:Bags:Pallet 7 -1 bag
Inventory:OnHand:Bags:Pallet 42 1 bag

$ ledger -f inventory.ledger balance --no-total
0 Inventory:OnHand:Bags
-55 bag Initial Inventory
1 bag Pallet 42
54 bag Pallet 7

--

---
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/88b0368e-fa1c-48cd-8f6c-7459b2d6c351n%40googlegroups.com.


Pete Keen

unread,
Jul 15, 2020, 11:47:02 AM7/15/20
to ledge...@googlegroups.com
> How granular accounts maybe? And could they be created and removed by the system? Or in most of the cases they are a predefined static list? Any help is much appreciated. Thanks!

You can make accounts as granular as you want. For example, in a system I'm working on right now to reconcile Amazon purchases I'm going to have one account per invoice. In another part of my personal system I have one account per paper check or billpay that we issue, like this:

2020-07-13 * Landscapes Inc.
    Expenses:Landscaping        $100.00
    Liabilities:Checks:Bank Name:Account Name:1056

2020-07-15 * Check paid
    Liabilities:Checks:Bank Name:Account Name:1056      $100.00
    Assets:Bank Name:Account Name

I don't believe there's a way in ledger-cli to delete accounts, but if they have zero balance then they won't show up by default in balance reports.

dmitrib...@gmail.com

unread,
Jul 16, 2020, 6:10:23 AM7/16/20
to Ledger
The same location may contain 15 full pallets (of 55 bags) and some other 'partial' pallets (with 50 bags lets say). I'm wondering how to count those separate pallets. Should I create a separate account for them, and one more general account for other 15 pallets separately? And when smbdy takes 1 bag out of one full pallet I should debit -1 that account of full pallets, and dynamically create an account per pallet:A with 55 bags, and then debit palletAccount:A -1 bag and credit that bag elswhere? smth like fullConfigurationPallets account + separate account per each pallet?
Reply all
Reply to author
Forward
0 new messages