on 03-08-2017 4:36 PM
I do need to develop a transaction notification to block invoice if it not have sale orden
mi code is
-------------------------No es posible Facturar sin Orden de Compra
IF @transaction_type IN ('A','U') AND @Object_type = '13'
BEGIN
IF (SELECT COUNT(BaseType) FROM INV1 Where DocEntry = @list_of_cols_val_tab_del AND BaseType <> 17) >= 1
set @error = -1
set @error_message = N'No es posible crear una Factura sin Orden de Venta'
END
END
and the block is correct but I can't copy partially the sale order
Hi
if you want to allow copy partially I think you have to block when all invoice lines do not have previous document.
I will try this:
if (@transaction_type in ('A', 'U') and @object_type = '13')
begin
if (select count(*) from inv1 where baseentry = -1 and docentry = @list_of_col_val_tab_del) > 0
begin
set @error = 1
set @error_message = 'No se permiten líneas sin pedido de venta asociado'
end
end
Kind regards
Agustín Marcos Cividanes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
11 | |
6 | |
5 | |
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.