on 12-19-2011 9:16 PM
Hola quisiera poder bloquear a traves de un TN para que no se pueda facturar a clientes que tengan facturas de mas de 120 dias de vencido y donde las condiciones de pago sean diferente a contado
me deja crear la factura, obviamente para la verificacion del TN estoy facturando con un cliente que anteriormente revise cartera y cumple para la prueba
Edited by: jcarito on Dec 20, 2011 10:11 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Intenta asi
if @transaction_type in ('13') and @object_type in ('A')
BEGIN
declare @socio as nvarchar (8)
set @socio =(select cardcode from oinv where docentry =@list_of_cols_val_tab_del)
if (select COUNT(*) from OINV where
DATEDIFF(day, docduedate, getdate())>=120 and docstatus ='O'
and CardCode =@socio)>=1
begin
set @error=1
set @error_message='Facturas vencidas'
end
END
Edited by: Mauricio I Quintana on Dec 19, 2011 4:07 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
9 | |
9 | |
5 | |
4 | |
3 | |
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.