Audit Materials Balances
The Audit Materials Balances and Prices wizard recalculates the quantities of materials in the warehouses and their prices from the bills: the quantity of each material, the customer last sale, the last purchase price and the cost price. It also lists negative outputs when it finds them. It runs from the Files Maintenance window. The practical steps are in Audit materials balances and prices.
Opening the window
- Click File > Tools > Files Maintenance, select Audit Materials Balances and Prices, then click Run. The steps and the warning box "This operation is dangerous …" are in Run files maintenance. The box shows for every operation whose severity is above low; this operation has the highest severity.
- From the arrow beside Files Maintenance on the Tools page if you added the operation to the favorites (Favorites), from a Maintenance tile on the desktop (Add a tile to the desktop), and from Quick Launch search.
- The operation is in the list when your edition includes accounting and the file does not work in multi-file mode (Available operations).
- You need the Files Maintenance permission to open the window. Users Management > Operations also lists a permission named Audit Materials Balances and Prices. The program checks it for the desktop tile only, and does not check it when you start the operation from the window, from the favorites menu or from Quick Launch search.
- When you click Start, the program checks that nobody but you works in the file (A file reserved for one user).
Wizard pages
The wizard has two or three pages in this order. How the wizard buttons work is in How the maintenance wizards work.
| Page | When it appears |
|---|---|
| Make a Backup | Always first. |
| The hard disk or removable disk backup | If you choose one of them on the first page. |
| Audit options | Last. It has the Start button. |
The backup page
The Make a Backup page is the same in many maintenance wizards. Its fields and the hard disk and removable disk pages are in Make a Backup. If your key is a cloud subscription, the cloud page replaces it (Backup in the cloud). You can choose not to make a backup, and the program moves to the options page with no question.
The audit options page
The title bar says "Audit Materials Balances and Prices" and the header says "Audit Materials Balances". The introduction text is: "Click "Start" to begin auditing materials balances and prices according to the selected options." The options return to their default values each time the page opens, also when you come back to it with Back.
The Audit Options group:
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Materials Balances | Recalculates the quantity of each material in each warehouse. Details. | At least one of the four | Ticked by default. |
| Customer Last Sale | Rebuilds the table of the last price of each material and unit for each customer. Details. | At least one of the four | Ticked by default. |
| Last Purchase | Recalculates the last purchase price of each material. Details. | At least one of the four | Ticked by default. |
| Cost Price | Recalculates the average cost price and the profits of the bill items, and finds negative outputs. Details. | At least one of the four | Ticked by default. |
Outside the group:
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Skip display negative output report | Does not show the error window and does not write the detail messages in the log. Details. | No | Not ticked by default. |
| Do not audit the last purchase and average cost price for materials have no movement in bills have " Affect Cost Price " option checked | Controls the last purchase price of the materials that have no item in any bill. Details. | No | Ticked by default. |
| Element | Description |
|---|---|
| Status line and progress bar | Hidden until you click Start. The bar fills in one step at the end. After the calculation it shows above the bar the number of errors shown since the program started. |
| Button | What it does |
|---|---|
| Start | Checks that at least one of the four options is ticked, then starts as in What happens on Start. The buttons are disabled while it works. |
| Back | Returns to the backup page. |
| Next | Disabled, because this is the last page. |
| Cancel | Before Start: asks "Are you sure you want to exit and cancel the maintenance operation?". Yes closes the wizard with no change. It is disabled while the audit works, so you cannot stop it once it has started. |
What each option recalculates
The audit works on the posted bills unless stated otherwise (the customer last sale is the exception). The four run in this order: cost price, then last purchase, then materials balances, then customer last sale.
Materials Balances
- It empties the table of material quantities in the warehouses and rebuilds it: for each material and warehouse, the total quantity of input bills minus output bills, with the bonus quantities.
- It puts in each material the total of its quantities in the posted bills.
- A main material that has combinations (Material Combinations) takes the total of the quantities of its combinations.
- It recalculates the quantity of each serial number from its movement.
Customer Last Sale
- It empties the table of last prices and rebuilds it: for each customer, material and unit, the price of the item in the latest bill (by date, then by journal entry number) of a bill form that Affects Customer Price (Invoice forms settings). Items with a price of zero do not count. All bills count here, posted and unposted. On the same date, the bill whose journal entry has the higher number wins.
- It then adds the prices transferred from the previous year file for the customers, materials and units that have no row in this file (Audit materials prices of last year file).
Last Purchase
- For each material it takes the last item (by bill date, then the order of the form, then the bill number) of a posted bill whose form Affects Last Purchase Price, and stores its price in the first, second and third unit, its date and the exchange rate of its currency.
- A material that has no such item, and has prices transferred from the previous year file in the same currency, takes the transferred price.
- The option Do not audit the last purchase… controls the materials that have no items.
Cost Price
- It sets the cost price and the maximum price of every material in the file to zero. It then goes through the bill items material by material, in the order of date and of the forms, and calculates the moving average price from the forms that Affects Cost Price. A material with no items keeps a cost price of zero, whether or not you tick Do not audit….
- The posted bills enter the calculation, and also the unposted bills whose form affects the profits of materials.
- It recalculates the profit of each item and the cost price stored in it, and the profit of each bill (the total of the profits of its items).
- It calculates the maximum price of the material: the highest unit price in the bills of the forms that affect the last purchase price.
- This option is what finds negative outputs: after each output item of a material that is not a service, if the running quantity of the material becomes negative (for the whole file, not per warehouse), the program adds an error to the error window.
Skip display negative output report
If you tick it, the program does not take a snapshot of what was stored. No detail messages are written in the log, and the error window does not appear. The calculations stay the same.
Do not audit the last purchase…
It affects the last purchase price only, and only when Last Purchase is ticked. If you tick it, the program leaves the stored last price of a material that has no item in any bill. If you do not, it sets the three last prices to zero and the date to 1-1-1980 before it recalculates.
What happens on Start
- The program checks the options. If none of the four is ticked, the message "Must set one option at least of Audit Options" appears and you stay on the page.
- It checks that your connection is the only one to the file. If it finds other users, it shows their names and does not start.
- It runs the calculations according to the options (What each option recalculates).
- If Cost Price is ticked, Skip display negative output report is not ticked and the program finds negative outputs, the error window appears.
- It adds a line to the log (What the program records).
- It ends with the message "Operation successfully completed" and closes the wizard, even when the error window shows errors.
The error window
A small separate window shows the errors found by the audit. It has three introduction lines: "This window displays error found while checking.", "The corrected errors are displayed in gray and the errors the program can't correct are displayed in red", and "The content of this window will be saved in the file :". Then comes one line for each error.
The window itself (its menu, its behaviour during the session) is described in The error window. The error this wizard writes in the window is "Negative Output". Its line shows the bill (its form and number) and the material (its code and name). The program does not correct this error.
The right-click menu of a line (or Shift+F10) has Grid Lines (Ctrl+G), then Display Bill..., Display Material Card..., Display Material Movement... and Display Daily Movement..., then Display..., which shows the texts of the line in a message. Double-clicking a line runs the last command you used from the menu, or the first one if you used none, which is Display Bill....
There is one error window for the whole session: its close button minimizes it, Shift with the close button empties it, and each new run adds its lines under the earlier ones.
What the program records
If the option Activate log file is on, the program adds a line to the Log File with the note "- Audit Materials Balances". It adds it even if the audit fails or you ticked the option that skips the report. The details of the line are in the Maintenances Log, and they are empty if you ticked the skip option. The texts of the messages are stored in English:
- Level error: for each negative output,
Neg out Quantity:and the quantity, with the bill and the material as sources. - Level warning: for each material whose quantity or average price changed, its code and name, then
qtyand the two quantities if the quantity changed, thenavgPriceif the average price changed. The two values afteravgPricein this message are the new and the stored quantity, not the price. - Level warning: for each material and warehouse whose quantity changed, the material code and name, the warehouse code and name, then
qty, the material's new quantity in all warehouses, then the quantity stored before for this warehouse.
The change messages are recorded only if Materials Balances or Cost Price is ticked.
Messages
| Message | When it appears | What to do |
|---|---|---|
| Must set one option at least of Audit Options | You clicked Start with none of the four options ticked. | Tick at least one option. |
| Database is Opened By Users : … Please check that all users logged out then try again. | Another user is connected to the file when you click Start. The message shows their names, then the next message appears. | Ask them to leave, then click Start. |
| An error was encountered while performing the operation. | The audit did not start because of other users, or the database refused a command. The wizard stays open. | Try again when everyone has left. If the error repeats, contact support. |
| Operation successfully completed | The audit ended. | Click OK, then review the error window if it appeared. |
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel. | Yes closes the wizard, No continues. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.