on 01-06-2010 10:18 PM
Buen año a todos!!
Quisiera su ayuda para poder limitar la cantidad de líneas a ingresar en una factura, dado que mi formato en papel solo es posible imprimir 10 líneas, o menos, como puedo hacer que al usuario se le avise cuando llegue al número límite y que no siga ingresando más datos?
En el layout de impresión he limitado a 10 las líneas del área de ámbito de repetición, sin embargo, siguen ingresando más de las líneas permitidas.
agradezco su ayuda
saludos
Hola...
Has tenido alguna novedad??
Pudiste validar que el documento no sea impreso si supera la cantidad de líneas??
Saludos Cordiales,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola....
Creo que tendrías que aplicar una validación por Transaction SQL. Prueba con el siguiente código:
IF @transaction_type IN ('A') AND @object_type = '13' -- factura de clientes
BEGIN
if exists (Select T0.LineNum from dbo.INV1 T0 where T0.LineNum > 9 AND T0.DocEntry = @list_of_cols_val_tab_del )
begin
SELECT @error = 1, @error_message = 'Numero de Partidas > 10'
end
END
Me parece que con esto, no podrán los usuarios crear una factura con más de 10 lineas
Saludos Cordiales,
Edited by: Paul Ponce on Jan 8, 2010 3:44 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Podrias meter codigo en el TransactionNotification que no permita crear la factura si tiene mas de 10 lineas
if (@Object_type = N'13'and @transaction_type='A')
begin
declare @numerolineas as int
set @numerolineas = (select count(linenum)
FROM inv1 WHERE docentry = @list_of_cols_val_tab_del)
IF @numerolineas >10 begin
SET @error = 2
SET @error_message = ('La factura contiene mas de 10 lineas')
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
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.