Hi,
Try this
-- Block multi taxcode
declare @numvatgroup int
IF (@object_type='13') and (@transaction_type='A' )
BEGIN
set @numvatgroup=(SELECT COUNT( DISTINCT VATGROUP) FROM INV1 WHERE dbo.INV1.DocEntry = @list_of_cols_val_tab_del );
if @numvatgroup >1
BEGIN
SELECT @Error = 1, @error_message = 'Multi Taxcode not accepted .'
END
END
Hope this helps,
TVSon