@gerlandog, it sounds like @emre is going to make a change where the Price
column is calculated on-the-fly, and not remembered (not stored).
Currently, the database table [InventoryTransactions]
has fields for [Quantity]
and [Price]
, but not [Total]
.
The Total is being calculated on-the-fly and is being displayed, but it is not being stored in the DB. This results in a display of Total being 9.99 when you enter 3 items with a Price of 3.33.
The same thing happens when you enter 3 items with a Total of 10.00… when you leave and come back, the Total changes to 9.99 (because it is not stored). Presumably, this is not desirable, thus the change @emre is making.
@emre is going to reverse the process, and therefore he is changing what is stored.
He is making a change to the DB to replace the [Price]
field with a [Total]
field. So when the next version comes out, the Total will be stored, and not the Price.
In practice, this means that when you make an Inventory Purchase, you should enter the Total rather than the Price. I assume results will still be calculated on-the-fly for either field during entry, but only the Total will be stored.
So if you enter 10.00 for the Total, it will be stored that way and it won’t change when you exit and re-enter. The Price will be calculated and displayed as 3.33.
If you enter 3.33 for the Price, the Total should be calculated for you, but it will be stored as 9.99, so when you exit and re-enter, it will still be 9.99. This is probably not desirable, so you should enter the Total instead of the Price so that it stores the correct amount in the DB under [Total]