应付发票:物料类应收发票不能直接复制从采购订单
小于 1 分钟
代码示例
--应付发票:物料类应收发票不能直接复制从采购订单
IF @object_type = '18'
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]='22'
AND T0.DocEntry = @list_of_cols_val_tab_del
)
BEGIN
SET @error = 182;
SET @error_message = '物料类应收发票不能直接复制从采购订单!';
END;
END;
END