cancel
Showing results for 
Search instead for 
Did you mean: 

Buy and Sell rules

Former Member
0 Kudos

Hi All,

We want to block buy and sell goods in the decimal quantity for example 1.3 box, 1.2 kg, or 1.4 tons.

It should be 1 box, 1 kg or 1 ton.

It is not about rounding or decimal quantity is reduce to zero.

Another examples are 1 box = 2.5 kg, where the inventory UOM is kg. purchasing and sales UOM are box.

The user have to input 2 box, 4 box, etc. The user can't input 3 box or 1 box etc.

How to block or validate it ?

Rajh

Accepted Solutions (1)

Accepted Solutions (1)

marcella_rivi
Employee
Employee
0 Kudos

Dear Mr Khumar,

you could use the Item per Sales or Purchase Unit. You can select your minimum purchase or sales unit (such as 2). E.g., if you add a purchase document for 1 qty the value added in stock will be 2.

However, if your question is 'how to oblige the user to add even quantity only', then you have to create an alert that would be trigger every time a user enters the wrong quantity.

please, let me know if my suggestion was helpful.

Kind Regards,

Marcella Rivi

SAP Business One Forums Team

Former Member
0 Kudos

Your suggestion is helpful but it is not straight to the point.

What I need is the query or validation that can block the user to input the quantity that I have mentioned

Rajh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajh,

If your rule is clear, it always has conditions to check with. However, it seems difficult to get formula from your question.

If you want to block any non integer qty in marketing documents, you can use SBO_Transaction_Notification SP to achieve it.

Thanks,

Gordon

former_member200818
Contributor
0 Kudos

There is no direct setting for the required validation.

What you can do as a workaround is: Create an apporval template based on a query (if quantity column contains decimal portion then validate)

You can identify a number contains decimal or not based on a simple condition like: actual given number = integer value of (given number) or by some other logic.

Futher refer to the PDF presentation on: Apporval procedure triggered by specific items

https://websmp201.sap-ag.de/~sapidb/011000358700000281802007E/Approv_proc_for_spec_items.pdf

I am sure this presentation will help you understanding how to create approval templates based on a query for row level values.

Good Luck.

Would appreciate, if you could post the solution once you cracked it.

Regards

Satish