Modify Materials Prices
This tool changes the prices of many materials by a calculation that you write in a grid. Each grid line reads one price from the material card, applies an operation to it, and saves the result in another price or in the same one. You can limit the materials by a group, by conditions, or by the materials of a bill. For the practical steps, see Change prices of materials in bulk. To write fixed prices instead, use Modify Group Price.
Opening the window
- From the main ribbon: Materials > Tools > Tools > Modify Materials Prices. The command shows if your licence includes warehouses and the file does not work in multi-file mode.
- You need the Modify Materials Prices permission in Users Management, on the Reports page. It is one check box that allows running the tool.
- The lists in the grid contain only the price types you are allowed to see.
Fields
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Group | Limits the change to the materials of a group. | No | Empty at first, which means all materials. It includes the materials of the sub groups. |
| Materials Terms | A saved condition that limits the materials, with a table under it that shows its lines. | No | The first value is Without. See Materials Terms. The field is hidden if your licence does not include the standard reports. |
| Bill Materials | A check box that limits the change to the materials of one bill. | No | Not selected at first. Selecting it enables the next two fields; otherwise they stay disabled. |
| Bill form list (no caption, next to Bill Materials) | The form of the bill. | Yes if you selected Bill Materials | Lists all the bill forms of the file, your own forms first and then the standard forms. |
| Bill Number | The number of the bill of this form. | Yes if you selected Bill Materials | Example: 12. The program matches the form and the number only, not the date. Only the materials that are in the bill are changed. Do not type 0: the program ignores the bill condition and changes all the materials. |
Using Group, Materials Terms and Bill Materials together means a material must meet all three. If you leave them all empty (and Without in the terms), the tool changes all the materials of the file, and the program does not stop you.
| Button | What it does |
|---|---|
| Ok | Checks the grid, asks for confirmation twice, then runs the grid lines one after the other. The window stays open after the operation. |
| Cancel | Closes the window. It does not undo a change you already made. |
The operations grid
Each grid line is a separate operation. Double-click a cell to type in it or to open its list. The lines run in order, and each line reads the prices as the line before it left them. To add or delete a line, see Table Properties. A line in which you do not choose Read Price is ignored without a message.
| Column | Description | Values and rules |
|---|---|---|
| Read Price | The price from which the new value is calculated. | Cost, Wholesale, Semi wholesale, Export, Distributor, Retail, Consumer, Last Purchase and Last Price with Discount and Addition. Only the prices you are allowed to see appear. Empty at first. Cost is the cost price of the card and does not change with the unit. Last Price with Discount and Addition is calculated from purchase bills; it is not a value stored in the card. |
| Read Price for unit | The unit of the price that is read. | First, Second, Third or Default (the default unit of the material). The first value is First. |
| Save in Price | The price in which the result is saved. | Wholesale, Semi wholesale, Export, Distributor, Retail and Consumer. The cell is empty at first, but if you leave it empty the program saves the result in Wholesale, so always choose the price. |
| Save in Price for unit | The unit of the price that is saved. | Same as Read Price for unit. The first value is First. |
| Operation | The calculation applied to the price that is read. | Seven operations, explained after the table. The first value is Multiply price by unit conversion factor. |
| Amount | The number that the operation uses. | A number, zero or more. If you leave it empty or negative, the program rejects the line as described in Messages, except for Change each price. You must enter it even for operations that do not use it. In Change each price it is the old price that is searched for. |
| From | For Change each price. | A number, zero or more, required for this operation. The other operations do not use it. |
| To | For Change each price: the new price. | A number, zero or more, required for this operation. The other operations do not use it. |
| Unit | The unit whose conversion factor the operation Multiply price by unit conversion factor uses. | First (factor 1), Second or Third (its conversion factor in the material), or Default (the factor of the default unit of the material). The first value is First. |
| Round Price to | The rounding multiple. | None (no rounding) or one of the multiples 0.01, 0.05, 0.1, 0.5, 1, 5, 10, 50, 100, 0.25, 2.5, 25, 250, 500, 0.001, 0.005, 0.025 and 1000. The cell is empty at first and has no defined value, so always choose one (None if you do not want rounding). It is applied to the result expressed in the currency of the material. |
| Rounding Type | The direction of the rounding. | Nearest, Smallest or Greatest. It matters only if you chose a multiple. The cell is empty at first and has no defined value, so always choose one. |
| Modify Materials with Actual Price | Includes the materials whose price policy is actual price. | Yes or No. The first value is Yes. |
| Modify Materials with Ratio Price | Includes the materials whose price policy is ratio price. | Yes or No. The first value is No. |
Set one of the last two columns to Yes in every line. You set the price policy of a material in its card, as explained in Material Card: Prices, Price Lists and Taxes pages.
The program rejects a line with No in both columns, except the last (or only) line: no message appears and the line runs on all the materials, whatever their policy.
The seven operations
| Operation | The new result |
|---|---|
| Change to price | The Amount itself, for every material. You must still choose Read Price. |
| Add Selected Value | The price that is read + Amount. |
| Subtract Certain Value | The price that is read − Amount; if the result is negative it becomes 0. |
| Multiply by number | The price that is read × Amount. |
| Multiply by percentage | The price that is read × Amount ÷ 100. So 110 raises the price by 10%, and 90 lowers it by 10%. |
| Multiply price by unit conversion factor | The price that is read × the factor of the unit chosen in Unit. The operation does not use Amount. |
| Change each price | The materials whose price that is read equals Amount take To; the others stay as they are. |
In Change each price the program compares the price that is read with what is in the Amount column, and only checks that From and To hold a number. Write the old price in both Amount and From, and the new price in To.
The amounts in Amount and To are applied as you typed them to the price stored in the card, without a currency conversion.
A material that does not have the unit chosen in Unit, or whose factor is Variable, has the factor zero, so the saved price becomes 0, even when you save in the price of the first unit. Add a condition that limits the materials to those that have that unit.
What the program does after Ok
- If Materials Terms is not Without, the program checks its lines. The messages of Materials Terms appear if something is missing.
- It checks the grid lines one by one. A line that lacks Amount is rejected with a message and the check continues. If Save in Price repeats with the same unit in two lines, the first line stays and the second is rejected with a message. A line in which both price policies are No is rejected with a message, except the last (or only) line, which passes without a message.
- If you selected Bill Materials, it checks that the form is chosen and the number is typed.
- It asks "OK to modify prices". The first button is No.
- It counts the materials in the group, conditions and bill and shows the count in the question "Count of materials prices to be modified : …" with Yes and No; the first button is No. The count does not consider the price policy or whether the price that is read matches, so it can be larger than the number that really changes.
- On Yes it runs each line: it reads the price, calculates the result, rounds it if you chose rounding, then writes it in the cards of the materials that meet the line's conditions. The last purchase date of every changed card becomes today. The program does not change a material that is a derivative of another material unless it inherits the specifications of its parent. A progress bar shows.
- If no material matches a line, the message "No material found for this Condition" appears and the run stops at that line. The earlier lines were run; the later lines were not. Nothing is written in the operations log.
- After the last line the program writes "Count of Materials have their Prices Modified" with the count of the last line that ran in the operations log, and shows "Operation completed successfully".
If you choose No in the question about the count, nothing changes, but the program writes the count 0 in the log and shows "Operation completed successfully". The same happens if no valid line is left after the check, once you have answered Yes to both questions. Do not rely on this message alone: open a material card and check.
The tool does not keep the old prices, cannot be undone, and does not change entries or issued bills. If Activate log file is on in Program Options, the program records a modification in the operations log for each material whose prices changed. The run is line by line: if an error occurs in a line, the earlier lines stay applied.
Example
The group "Groceries" has these retail prices before the change: Rice 5.00, Sugar 8.00 and Orange Juice 10.00 (first unit). You want to raise retail by 10% with rounding to the nearest half, then make the consumer price lower than retail by a half.
You chose Group "Groceries" and entered two lines:
| Column | Line 1 | Line 2 |
|---|---|---|
| Read Price | Retail | Retail |
| Read Price for unit | First | First |
| Save in Price | Retail | Consumer |
| Save in Price for unit | First | First |
| Operation | Multiply by percentage | Subtract Certain Value |
| Amount | 110 | 0.5 |
| Round Price to | 0.5 | None |
| Rounding Type | Nearest | Nearest |
| Modify Materials with Actual Price | Yes | Yes |
| Modify Materials with Ratio Price | No | No |
Line 1 calculates 5.00 × 110 ÷ 100 = 5.50, 8.00 × 110 ÷ 100 = 8.80, which is rounded to 9.00, and 10.00 × 110 ÷ 100 = 11.00. Line 2 reads the retail price after line 1 and subtracts 0.5 from it. The result:
| Material | Retail | Consumer |
|---|---|---|
| Rice | 5.50 | 5.00 |
| Sugar | 9.00 | 8.50 |
| Orange Juice (first unit) | 11.00 | 10.50 |
Form List
The Form List window is a shared window that the price tool does not open. It is opened by the Sort buttons in the form list windows, such as the lists of bill, transposition, assembly and shipping forms (see Bill, Transposition, Assembly and Shipping Form Lists). The window shows the names of the forms in their current order, and changes the order in which they appear.
| Item | What it does |
|---|---|
| The list | The names of the forms in order. Choose a form to move it. The first form is selected when the window opens. |
| Up arrow (a button with no text) | Moves the selected form one line up. It does nothing for the first form. |
| Down arrow (a button with no text) | Moves the selected form one line down. It does nothing for the last form. |
| OK | Closes the window, so the window that opened it saves the new order and rebuilds the menus if you moved a form. |
| Cancel | Closes the window and discards everything you moved. |
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Please select value (and under it "In Line") | Amount is negative or empty in a line whose operation is not Change each price, or From or To is empty in Change each price. The program does not give the line number. | Type a number, zero or more. The line itself is not run. |
| Saving in price and unit mustn't be repeated more than once line … and line … | Two lines save in the same Save in Price with the same unit. The line numbers start from zero among the valid lines; in the English interface the two numbers are not filled in. | Merge the two operations into one line or change the target of one. The second line is not run. |
| Must select one price policy at least | No in the last two columns of a line that is not the last line. | Make one of them Yes. |
| Must select bill type | You selected Bill Materials and did not choose a form. | Choose the form. |
| Invoice number must be specified | You selected Bill Materials and left Bill Number empty. | Type the number. Do not type 0: the program then ignores the bill condition. |
| OK to modify prices | You clicked Ok and the grid lines are valid. | Yes to continue or No to stop. |
| Count of materials prices to be modified : … | After you answered Yes to the previous question. | Yes to run the lines. If you choose No, nothing changes and "Operation completed successfully" still appears. |
| No material found for this Condition | A line matches no material. | Check the line, the group and the bill. The lines after it were not run. |
| ErrorSqlUpdateMatPriceCount | Counting the materials failed in the database. | Check the connection and try again. |
| ErrorSqlRepUpdateMatPrice | Running a line failed in the database. | Check the connection, then open material cards to see which lines ran. |
| Operation completed successfully | The run finished, or you refused the last question. | Open a material card to check the prices. |
The messages of Materials Terms are added to these.
Related
This page applies to alameen ERP 10, version 10.1.79.764.