In Sage X3, transactions for sales and purchases can be created either independently or as part of a structured flow. For sales, the process typically follows the sequence: Sales Quotation → Sales Order → Sales Delivery → Sales Invoice, while for purchases, the sequence is: Purchase Request → Purchase Order → Purchase Receipt → Purchase Invoice. Throughout these transactions, the quantity entered in first transaction seamlessly carries forward to the other transactions across the workflow.
In some cases, users have the flexibility to enter a quantity that is either less than or greater than the quantity specified in the previous transaction. This allows partial deliveries, over-shipments, or other real-world scenarios.
One of our clients has requested a validation for quantities of Purchase Receipt transaction to ensure better control and accuracy in receipt transactions. Specifically, they want the system to allow only a certain percentage of extra or reduced quantity compared to the previous transaction i.e., Purchase Order. This validation will help maintain consistency while accommodating minor variations as per their business requirements.
To achieve this requirement, we have added 3 additional fields in the Purchase Order transaction:
1.% or Qty drop-down: To select whether the tolerance will be calculated with % or direct quantity
2.Tolerance(+): To enter numbers for tolerance calculation on the basis of % or quantity selection
Tolerance(-): To enter numbers for tolerance calculation on the basis of % or quantity selection.
New Stuff:- How to hide the button in line level of grid in sage X3

Now we will check how the calculations will be done.
As shown in the below screenshot Fig 2, we have created Purchase Order – BLR102501POH0001 and “Qty” option have been selected in the drop-down menu. By using this option, tolerance will be calculated in numbers now.
Formula for Maximum Limit in case of “Qty” option: Ordered Qty + Tolerance(+)
Here, ordered qty is 10 and in Tolerance(+) field, 5 is entered. So, Maximum limit 10 + 5 =15 which means maximum qty 15 is allowed in Purchase Receipt against this Purchase Order.
Formula for Minimum Limit in case of “Qty” option: Ordered Qty – Tolerance(-)
Again, ordered qty is 10 and in Tolerance(+) field, 5 is entered. So, Minimum limit is 10-5= 5 which means minimum qty 5 is allowed in Purchase Receipt against this Purchase Order.

If we are trying to enter quantity greater than the maximum limit, then system will throw an error and not allow to create receipt entry against that order.
Refer below screenshot Fig 3, in which we have entered 16 quantity which is greater than the maximum limit. Because of which we are getting error that “The quantity exceeds the tolerance limit”. And system is not allowing to create receipt entry against Purchase Order – BLR102501POH0001.

If we are trying to enter quantity less than the minimum limit, then system will throw an error but allow to create receipt entry against that order.
Refer below screenshot Fig 4, in which we have entered 4 quantity which is less than the minimum limit. Because of which we are getting error that “The quantity is less than the tolerance limit”.

As shown in the below screenshot Fig 5, we have created second Purchase Order -BLR102501POH0002 and “%” option have been selected in the drop-down menu. By using this option, tolerance will be calculated by considering percentage now.
Formula for Maximum Limit in case of “%” option: Ordered Qty + (Ordered Qty * Tolerance(+)/100)
Here, ordered qty is 120 and in Tolerance(+), 5 is entered. So, Maximum limit is 120+(120 * 5/100 =6) = 126 which means maximum qty 126 is allowed in Purchase Receipt against this Purchase Order.
Formula for Minimum Limit in case of “%” option: Ordered Qty + (Ordered Qty * Tolerance(-)/100)
Again, ordered qty is 120 and in Tolerance(-) field, 5 is entered. So, Minimum limit is 120-(120 * 5/100 =114) = 114 which means minimum qty 114 is allowed in Purchase Receipt against this Purchase Order.

Refer below screenshot Fig 6, in which we have entered 127 quantity which is greater than the maximum limit. Because of which we are getting error and system is not allowing to create receipt entry against Purchase Order -BLR102501POH0002.

Refer below screenshot Fig 7, in which we have entered 113 quantity which is less than the minimum limit. Because of which we are getting error that “The quantity is less than the tolerance limit”

In this way, we have added validation on quantity field of Purchase Receipt by using additional tolerance fields of Purchase Order.
[about_us_blog_common]