on 04-25-2018 2:53 PM
1. Hola buen dia
tengo una tarea y es impedir que los asesores puedan modificar el precio despues de crear la orden de venta, se que es con un Transation Notification pero no tengo el codigo,
me pueden ayudar por favor.
Hola
¿Qué precio quieres que no pueda ser modificado?
¿El precio unitario? ¿El total de la línea? ¿El total del documento?
Un saludo
Agustín
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Buen día, tengo esta misma necesidad de código para la empresa y esta ocasionando el mismo error de former member. ademas el maxloginstanc no existe en la tabla, creo que es loginstanc.
en esa sentencia si le quito a isnull("max"(loginstanc,1) el max que esta entre comillas me deja crear la orden por el contrario ejecuta el código sin modificar el precio unitario.
yo se que es 1 año tarde pero me urge este código. ya que no conocía la tabla adoc y ado1
les agradezco retomar el tema nuevamente y señalarme cual es el error. cordial saludo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola
te adjunto un código SQL para bloquear el cambio de este campo. Tendrás que adaptarlo para que aplique la validación a los usuarios que te interesan:
if (@object_type = '17' and @transaction_type = 'U')
begin
if (select count(*) from adoc where docentry = @list_of_cols_val_tab_del) > 0
begin
declare @instance int
select @instance = isnull(maxloginstanc), 1) from adoc where doctype = '17' and docentry = @list_of_cols_val_tab_del
if (select count(*) from rdr1 T1 inner join ADO1 T3 on T1.docentry = T3.docentry and T1.linenum = T3.linenum and T3.loginstanc = @instance and T3.objtype = '17' where T1.price <> T3.price) >0
begin
set @error = 1
set @error_message = 'El usuario no puede modificar el precio unitario'
end
end
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 |
---|---|
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.