cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Price on Purchase Quotation needs be filled

0 Kudos

Hello,

I'd want a help to make a query to makes the Unit Price ( PriceBefDI ) on the Purchase Quotation menu be required, and the system doesnt let the user update or add a new purchase quotation if the Unit Price is empty or if it was not filled.

Thanks in advanced.

Accepted Solutions (1)

Accepted Solutions (1)

zal_parchem2
Active Contributor

Hello Bruno - you would need a Stored Procedure like this. You need to check for both empty (no entry mande - IS NULL) or zero ( = 0), because some End Users will put in zero to get around the non-entry portion of your Stored Procedure. I imagine you would want it for both Add (A) function and Update (U) function. PS - I do not have a system handy to test this out - just wrote it from the top of my head while sitting in this cafe waiting for a train to head out...I believe a Purchase Quotation is an Object Type of 540000006 and the field name is from your question...

Let us know if this works for you!!!

Regards, Zal

IF @transaction_type IN (N'A', N'U') AND 
(@Object_type = N'540000006') 

BEGIN 
If EXISTS (SELECT T.docentry 
FROM PQT1 T 
WHERE T.docentry = @list_of_cols_val_tab_del and 
(T.PriceBefDI IS NULL or T.PriceBefDI  = 0))

Begin 
SET @error = 14 
SET @error_message = N'Please enter the Required Price for the Line' 
End

END

Answers (1)

Answers (1)

0 Kudos

Hey Zal ! Thank you so much, it works !

I just needed put a ')' in your query.

You are very prestative, have a good day.

zal_parchem2
Active Contributor

More than welcome, Bruno. Yes, I noticed I was missing a parehtheis also after posting. Good to see you figured that out.

And thanks go to you for marking this "Answered"...

Regards, Zal