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