on 10-21-2010 1:04 PM
Hola a todos.
Necesito incorporar un mensaje de alerta en las ordenes de venta, la idea es que cuandom incorporen el número de orden de compra del cliente, un mensaje les advierta que dicha orden de compra ya fué utilizada en una orden de venta anterior.
Ojalá puedan ayudarme.
Saludos
Hola...
Podrías trabajar una validación por Transaction Notification
Sería algo asi
IF @object_type = '17' and @transaction_type = 'A' OR @transaction_type = 'U'
BEGIN
DECLARE @VAR INT
DECLARE @NUMOC INT
SET @NUMOC = (SELECT T0.ImportEnt FROM ORDR T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del)
SET @VAR = (SELECT COUNT(isnull(T0.[ImportEnt],0)) FROM ORDR T0 WHERE T0.ImportEnt = @NUMOC)
IF @VAR > '1'
BEGIN
SELECT @error = 1
SELECT @error_message = @VAR
END
END
, donde se está leyendo el numero de la orden de compra desde la pestaña de finanzas, especificamente el campo PEDIDO. Si la lógica que utilizas es distinta solo cambias ese campo.
Espero te sea de ayuda
Saludos Cordiales,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.