on 11-16-2015 10:20 PM
Estimados, quisiera me ayuden como puedo hacer para evitar que desde la oferta de venta se pase a la Factura utilizando transaction notifications. De antemano gracias por la ayuda.
Marco:
Una alternativa es validar que la factura tenga una entrega o Nota de venta asociada, si no la tiene, no deje crear la factura:
Ejemplo, factura debe contener entrega:
------------------------------x------------------------------------------------
IF @transaction_type = 'A' AND @object_type = '13'
BEGIN
IF EXISTS
(SELECT T0.ItemCode FROM [dbo].[INV1] T0
inner join OINV t1 on t1.DocEntry=t0.docentry
WHERE T0.BaseType != 15
and T0.DocEntry = @list_of_cols_val_tab_del)
SELECT @Error = 1, @error_message = 'Factura sin Entrega'
------------------------------x------------------------------------------------
Si necesitas validar que la factura contenga una Nota de venta, solo debes cambiar el WHERE T0.BaseType != 17
Espero sea de ayuda.
Saludos cordiales,
Manuel Díaz G.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.