on 01-16-2013 1:59 PM
Olá amigos,
Alguem tem alguma regra via TRANSACTION NOTIFICATION para bloqueio de registro da NF Entrada sem Pedido de Compras?
Amigo.
Aqui usamos o seguinte na procedure SBO_SP_TransactionNotification
IF ((@object_type = '18') AND (@transaction_type <> 'D' ))
BEGIN
IF(SELECT COUNT(*) FROM PCH1 T0 , OPCH T1
WHERE T0.DocEntry = T1.DocEntry AND T0.DocEntry = @list_of_cols_val_tab_del AND T0.BaseType <> '22' AND
ISNULL(T0.BaseEntry,0) = '0'
AND T1.CardCode NOT IN ('F41225562600','FCOURA','FIANA')) > 0
BEGIN
SET @error = 1
SET @error_message = 'Nota Fiscal de Entrada não tem vínculo com um Pedido de Compra.'
GOTO End_Of_Block
END
END
Veja se funciona para o teu caso.
Abraços.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Desculpa, acabei copiando e colocando sem tirar um
bloqueio específico daqui da empresa.
Usa este abaixo, por favor:
IF ((@object_type = '18') AND (@transaction_type <> 'D' ))
BEGIN
IF(SELECT COUNT(*) FROM PCH1 T0 , OPCH T1
WHERE T0.DocEntry = T1.DocEntry AND T0.DocEntry = @list_of_cols_val_tab_del AND T0.BaseType <> '22' AND
ISNULL(T0.BaseEntry,0) = '0') > 0
BEGIN
SET @error = 1
SET @error_message = 'Nota Fiscal de Entrada não tem vínculo com um Pedido de Compra.'
GOTO End_Of_Block
END
END
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
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.