Tutorial 31 - Creating a Process to calculate Average Cost
In Tutorial 25 (Exercise 25-1), you configured a Procedure for the MERCH Template which is triggered on saving the record, provided the Amount > 0.00 AND GL == '120' i.e. when Inventory is increased. The purpose of the Procedure in Tutorial 25 is to Update the Invent table by setting the Recalculate switch to Yes (checked) every time a specific inventory Product Code is affected according to the specified Condition. After making such an Update the record in the Invent table looks like this: |
Please Note: The Average Cost is 0.00 and the Recalculate switch is set to Yes (checked) for all Product Codes since all inventory items were increased as part of the Opening Journal Entry (Tutorial 27). In this Tutorial, you will configure a Process Procedure that will calculate the Average Cost for each Product Code that has the Recalculate switch set to Yes (checked) and after the Average Cost has been calculated, set the Recalculate switch to No (unchecked).
Exercise 31 -1, Configuring a Process Procedure |
1. | Launch the Process Procedures application. |
2. | Configure the Process Procedure shown above with these Inspector settings for Retrievals and Updates (numbered 1 - 3) |
1. | Retrieval: | Multiple rows (all) | |
Search: | Recalculate = Yes | ||
Sort: | Product Code ASC | ||
2. | Retrieval: | Single row | |
Search: | GL = 120 Subledger = Invent.[Product Code] Subledger Master = Stock | ||
3. | Update | ||
Search: | Product Code = Invent.[Product Code] |
3. | Save giving the Name AverageCost. |
Exercise 31 - 2, Test the Process The Process Procedure can and should be tested; however, no actual Update will take place or can be seen in the Invent table when you are in the Test mode. Unless you have the Deployment License, you will not be able to launch the Run Process application. However, review these instructions anyway so that you will understand how to do it in a commercial setting and then complete Exercise 31 - 3. If you have a Deployment License, carry out these instructions: |
1. | Launch the Run Process application. | |
2. | Select the Process > Select... menu item.![]() | |
3. | Select the AverageCost Process which will display this panel. Press the Run button. |
Please note: The Run off line feature is available only with the Network Deployment License. |
4. | Launch the General Data Entry application. | |
5. | Select Invent from the Open Table panel. | |
6. | Click on the Find button to display the Find records panel and press the Do button: |
All four Product Codes have their Average Cost calculated and the Recalculate switches are all sitting at No.
Please Note: |
The Frequency options are Monthly, Weekly, Daily, Hourly, Minutely: Monthly can be run on a specified day and time or on the last day at a specified time. Weekly can be run on a specified weekday (Sunday - Saturday) at a specified time. Daily at a specified time. Hourly at a specified minutes within the hour. Minutely with a specified number of minutes interval.
Exercise 31 - 3, Modify the Invent Template and add data |
1. | Launch the Global Templates application and select Invent from the Open Global Data Template panel. | |
2. | Select the Average Cost field and change the Input action from Lock to Ask. | |
3. | Connect the Selling Price field to the Average Cost field, and Save. |
4. | Launch the General Data Entry application and select Invent from the Open Table panel. | |
5. | Enter the Average Cost which is shown for each of the four Inventory items in Exercise 31 - 2 above. |
Go To |
![]() | Tutorial 32 - Working with the Detail Object | |
![]() | Index |