cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Discount Notification at Footer level

ramco1917
Participant
0 Kudos
80

Hi

I want Notification on Purchase Order that Discount at Footer level should be within -.50 to .50

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

SonTran
Active Contributor
0 Kudos

Hi,

Try this,

IF @Object_type = N'22' and @transaction_type in ('A', 'U')
	BEGIN
			IF EXISTS (SELECT T0.DocEntry FROM OPOR T0 
						WHERE (T0.DiscPrcnt <-50 or T0.DiscPrcnt > 50)
							AND T0.DocEntry = @list_of_cols_val_tab_del
						)
			BEGIN
				set @error = 2207
				set @error_message =  N'Footer Discount can not be out of range [-50, 50] check again please.'
				
			END
	END

Hope this helps,

Son Tran