cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Quotation is mandatory for Every Purchase Order?

former_member275969
Participant
0 Kudos

Hi Friends

Purchase Quotation is mandatory for Every Purchase Order?

I have this query but i need Exception for One vendor "V00004" how to modify this query please help me out

If @object_type='22' and @transaction_type='A'

BEGIN

If Exists (Select T0.DocEntry from [dbo].[OPOR] T0 Inner Join POR1 T1 On T0.DocEntry=T1.DocEntry

Where T0.DocEntry = @list_of_cols_val_tab_del and T1.BaseEntry is null )

BEGIN

Select @error = -1,

@error_message = 'Purchase Order without Purchase Quotation Cannot Be Added '

End

End

Regards

Reddy

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Reddy,

Just add it to the WHERE clause:


If @object_type='22' and @transaction_type='A'

BEGIN

If Exists (Select T0.DocEntry from [dbo].[OPOR] T0 Inner Join POR1 T1 On T0.DocEntry=T1.DocEntry

Where T0.DocEntry = @list_of_cols_val_tab_del and T1.BaseEntry isnull and NOT T0.CardCode IN ('V00004'))

BEGIN

Select @error = -1,

@error_message = 'Purchase Order without Purchase Quotation Cannot Be Added '

End

End


Regards,

Johan

former_member275969
Participant
0 Kudos

Hi Johan

I need Attachement field mandatory for Ap invoice for the same particular vendor plz give me a query for that

Regards

Reddy

Johan_H
Active Contributor
0 Kudos

Hi Reddy,

Please search this forum, I remember that someone else asked the same.

Otherwise please post a separate question.

Regards,

Johan

former_member275969
Participant
0 Kudos

Hi

I didnt find in this forum, i was asked another quetion  also.

Regards

Reddy

Answers (0)