采购订单-服务类必须填写科目代码
小于 1 分钟
示例代码
if @object_type = '22' --服务采购订单限制必须填写科目
begin
if @transaction_type='A' OR @transaction_type = 'U'
begin
if exists(
SELECT T1.[AcctCode] FROM OPOR T0 INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T0.[DocType] ='S' AND T1.[AcctCode] IS NULL AND T1.DocEntry = @list_of_cols_val_tab_del
)
begin
select @error=1
select @error_message='服务采购订单限制必须填写科目!'
end
end
end