Skip to Content
0
Jul 11, 2019 at 10:50 AM

PAN number blocking in A/P Invoices

184 Views Last edit Jul 11, 2019 at 11:36 AM 2 rev

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