Skip to main content

Modify Gifts in Materials Cards

This tool writes the same gift rule in the cards of many materials: how many gift units are given for how many units sold. The rule is saved in the material card, and it shows in the material information window of a bill under Gifts in the form 1 For 10. For the practical steps, see Modify material cards in bulk.

Opening the window​

  • From the main ribbon: Materials > Tools > Tools > Modify Gifts in Materials Cards. The command shows if your licence includes warehouses and the file does not work in multi-file mode.
  • You need the Modify Gifts in Materials Cards permission in Users Management, on the Reports page. It is one check box that allows running the tool.

Fields and buttons​

FieldDescriptionRequiredValues and rules
MaterialOne material whose gift is changed, together with the materials of its combinations if it has any.NoChoose from the list. Choosing a material disables Group.
GroupA group whose materials' gifts are changed.NoChoosing a group disables Material. The change always covers the materials of the sub groups; there is no option to exclude them.
Materials TermsA saved condition that limits the materials changed, with a table under it that shows its lines.NoThe first value is Without. See Materials Terms.
GiftThe number of gift units.NoA number, zero or more. Example: 1. If you leave it empty it counts as 0.
ForThe number of units sold that earns the gift.NoA number, zero or more. Example: 10. If it is empty or 0 the card has no gift, whatever Gift holds.

1 in Gift and 10 in For means one gift for every ten units. The program writes the two numbers in the gift fields of the material card with the same meaning.

ButtonWhat it does
OkChanges the gift in the chosen material cards, then opens the report Modify Materials Gifts with the list of the materials that were changed. The window stays open.
CancelCloses the window. It does not undo a change you already made.

What the program changes​

When you click Ok the program does this, in this order:

  1. It checks the chosen Materials Terms. The messages of Materials Terms appear if a line is incomplete.
  2. If Material and Group are empty and Materials Terms is Without, it asks "No material, group or condition was selected" with Yes and No. Choose No to stop. Choose Yes to change the gift of all the materials of the file.
  3. If Gift or For is negative, "Values in "For" and "Gifts" must be more or equal to zero" appears and the operation stops.
  4. It picks the materials: the chosen material, or the materials of the group and its sub groups, or the materials the condition meets. It then skips the materials whose security level is higher than your level for editing materials, and the materials that have combinations (segments) themselves; the materials of their combinations are changed.
  5. In each remaining material it writes the two values: For becomes the quantity that earns the gift, and Gift becomes the number of gift units. The old rule of each card is replaced, whether or not the material had a gift.
  6. If Activate log file is on in Program Options, the program records a modification for each material in the operations log.
  7. It opens the report Modify Materials Gifts with the names of the materials that were changed. If no material was changed the report opens empty.

The tool does not keep the old rule and cannot be undone. To remove the gift from materials, choose them and leave Gift and For empty, so both numbers become 0.

Example​

The group "Groceries" has three materials: Rice, Sugar and Orange Juice, and Orange Juice has an old gift of 1 for 6. You chose Group "Groceries", typed 1 in Gift and 10 in For, and clicked Ok.

The gift in the three materials becomes 1 for 10, and the new rule replaces the old rule of Orange Juice. The report opens with three lines, one for each material.

Messages​

MessageWhy it appearsWhat to do
No material, group or condition was selectedYou clicked Ok and the material, the group and the condition are all empty.Choose No, then choose a material, a group or a condition, or Yes if you want all materials.
Values in "For" and "Gifts" must be more or equal to zeroA negative value in Gift or For.Type a number, zero or more.
Error during modificationThe change command failed in the database.Check the connection to the database and try again, and open a material card to see whether it changed.

The messages of Materials Terms are added to these.

This page applies to alameen ERP 10, version 10.1.79.764.