0 or omitted: LIFO Calculation
1: FIFO Calculation (This option is in beta testing)
Why is FIFO an option in a LIFO function?
Because we thought it better to add an option to an existing function instead of creating a new function with essentially the same argument list. (It may that we may migrate this function at some time in the future to a "FIFOPrice" function, but we would still keep this function working, even if hidden).
Why does LIFOPrice not have a FIFO option, like LIFOCalc?
Unlike LIFOCalc, LIFOPrice cannot deal with FIFO (first-in/first-out calculations). The reason for this is that you need to know the entire history of all disposals in order to calculate the average price under FIFO. This is because, if you just a specify a single disposal amount, you do not know which of the Additions is available for application against this amount. For example, the very first Addition may have already been applied against a previous Disposal. LIFO, on the other hand, does not require this assumption. You just work backwards from the latest disposal grabbing Additions as required and applying them to your Disposal.