Skip to main content

Order from User Query - GUI

How to Create a Purchase Order from a User Request in the Desktop Application?

Written by Lenka Haringerová

In some situations, the standard ABRA Flexi functionality for ordering goods may not be sufficient. ABRA Flexi supports the creation of a purchase order based on minimum stock levels or from existing sales orders.

If you need to create an order based on specific data and conditions, there is an option to create a so-called user query, which can then be used to generate an order. This order can subsequently be used in the application as the basis for an order form. You can find this feature under Purchase Orders > Services > Order Based on Query Result.

This option allows you to select an existing user query, process its output, and insert it into the line items of a purchase order.

You can create the query yourself (available from the Premium plan onwards), or have it custom-built by us. In that case, we need the most precise specification possible of what the query's output should be. Do not hesitate to contact our support line if you have any questions.

The query can involve any processing of stock inventory, taking into account factors such as already ordered quantities, anticipated ordering, minimum stock levels, additional specific conditions, or for example ordering up to a maximum stock level.

There are simply no limits when it comes to creating a user query.

Order Configuration Based on Query Result

The query must have Purchase Orders set as its primary form, and its first four properties (columns) must be of the following types:

  • integer – the ID of the price list item to be ordered

  • integer – the ID of the warehouse to which the order should be placed

  • double – the quantity that will appear in the quantity-to-order field

  • double – the quantity that will appear in the already-ordered quantity field

The quantity offered for the final order is the difference between the third and fourth fields.

As an example, we have included a query for ordering up to the maximum — that is, a query that will offer for ordering all items whose stock level is lower than the max. stock quantity field.

select c.idcenik, sklad.idbsp, sk.maxmj, sk.maxmj-sk.stavmj as rozdil from skarty skleft join ccenik c on sk.idcenik = c.idcenikleft join dbsp sklad on sk.idskladu = sklad.idbspleft join nucetobdobi o on o.iducetobdobi = sk.iducetobdobiwhere sklad.idbsp = 4 and sk.iducetobdobi = 6 and (sk.maxmj > sk.stavmj)order by maxmj

If you are interested in having a query created for you, do not hesitate to contact us.

Did this answer your question?