on 07-08-2009 1:17 AM
Alguien me podria ayudar , quiero generar un sp para lineas en la orden de venta en donde me valide el precio por unidad y que no sobre pase una lista.
IF @transaction_type in ('A') AND @object_type = '17'
BEGIN
if exists (Select t0.docentry
from RDR1 T0
where T0.docentry=@list_of_key_cols_tab_del AND
(select t3.pricelist
from ITM1 t3
where T3.ITEMCODE=T0.ITEMCODE)=2)
begin
SELECT @error = 1, @error_message = 'No puedes modificar esta orden Ocupas autorizacion!'
end
END
Edited by: mary merecias on Jul 7, 2009 6:17 PM
Edited by: mary merecias on Jul 7, 2009 6:31 PM
listo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bueno hice algunos pequeños cambios a ver si alguien me ayuda cone ste query:( pr fis.
IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '17'
BEGIN
if exists (Select T0.DOCNUM from ORDR T0 INNER JOIN RDR1 T1 ON
T0.DocEntry = T1.DocEntry
where ((select t3.price
from ITM1 t3
where T3.ITEMCODE=T1.ITEMCODE and t3.pricelist=2)>= t1.price)
and (T0.docentry = @list_of_cols_val_tab_del))
begin
SET @error_message = 'esta mal esto, no seas rata!!'
end
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hector, el problema con la búsqueda formateada es que tengo que dejar habilitado el campo a cambio manual, tengo diferentes precios no puedo asignarles a alguien exactamente una lista nada mas. Ese decir la búsqueda la utilizo para traer un precio por zona tomando en cuenta mis series. Pero pues tengo que dejar abierto el campo de precio para que no tenga problema con precios especiales o algo así. Y ese es el problema, y buenotambien manejo los precios especiales de inventario. Por eso quiero el transactionnotification.
jejeje, p.d. el mensaje si es mmm algo interesante jejeje 😛
atte.
Mary :D.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.