Fixed weighted average
The Fixed Weighted average account wizard calculates one price for each material in each accounting month, from the bills of the month and the price of the month before, and saves it in the file. This is the price that bills and reports read when the price type is Weighted average. The wizard has one page, and this page explains everything on it.
Opening the window
From the ribbon: File > Tools > Files Maintenance, then select Fixed Weighted average account and click Run. When you select it, the Files Maintenance window shows the warning "This operation is dangerous …". Opening the window and the favorites are explained in Run files maintenance.
- The wizard is in the Files Maintenance list when your key includes accounting. Multi-file mode does not hide it (Available maintenance).
- Running it from the Files Maintenance window, from its favorites menu or from Quick Launch search checks no permission of its own. The permission with its name in Users Management > Operations controls only whether its desktop tile shows.
- No backup page comes before it, and the wizard does not check whether other users are in the file. It changes the saved prices after Start without asking. What is advised before any maintenance is in Backup before maintenance.
How the maintenance wizards work: what the buttons do, the question on cancel, and what the page shows after success.
The wizard page
The window title is Fixed Weighted average account, and the page heading is Calculate Fixed Weighted Average Price. The text above the fields says: "Select the accounting periods and the materials group that you want to calculate their fixed weighted average price, then click "start" to calculate the price".
| Field | Description | Required | Values and rules |
|---|---|---|---|
| From period | The month the calculation starts from. | Yes | A drop-down list of the months of the file, from its first day to its last. The names show the month alone when the file period is in one year, and the year then the month when it is not. It holds the first month when the page opens. |
| To period | The last month the calculation includes. | Yes | The same list. It holds the last month when the page opens. The whole month is included. |
| Group | The group of materials whose prices are calculated. | No | A lookup box on material groups, explained in Lookup and search. Empty means all materials. A group means its materials and the materials of its sub-groups. |
| Don't calculate the price of balanced or empty materials | Stops a price being calculated in the first month for a material whose net quantity is zero from the start of the file to the end of To period. | No | Ticked when the page opens. It affects the first month of the file only, as in Ignoring empty materials. |
| Button | What it does |
|---|---|
| Start | Checks the two periods, then calculates the prices as in What happens on Start. The progress bar shows during the calculation. |
| Back and Next | Disabled, because the wizard has one page. |
| Cancel | Asks "Are you sure you want to exit and cancel the maintenance operation?", then closes the wizard without calculating. Disabled during the calculation. |
What happens on Start
- If From period is after To period, the program shows a message and stops. The same month in both is accepted.
- If From period is not the first month of the file, the program checks that the file holds calculated prices for an earlier month. If it finds no saved price before it, it shows a message and stops.
- If the program option Activate log file is on, it adds a log record with the note "Fixed Weighted average account", before it calculates. It shows in the Log File (Log File).
- It calculates the prices month after month, from From period to the end of To period.
- On success the message "Operation successfully completed" shows and the page closes. On any failure the message "An error was encountered while performing the operation." shows and the page stays open.
Before the program writes the prices of a month, it deletes the saved prices from the start of that month onward for all materials, not only for the materials of the chosen group. The prices of the months before From period stay. The materials outside the group and the months after To period lose their saved prices, and the program does not calculate them again. Leave Group empty and run the wizard up to the last month you need, so that you do not lose the prices of other materials.
Ignoring empty materials
The program applies Don't calculate the price of balanced or empty materials to the first month of the file only, the month that holds the start date of the first period. A material of the group is "empty or balanced" when it has no bill at all, or when the net quantity of its posted bills from the start of this month to the end of To period is zero. A material whose bills all fall outside this range gets a price. The program calculates no price for it in this month, and does not delete its saved price for this month. The option has no effect in the other months: every material of the group gets a price, except a material whose bills that affect the cost in that month are all unposted.
How the price is calculated
For each material, in each month, the program calculates as follows:
- Previous balance: the quantity of the material in all posted bills from the first day of the file to the day before the month, and its saved price for the previous month. The first month has no previous balance.
- Bills of the month: the posted bills of the month whose types affect the cost price. For each line: its price divided by the factor of its unit and multiplied by its quantity. The discount is subtracted and the extra added when the form's option Additions Affect Cost Price is on. The option Discounts Affect Cost Price has no effect here. An input line counts as positive and an output line as negative.
- New price: the total value of the bills of the month, plus the previous balance multiplied by its price, divided by the total quantity of these bills (with the bonus quantity) plus the previous balance.
- Exceptions: if the new price is zero, the material takes the price of the previous month, or zero if it has none. If the total quantity is zero, the value is divided by one.
Example: a material had a balance of 10 units at a price of 5.00 in the previous month. The month has a posted purchase bill whose type affects the cost price, with 10 units at 8.00 and no discount or extra. The new price = (10 × 8.00 + 10 × 5.00) ÷ (10 + 10) = 130 ÷ 20 = 6.50. If the next month had no bill that affects the cost, the price would stay 6.50.
The program saves one price for each material and month, and it applies to all the days of the month. The wizard changes no bills and no entries. The program reads these prices when it prices a bill or generates its cost entry, so existing bills need repricing and regenerating their entries to take the new prices.
Messages
| Message | Why it shows | What to do |
|---|---|---|
| The period start date 'from' should be smaller than the period start date 'to' | From period is after To period. The message "An error was encountered while performing the operation." follows. | Choose From period before To period, or in the same month. |
| Can not proceed because the fixed weighted average price of the old period is not calculated | You started from a month that is not the first, and the file holds no saved price before it. The message "An error was encountered while performing the operation." follows. | Start from the first month of the file, or calculate the earlier months first. |
| An error was encountered while performing the operation. | The database refused the calculation command, or one of the two checks above failed. | Read the message before it, and try again. |
| Operation successfully completed | The calculation ended. | Check the result with the report Verifying Fixed Weighted Average Calculation. |
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel. | Click Yes to leave with no calculation, or No to continue. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.