业务伙伴主数据:客户名称不能为空
小于 1 分钟
控制逻辑:
- 判断业务伙伴类型为客户
- 判断业务伙伴名称为空白
代码示例
----业务伙伴主数据:客户名称不能为空
IF @object_type = '2'
BEGIN
IF @transaction_type = 'A'
OR @transaction_type = 'U'
BEGIN
DECLARE @cardname nvarchar(100);
DECLARE @cardType nvarchar(100);
SELECT @cardname = T0.[CardName]
FROM OCRD T0
WHERE t0.CardCode = @list_of_cols_val_tab_del;
SELECT @cardType = T0.[CardType]
FROM OCRD T0
WHERE t0.CardCode = @list_of_cols_val_tab_del;
IF @cardname IS NULL
AND @cardType = 'C'
BEGIN
SET @error = 1;
SET @error_message = '客户名称不能为空!';
END;
END;
END