on 02-09-2011 9:23 PM
Hola Expertos
Alguno de Uds Sabe alguna manera de bloquear las facturas que llevan lineas con precios Cero.
Saludos
Por medio de TransactionNotificatio solo coloca el siguiente codigo
If ((@Object_type = '17') AND @transaction_type = 'A')
Begin
Declare @DocEntry Int
Select @DocEntry = T0.DocEntry
From dbo.ORDR T0
Where T0.DocEntry = @list_of_cols_val_tab_del
set @error = (Select Top 1 T1.LineNum+1
From ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
Where T0.DocEntry = @DocEntry And T1.[Price] <= 0)
Select @error_message=N'Precio no puede ser cero en fila '+Convert(Varchar(3),@error)
End
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perdon te pase el de ordenes de Venta el correcto es este:
If ((@Object_type = '13') AND @transaction_type = 'A')
Begin
Declare @DocEntry Int
Select @DocEntry = T0.DocEntry
From dbo.OINV T0
Where T0.DocEntry = @list_of_cols_val_tab_del
set @error = (Select Top 1 T1.LineNum+1
From OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
Where T0.DocEntry = @DocEntry And T1.[Price] <= 0)
Select @error_message=N'Precio no puede ser cero en fila '+Convert(Varchar(3),@error)
End
Saludos
Perdon te pase el de ordenes de Venta el correcto es este:
If ((@Object_type = '13') AND @transaction_type = 'A')
Begin
Declare @DocEntry Int
Select @DocEntry = T0.DocEntry
From dbo.OINV T0
Where T0.DocEntry = @list_of_cols_val_tab_del
set @error = (Select Top 1 T1.LineNum+1
From OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
Where T0.DocEntry = @DocEntry And T1.[Price] <= 0)
Select @error_message=N'Precio no puede ser cero en fila '+Convert(Varchar(3),@error)
End
Saludos
User | Count |
---|---|
95 | |
11 | |
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.