In a purchase log, is it possible to increment the inventory with the total price (rather than the value)?
@Jhnps No that isn’t how price quantities + inventory adjustments work. Can you describe what you’d like to be able to do?
Thanks @mstenta !
I want to learn how to use the different functions in order to set up a system, in an effective way. I thought I could use the price function to track expenses, but apparently it is not to be done the way I thought it would be Best practices for a) tracking expenses, and b) use cases for the price quantity?
@Jhnps Sure! So technically speaking, “price quantities” and “inventory adjustments” are two separate feature sets, but they can be used together.
The farmOS Ledger module adds the Sale and Purchase logs types, as well as a Price quantity type. Here is a bit more info about price quantities from the Ledger module’s README.md:
Price Quantity
Price Quantities have additional “Unit Price” and “Total price” attributes, alongside the standard “Value” attribute. When these are used, the “Value” attribute is considered to be the “number of units sold”. “Value” multiplied by “Unit price” must equal “Total price”, and if only two of the three are entered then the third will be automatically calculated when the price quantity is saved.
So it just provides a way of recording a price alongside a quantity in farmOS.
More info on quantities generally here:
Inventory adjustments are a way of using quantities to track inventory of assets in farmOS. More info:
It sounds like you were hoping to use the inventory logic to compute total expenses. The data model supports recording individual expenses, but the farmOS Ledger module does not (yet) provide any summarized reporting of “totals” - it only provides a place to record the data at this time. I would love to see someone take that next step!
In the meantime, my advice would be to record your expenses using price quantities (but not inventory adjustments), and then you can use the CSV export features to filter and export the quantities you want and compute the totals in a spreadsheet application outside of farmOS. Or if you are comfortable with programming you can pull the same data out via the API.
Of course, if you build anything that would be helpful to others your contributions would be welcome!
@mstenta That is a very good answer — exactly what I needed, and now it is so much clearer to me — thank you very much!
I wish my programming skills were better…