on 04-09-2015 3:20 PM
Compañeros buenos días, quería saber si me podían colaborar en la realización de un SP para evitar que se creen documentos sin Centro Costo pero esto a partir de las cuentas de mayor, es decir que si en un documento se toca cuentas que comiencen por la cuenta mayor 4 se active el SP y no deje realizar la creacion hasta no tener el centro de costo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola yessica la opcion que propones seria una buena opcion sin embargo estuve revisando y son muchas las cuentas por ello habia pensado en la opcion de un SP que restringiera este valor. de hecho lo tengo implementado en la parte de compras de la siguiente manera
if @object_type in ('19') and @transaction_type in ('A', 'U') -----------------Nota Credito Compras
begin
if (select count(*)
FROM ORPC T0 INNER JOIN RPC1 T1 ON T0.DocEntry = T1.DocEntry
WHERE (ISNULL(T1.[OcrCode],'') = '')
AND @list_of_cols_val_tab_del = T0.DocEntry)>0
begin
set @error = 10
set @error_message = '** SP COMPRAS4: HACE FALTA INFORMACION DEL CENTRO DE COSTO SE MUEVEN CUENTAS DE RESULTADOS'
end
end
sin embargo tambien tendria que hacer un SP por cada documento.
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.