Custom cost tags
The inventory vs operating cost categories are brittle and I'm already running into their limitations. Instead of investing more time into fixing (see #40 (closed) for instance) I'm more interested in doing something that makes much more sense and would eventually be needed no matter what:
Give companies the ability to create their own cost tags (as first-class objects) and assign them to products and orders baesd on ratios.
-
Allow creation of per-company custom cost tags, with roles/permissions: -
TagAdmincan create/update/deactivate tags -
AccountantAdmincan assign tags to anything -
AccountantLaborcan assign tags to labor records -
AccountantOrderscan assign tags to orders -
AccountantProductscan assign tags to products
-
-
Allow assigning of (multiple) cost tags, each with a corresponding weight, to any -
Order -
Member -
Labor record -
Product
-
-
Sum costs in categories using weighted ratios -
Untagged labor/orders go into a special "Untagged" category -
Costs are assigned to products based on weighted production: - We have two products, A and B
- A's "Op" tag has a weight of 3
- B's "Op" tag has a weight of 5
- A had 50 units shipped
- B had 10 units shipped
- A costs
(cost_of(Op) * (3 / (3 + 5))) / 50 - B costs
(cost_of(Op) * (5 / (3 + 5))) / 10
-
Need to handle scenario where product has no production (is assigned a tag but no units produced) - Maybe set that product's tag value to 0 in the calculations
-
Cost tags that are unassigned are silently assigned a weight of "1" to each product -
Products no longer need to track "inputs" - I am sad to see this go, but it's really not needed, and cost tags effectively do the same in a much more fluid way. Having people track this manually was always a stretch.
-
Products no longer need "effort"
Implementation examples/notes
For instance, let's use our existing tags as a template: "Operating" and "Inventory." If I have three products: simple widget, advanced widget, and platinum widget, I could assign each widget a value for each tag. I might do:
- simple widget
- Operating: 1
- Inventory: 1
- advanced widget
- Operating: 1
- Inventory: 2
- platinum widget
- Operating: 1
- Inventory: 6
Now for each outgoing order, I can tag the orders as well:
- order 1: bought inventory for widgets, although also bought some operational supplies
- Cost: 100L
- Tags:
- Inventory: 20
- Operating: 5
- order 2: catered lunch for the team great job every1 lol
- Cost: 10L
- Tags:
- Inventory: 0
- Operating: 1
Same for labor: each company member can have a default cost tag, and each individual labor record can have a cost tag tht overrides the member record. This allows labor costs to be assigned to cost tags on a per-occupation or per-clock-in basis.
So when we add up the costs for each of the orders, we get 30L (20L + 10L) in Operating costs and 80L (80L + 0L) in inventory:
- Operating costs (30L):
- 20L =
(5 / (20 + 5)) * 100 - 10L =
(1 / (0 + 1)) * 10
- 20L =
- Inventory costs (80L):
- 80L =
(20 / (20 + 5)) * 100 - 0L =
(0 / (0 + 1)) * 10
- 80L =
Notice that the values we assign for each order-cost-tag are arbitrary, but essentially form a ratio. So now, when we go to assign our costs to our products (note that our tag values are bucket by tag across all our products):
- simple widget
- Operating: 33.333333%
(Op 1 / (Op 1 + Op 1 + Op 1)) - Inventory: 11.11%
(Inv 1 / (Inv 1 + Inv 2 + Inv 6)) - Cost: 18.888L =
(0.3333333 * 30) + (0.1111 * 80)
- Operating: 33.333333%
- advanced widget
- Operating: 33.333333%
(Op 1 / (Op 1 + Op 1 + Op 1)) - Inventory: 27.776L = 22.22%
(Inv 2 / (Inv 1 + Inv 2 + Inv 6)) - Cost:
(0.3333333 * 30) + (0.2222 * 80)
- Operating: 33.333333%
- platinum widget
- Operating: 33.333333%
(Op 1 / (Op 1 + Op 1 + Op 1)) - Inventory: 66.666666%
(Inv 6 / (Inv 1 + Inv 2 + Inv 6)) - Cost: 63.333333L =
(0.3333333 * 30) + (0.66666666 * 80)
- Operating: 33.333333%
For any tags that go unassigned, the total cost is spread evenly among all produced (weighted by number produced). For instance, in the above, if we threw a company party and put the cost into a "Party" tag but not products had "Party" expenses assigned to them, then if we produced 40 simple widgets, 10 advanced widgets and 3 platinum widgets, we would do:
- simple widget -
(40 / (40 + 10 + 3)) * cost_of(Party) - advanced widget -
(10 / (40 + 10 + 3)) * cost_of(Party) - platinum widget -
(3 / (40 + 10 + 3)) * cost_of(Party)
This method does a few things:
- Allows custom categorization so companies aren't forced into a weird organizational scheme. Companies can even have per-departent tags.
- Forces all costs to be allocated. Instead of assigning costs from orders to products directly, we assign costs into tags based on ratios, then assign those ratios to each product. Unassigned tags are spread evenly.
- Costing can be completely simple/automatic, or can be high-touch and involved.