on 07-11-2019 11:50 AM
Dear Experts,
I have a following Scenario,
I want block pan number in A/P or A/R invoices for not all the ones .
I want to book TDS in invoices , The Pan Number field is empty in TAX Tab it will Block the document . i know its based on only in SP Transction , i have tried many things it will not work pls provide the query.
My SP procdure is working BP master level , but i dont want in BP master data I want in Invoices only .
MY Query is for invoices.
IF @transaction_type IN (N'A', N'U') AND (@Object_type IN ('18'))
----BEGIN
----select T1.TaxId0 from OCRD T0 INNER JOIN CRD7 T1 ON T0.[CardCode] = T1.[CardCode] INNER JOIN OPCH T2 ON T0.[CardCode] = T2.[CardCode] INNER JOIN PCH1 T3 ON T2.[DocEntry] = T3.[DocEntry]
WHERE T3.[WTLiable] = 'y' ----AND (T1.TaxId0 is null ) AND T3.Docentry=@list_of_cols_val_tab_del
----BEGIN
----SET @error = 150
----SET @error_message = N'Enter PAN Number Must'
----END
----END
Hi Balaji,
This is the TN:
IF @transaction_Type in ('A','U') and @object_type in ('18')
BEGIN
IF EXISTS(
SELECT t1.DocNum,t1.Cardcode FROM dbo.OPCH AS t1
WHERE t1.DocEntry = @list_of_cols_val_tab_del
AND EXISTS(Select Q1.Cardcode from OCRD q1 inner join CRD7 q2 on q1.Cardcode=q2.Cardcode where q2.TaxId0 is null)
)
BEGIN
SET @error = 150
SET @error_message = N'Enter PAN Number Must'
END
END
Thank you,
Aziz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.