on 06-24-2015 8:44 AM
Hi Expert ,
my client is doing direct GRN and asking whenever in GRN , DocTotal is more than 1000 then it should give error that first Add Purchase Order .
what is the store Procedure .....??
Please help me Out for this .
Thanks
Sarvesh Gupta
Hi
Try This
If @object_type='20' and @transaction_type in ('A','u')
BEGIN
If Exists (select * from PDN1 r inner join opdn r1 on r.docentry=r1.docentry
where isnull(r.Baseref,'') ='' and r1.DocType ='I' and r1.doctotal > 1000 and r1.DocEntry = @list_of_cols_val_tab_del )
BEGIN
Select @error = -1,
@error_message = 'GRPO without PO is not allowed'
End
End
With Regards
Balaji Sampath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's working .
thanks
can u please check this link and help me out for this issue also ,
Alert for user of Purchase Request Created or Changed to another user .
Try This
IF @object_type = '20'
AND @transaction_type IN ('A', 'u')
BEGIN
IF EXISTS(
SELECT t1.docentry
FROM opdn t1
INNER JOIN pdn1 t2
ON t1.docentry = t2.docentry
WHERE @list_of_cols_val_tab_del = t1.docentry and isnull(t2.BaseType ,'') =''
AND t1.DocTotal>='1000'
)
BEGIN
SET @error = -1
SET @error_message = 'You Cannot Perfrom this Action without Purchase Order'
END
END
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
it's working .
thanks
can u please check this link and help me out for this issue also ,
Alert for user of Purchase Request Created or Changed to another user .
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.