on 01-28-2011 9:45 PM
Estimado amigos:
No se como hacer para que se copie automaticamente los numero de guias en un campo de usuario de una factura.
El caso es el siguiente: Si la factura tienes una o mas Entregas se copie en un campo de usuario que tiene la factura el o los numero de esas entregas
no me refiero a Docnum sino a una numeracion que manejamos aqui en pero serie y correlativo
Actualemente uso este SP
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROC [dbo].[QA_Guias_de_Remision]
-- =============================================
-- Modificado: Sistemas QA
-- Create date: 27/11/2008
-- Description: Crea una lista de guias de remision por factura y actualiza el campo Guia grabando la en la tabla
-- =============================================
-- Add the parameters for the stored procedure here
@docentry INT -- Variable: numero de la factura
AS
BEGIN
--DECLARACION DE VARIABLE
DECLARE @CONTENIDO AS VARCHAR(250)
--SETEO DE VARIABLE
set @contenido=''
--ACUMULACION EN LA VARIABLE DE LOS CAMPOS QUE NECESITO
SELECT TOP 10 @contenido=@contenido+U_BPP_MDSD + '-' + U_BPP_MDCD + ', ' from ODLN
where Docentry in (select baseref from inv1
where docentry = @docentry and basetype=15)
--MUESTRO EL CONTENIDO
select @contenido
--GRABA EL NUMERO EN LA TABLA
UPDATE OINV set u_qa_GUIRE = @contenido
where docentry = @docentry
END
y con una BF en un campo de usuario dentro de la factura uso esto
execute [dbo].[QA_Guias_de_Remision]
$[OINV.DocEntry]
No se como hacer por favor si me pueden ayudar
Por que no metes la actualizacion en el TransactionNotification, no creo que sea posible meter el docentry si aun no se ha guardado el dato en la tabla.
En cambio si lo intentas desde el transactionNotification, el docentry ya viene en la variable @list_of_cols.....
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 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.