on 03-22-2017 2:26 PM
Alguien saber como bloquear la creacion o actualizacion de un socio de negocio si este no tiene definida la direcccion de facturacion y destino en el dato maestro del socio de negocio, esto porquehe detectado que algunos usuarios estan dejando el indicador de impuesto en la direccion de destino. Estoy tratando de unir las tablas
IF (@transaction_type IN (N'A', N'U') and (@object_type = '2')) BEGIN IF EXISTS (SELECT 'X' FROM [dbo].[OCRD] T0 Left Outer JOIN [dbo].[CRD1] T1 ON T0.CardCode = T1.CardCode WHERE T1.CardCode is NULL and T1.cardcode = @list_of_cols_val_tab_del --and T0.CardType = N'C' AND ( T1.AdresType != 'B' and T1.AdresType != 'S' or T1.AdresType is NULL or T1.AdresType = '') and T0.CardCode = CAST(@list_of_cols_val_tab_del AS NVARCHAR(15)) ) BEGIN SET @error_message = 'PROHIBIDO crear o actualizar socios de negocio sin direccion de Destino/ENVIO.' SET @error = 1118 END end
User | Count |
---|---|
107 | |
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.