Order of retrieving prices on documents for released items

Case I

While setting the price for an item of a release document on which a customer has been indicated in Customer field and the parameter Lowest price on documents for released items has not been checked on the form of that customer, the system performs the steps described below.

Note
For a given price type to be used at a particular stage, that price type must be available for:

  • center in which a document is being issued (logged-in center)
  • default for a center on behalf of which a document is being issued (a center being a document owner – field Owner on a document form)
  • operator group to which a currently logged-in operator belongs and which is available in a logged-in center
  1. It retrieves a price type default for a customer, set on a customer form on Trade tab and sets it on a document item. The price is fixed in the following way:
    1. If the system finds price lists based on that price type, it searches for price lists containing an item with exactly the same item, unit and features as the ones defined on a document item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it and sets them on a document item.
    2. If it does not find a price list at point 1.1 and a unit defined on a document item is an additional unit, then, from among price lists based on that price type, it searches out price lists containing an item with exactly the same item and features, but with a basic unit of this item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price from it, recalculates it to a price for an additional unit (using the conversion calculator of basic and additional units of this item) and sets it on a document item.
    3. If it does not find a price list at point 1.2, it sets the price 0.
  2. If the system cannot use the price type described above, it retrieces a default price type for a center on behalf of which a document is being issued (a center being a document owner – field Owner on a document form), but only if that price type is available for a given customer at the same time. That price type is set on a document item. The price is fixed in the following way:
    1. If the system finds price lists based on that price type, it searches price lists containing an item with exactly the same item, unit and features as the ones defined on a document item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it and sets them on a document item.
    2. If it does not find a price list at point 2.1 and a unit defined on a document item is an additional unit, then, from among price lists based on that price type, it searches out price lists containing an item with exactly the same item and features, but with a basic unit of this item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price from it, recalculates it to a price for an additional unit (using the conversion calculator of basic and additional units of this item) and sets it on a document item.
    3. If it does not find a price list at point 2.2, it sets the price 0.
  3. If the abovementioned price type cannot be set on a document item, the system retrieves all price lists created on the basis of price types to which a given customer is assigned but which are not default for that customer
    1. If the system finds such price lists, it searches for price lists containing an item with exactly the same item, unit and features as the ones defined on a document item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it and sets them on a document item.
    2. If it does not find a price list at point 3.1 and a unit defined on a document item is an additional unit, then, from among price lists based on that price type, it searches out price lists containing an item with exactly the same item and features, but with a basic unit of this item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it, recalculates it to a price for an additional unit (using the conversion calculator of basic and additional units of this item) and sets them on a document item.
  4. If the system does not find such a price list or a price type, it retrieves all price lists created on the basis of price types that are not associated with any customer.
    1. If the system finds such price lists, it searches for price lists containing an item with exactly the same item, unit and features as the ones defined on a document item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it and sets them on a document item.
    2. If it does not find a price list at point 4.1 and a unit defined on a document item is an additional unit, then, from among price lists based on that price type, it searches out price lists containing an item with exactly the same item and features, but with a basic unit of this item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it, recalculates it to a price for an additional unit (using the conversion calculator of basic and additional units of this item) and sets them on a document item.
  5. If the system does not find such a price list or a price type, it retrieves a default price type for a center on behalf of which a document is being issued (no matter if a center in which a document is being issued, an operator group to which a logged-in operator belongs and a customer have access to that price type). That price type is set on a document item. The price is fixed in the following way:
    1. If the system finds price lists based on that price type, it searches price lists containing an item with exactly the same item, unit and features as the ones defined on a document item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price type and a price from it and sets them on a document item.
    2. If it does not find a price list at point 5.1 and a unit defined on a document item is an additional unit, then, from among price lists based on that price type, it searches out price lists containing an item with exactly the same item and features, but with a basic unit of this item. If it finds such price lists, it selects the one that is the most up-to-date, retrieves a price from it, recalculates it to a price for an additional unit (using the conversion calculator of basic and additional units of this item) and sets it on a document item.
    3. If it does not find a price list at point 5.2, it sets the price 0.
Scheme of retrieving prices on documents for released items

Case II

If a customer has been indicated on a document for released items in Customer field, and the parameter Lowest price on documents for released items has been checked on the form of that customer, the systemsearches for the lowest price for that customer on every document item.

The order of searching out the price for a document item is the following:

  1. the system retrieves all price types for released items that are simultaneously available in a center which is a document owner (field Owner on a document form) and in a center in which a document is being issued (a logged-in center)
  2. from among those price types, the system selects only those ones that are available for a customer indicated on a document in Customer field
  3. For each of these price types, the system retrieves:
    1. the most up-to-date price list containing an item with the same item, unit and features as the ones on a document item
    2. if there is no price list with such an item and an additional unit has been set on a document item, the system retrieves the most up-to-date price list containing an item with the same item and features as the ones on a document item but with a basic unit
  4. from among those price lists, the system selects one with the lowest price for a given item. A price type and a price are retrieved from that price list and set on a document item. If an additional unit has been set on a document item and a price comes from an item for a basic unit, it is recalculated from a basic unit (according to the unit conversion calculator defined on an item form)
  5. if there is no price list with such an item, the default price type for a center being a document owner and the price 0 are set on an item
  6. if there is no price type available for a customer selected on a document, the system retrieves a price type default for a center being a document owner (field Owner on a document form), no matter if a center issuing a document (a logged-in center) and a logged-in operator have access to that price type Price for that price type:
    1. is retrieved from the most up-to-date price list containing an item with the same item, unit and features as the ones on a document item
    2. if there is no price list with such an item and an additional unit has been set on a document item, the system retrieves the most up-to-date price list containing an item with the same item and features as the ones on a document item but with a basic unit; before this price is set on a document, it is recalculated to a price for an additional unit (according to the unit conversion calculator defined on an item form)
    3. if there is no price list with such an item, the price is 0

 

Czy ten artykuł był pomocny?