on 05-24-2016 10:40 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.