应收发票:物料类发票不能直接复制从销售订单
小于 1 分钟
代码示例
-- 应收发票:物料类发票不能直接复制从销售订单
IF @object_type = '13'
BEGIN
IF @transaction_type = 'A'
BEGIN
IF EXISTS (
SELECT T1.[BaseEntry]
FROM OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T0.[DocType]='I' AND T1.[BaseType]='17'
AND T0.DocEntry = @list_of_cols_val_tab_del
)
BEGIN
SET @error = 132;
SET @error_message = '物料类应收发票不能直接复制从销售订单!';
END;
END;
END