应收发票相关脚本
/* Formatted on 2018/3/15 10:20:35 (QP5 v5.256.13226.35538) */
SELECT * FROM hr_organization_units_v;
--AR 事物处理安全性限制
BEGIN
mo_global.set_policy_context ('S', '107');
END;
-- 备份事物处理
CREATE TABLE bak.RA_CUSTOMER_TRX_ALL20120619
AS
SELECT *
FROM RA_CUSTOMER_TRX_ALL
WHERE TRX_NUMBER = '10102672';
-- 检测备份情况
SELECT * FROM bak.RA_CUSTOMER_TRX_ALL20120619;
-- 修改事物处理
SELECT t.*, t.ROWID
FROM RA_CUSTOMER_TRX_ALL t
WHERE TRX_NUMBER = '10102672';
-- 备份事物处理行
CREATE TABLE bak.RA_CUSTOMER_TRX_LINES_all0619
AS
SELECT *
FROM RA_CUSTOMER_TRX_LINES_all
WHERE CUSTOMER_TRX_ID = 978317; --CUSTOMER_TRX_LINE_ID
-- 检测备份数据
SELECT * FROM bak.RA_CUSTOMER_TRX_LINES_all0619;
-- 修改事物处理行
SELECT t.*, t.ROWID
FROM RA_CUSTOMER_TRX_LINES_all t
WHERE CUSTOMER_TRX_ID = 978317; --CUSTOMER_TRX_LINE_ID
-- 备份应收事物处理分配行
CREATE TABLE bak.RA_CUST_TRX_LINE_GL_DIST0619
AS
SELECT *
FROM RA_CUST_TRX_LINE_GL_DIST
WHERE CUSTOMER_TRX_ID = 978317;
-- 检测备份数据
SELECT * FROM bak.RA_CUST_TRX_LINE_GL_DIST0619;
-- 修改应收事物处理分配行
SELECT t.*, t.ROWID
FROM RA_CUST_TRX_LINE_GL_DIST t
WHERE CUSTOMER_TRX_ID = 978317;
-- 备份应收事物处理-税行
CREATE TABLE bak.ZX_LINES20120619
AS
SELECT *
FROM ZX_LINES
WHERE TRX_NUMBER = '10102672';
-- 检测备份数据
SELECT * FROM bak.ZX_LINES20120619;
-- 修改应收事物处理-税行
SELECT t.*, t.ROWID
FROM ZX_LINES t
WHERE TRX_NUMBER = '10102672';