Versions Based Stock Calculation
The versions based stock calculation functionality uses Batch / Recipe versions for the stock calculation over the current Batch / Recipe configuration. When you change an ingredient of a Batch / Recipe, we snapshot the previous configuration with the end date of yesterday and save it as a historical version. Afterwards, when the stock is calculated for your current stock period, we take the start dates and end dates of the Batch / Recipe versions into consideration and calculate the stock accordingly.
The historical versions can be viewed when you go to the ‘Versions’ tab of a Batch / Recipe. If this functionality is activated for you, we recommend that your stock administrator have the edit and delete permission assigned so that they can change the date ranges of previous versions, or delete previous versions in case of any misconfiguration.
If you would like this functionality to be activated, please get in touch with our Enterprise Department and clarify which of your User Groups should be able to view, edit, or delete the Batch / Recipe versions.
How to view, edit or delete versions
Viewing a Batch / Recipe version
Go to a Batch / Recipe, select the ‘Versions’ tab, then click on the downwards pointing arrow button for a version to see its historical ingredients.
Editing or deleting a Batch / Recipe version
If you have the edit permission assigned to you, you will be able to see the ‘Edit’ button for each version. When you edit a version, you will be able to change the start date and the end date of that version, then once you save your changes, the end date of the previous version and the start date of the following version will be automatically readjusted in line with the rules specified in the next section.
If you also have the delete permission assigned to you, you will be able to see the ‘Delete’ buttons for historical versions. When you delete a previous version, the start date of the following version will be automatically readjusted.
Important Notes
-
When you change the ingredients of a Batch / Recipe, we snapshot the previous configuration and save it as a historical version with the end date of yesterday because the system assumes that the changes you made are only applicable from today onwards.
-
When you edit the ingredients of a Batch / Recipe, you always edit the ingredients of the current version.
-
A Batch / Recipe can only have one version per day, but a version could be applicable for a date range.
-
When you make multiple changes for a Batch / Recipe within a day, we do not save further previous versions.
(e.g.: your first change will trigger a previous version to be saved, then the 2nd, the 3rd, etc won’t.) -
Batch / Recipe versions work sequentially so they cannot have gaps between their dates and their date ranges cannot overlap with each other.
-
The current version of a Batch / Recipe doesn’t have an End Date, and the first initial version will always have its Start Date as the Batch / Recipe creation date, which won’t be editable.
-
When you edit a version’s date range,
-
the selected start date must be after the previous version's start date.
-
the selected end date must be prior to the following version's end date.
-
-
When you update a version’s date range, the changes will only affect the stock results for the current stock periods, finalised stock periods will not be affected.
-
You can only delete a historical Batch / Recipe version, the current version can never be deleted.
-
When an ingredient of a version is displayed in red under the ‘Versions’ tab, that indicates that the ingredient is now deactivated.
-
Historical Batch / Recipe versions will only be kept with an end date up to a year.