扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
--1.发票创建时生成数据如下表
创新互联成立于2013年,是专业互联网技术服务公司,拥有项目网站建设、做网站网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元新余做网站,已为上家服务,为新余各地企业和个人服务,联系电话:13518219792
--发票主表
SELECT * FROM AP_INVOICES_ALL A WHERE A.INVOICE_NUM = '20111213001';
--发票分配表
SELECT * FROM AP_INVOICE_DISTRIBUTIONS_ALL B WHERE B.INVOICE_ID = 697444;
--发票付款计划表
SELECT * FROM AP_PAYMENT_SCHEDULES_ALL C WHERE C.INVOICE_ID = 697444; --From ap_invoices_all.invoice_id
--2.发票验证并创建会计科目时产生的数据如下表
--发票验证时产生的数据
SELECT *
FROM AP_ACCOUNTING_EVENTS_ALL D
WHERE D.SOURCE_ID = 697444
AND D.SOURCE_TABLE = 'AP_INVOICES'; --From ap_invoices_all.invoice_id
--发票创建会计科目时产生的分录
SELECT * FROM AP_AE_HEADERS_ALL E WHERE E.ACCOUNTING_EVENT_ID = 1093101; --From AP_ACCOUNTING_EVENTS_ALL.souce_id = invoice_id
SELECT * FROM AP_AE_LINES_ALL G WHERE G.AE_HEADER_ID = 1088969;
--3.发票分录查询(SOURCE_TABLE栏位分别是AP_INVOICE_DISTRIBUTIONS和AP_INVOICES,代表发票的分录和发票分配的分录)
SELECT AAL.SOURCE_TABLE
,AAL.*
FROM AP_INVOICES_ALL AIA
,AP_ACCOUNTING_EVENTS_ALL AAE
,AP_AE_HEADERS_ALL AAH
,AP_AE_LINES_ALL AAL
WHERE AIA.INVOICE_NUM = '20111213001'
AND AIA.INVOICE_ID = AAE.SOURCE_ID
AND AAE.SOURCE_TABLE = 'AP_INVOICES'
AND AAH.ACCOUNTING_EVENT_ID = AAE.ACCOUNTING_EVENT_ID
AND AAH.AE_HEADER_ID = AAL.AE_HEADER_ID;
--4.发票付款时产生的数据如下表
SELECT * FROM AP_INVOICE_PAYMENTS_ALL F WHERE F.INVOICE_ID = 697444;
--CHECK_ID From AP_INVOICE_PAYMENTS_ALL
SELECT * FROM AP_CHECKS_ALL H WHERE H.CHECK_ID = 2357756; --CHECK_ID From AP_INVOICE_PAYMENTS_ALL.CHECK_ID
--ACCOUNTING_EVENT_ID From AP_INVOICE_PAYMENTS_ALL.ACCOUNTING_EVENT_ID
SELECT *
FROM AP_ACCOUNTING_EVENTS_ALL D
WHERE D.ACCOUNTING_EVENT_ID = 1086193; --ACCOUNTING_EVENT_ID From AP_INVOICE_PAYMENTS_ALL.ACCOUNTING_EVENT_ID
--5.付款分录查询
SELECT AAL.*
FROM AP_CHECKS_ALL ACA
,AP_ACCOUNTING_EVENTS_ALL AAE
-- ,AP_INVOICE_PAYMENTS_ALL AIP
,AP_AE_HEADERS_ALL AAH
,AP_AE_LINES_ALL AAL
WHERE ACA.CHECK_ID = AAE.SOURCE_ID
AND AAE.SOURCE_TABLE = 'AP_CHECKS'
AND AAE.ACCOUNTING_EVENT_ID = AAH.ACCOUNTING_EVENT_ID
AND AAH.AE_HEADER_ID = AAL.AE_HEADER_ID
-- AND AAL.SOURCE_ID = AIP.INVOICE_PAYMENT_ID--负债科目
--AND AAL.SOURCE_ID = ACA.CHECK_ID--现金科目
AND AAH.ACCOUNTING_DATE = TO_DATE('20110907'
,'yyyymmdd')
AND AAH.ACCOUNTING_DATE TO_DATE('20110908'
,'yyyymmdd')
AND AAH.GL_TRANSFER_FLAG = 'Y'
AND AAH.ORG_ID = 236;
--6. 发票核销预付款发票的金额
SELECT AID1.ROWID ROW_ID
,AID1.INVOICE_ID INVOICE_ID
,AID1.INVOICE_DISTRIBUTION_ID INVOICE_DISTRIBUTION_ID
,AID1.PREPAY_DISTRIBUTION_ID PREPAY_DISTRIBUTION_ID
,AID1.DISTRIBUTION_LINE_NUMBER PREPAY_DIST_NUMBER
,(-1) * AID1.AMOUNT PREPAY_AMOUNT_APPLIED
,NVL(AID2.PREPAY_AMOUNT_REMAINING
,AID2.AMOUNT) PREPAY_AMOUNT_REMAINING
,AID1.DIST_CODE_COMBINATION_ID DIST_CODE_COMBINATION_ID
,AID1.ACCOUNTING_DATE ACCOUNTING_DATE
,AID1.PERIOD_NAME PERIOD_NAME
,AID1.SET_OF_BOOKS_ID SET_OF_BOOKS_ID
,AID1.DESCRIPTION DESCRIPTION
,AID1.PO_DISTRIBUTION_ID PO_DISTRIBUTION_ID
,AID1.RCV_TRANSACTION_ID RCV_TRANSACTION_ID
,AID1.ORG_ID ORG_ID
,AI.INVOICE_NUM PREPAY_NUMBER
,AI.VENDOR_ID VENDOR_ID
,AI.VENDOR_SITE_ID VENDOR_SITE_ID
,ATC.TAX_ID TAX_ID
,ATC.NAME TAX_CODE
FROM AP_INVOICES_ALL AI
,AP_INVOICE_DISTRIBUTIONS_ALL AID1
,AP_INVOICE_DISTRIBUTIONS_ALL AID2
,AP_TAX_CODES ATC
WHERE AID1.PREPAY_DISTRIBUTION_ID = AID2.INVOICE_DISTRIBUTION_ID
AND AI.INVOICE_ID = AID2.INVOICE_ID
AND AID1.AMOUNT 0
AND NVL(AID1.REVERSAL_FLAG
,'N') != 'Y'
AND AID1.TAX_CODE_ID = ATC.TAX_ID(+)
AND AID1.LINE_TYPE_LOOKUP_CODE = 'PREPAY'
AND AID1.INVOICE_ID = 676404; --发票ID
--6. 预付款发票核销发票的金额
SELECT AID1.ROWID ROW_ID
,AID1.INVOICE_ID INVOICE_ID
,AID1.INVOICE_DISTRIBUTION_ID INVOICE_DISTRIBUTION_ID
,AID1.PREPAY_DISTRIBUTION_ID PREPAY_DISTRIBUTION_ID
,AID2.DISTRIBUTION_LINE_NUMBER PREPAY_DIST_NUMBER
,(-1) * AID1.AMOUNT PREPAY_AMOUNT_APPLIED
,AID1.DIST_CODE_COMBINATION_ID DIST_CODE_COMBINATION_ID
,AID1.ACCOUNTING_DATE ACCOUNTING_DATE
,AID1.PERIOD_NAME PERIOD_NAME
,AID1.SET_OF_BOOKS_ID SET_OF_BOOKS_ID
,AID1.DESCRIPTION DESCRIPTION
,AID1.PO_DISTRIBUTION_ID PO_DISTRIBUTION_ID
,AID1.RCV_TRANSACTION_ID RCV_TRANSACTION_ID
,AID1.ORG_ID ORG_ID
,AI.INVOICE_NUM INVOICE_NUM
,AI.VENDOR_ID VENDOR_ID
,AI.VENDOR_SITE_ID VENDOR_SITE_ID
,ATC.TAX_ID TAX_ID
,ATC.NAME TAX_CODE
,AID2.INVOICE_ID PREPAY_ID
FROM AP_INVOICES_ALL AI
,AP_INVOICE_DISTRIBUTIONS_ALL AID1
,AP_INVOICE_DISTRIBUTIONS_ALL AID2
,AP_TAX_CODES ATC
WHERE AID1.PREPAY_DISTRIBUTION_ID = AID2.INVOICE_DISTRIBUTION_ID
AND AI.INVOICE_ID = AID1.INVOICE_ID
AND AID1.AMOUNT 0
AND NVL(AID1.REVERSAL_FLAG
,'N') != 'Y'
AND AID2.TAX_CODE_ID = ATC.TAX_ID(+)
AND AID1.LINE_TYPE_LOOKUP_CODE = 'PREPAY'
AND AID2.INVOICE_ID = 676444 --预付款发票ID
AND AI.INVOICE_TYPE_LOOKUP_CODE NOT IN
('PREPAYMENT'
,'CREDIT'
,'DEBIT');
--发票是否被验证的脚本
/*BEGIN
fnd_client_info.set_org_context(236);
END;*/
SELECT AP_INVOICES_PKG.GET_APPROVAL_STATUS(AI.INVOICE_ID
,AI.INVOICE_AMOUNT
,AI.PAYMENT_STATUS_FLAG
,AI.INVOICE_TYPE_LOOKUP_CODE) --发票是否已验证,已验证的状态为APPROVED
,AI.*
FROM AP_INVOICES_ALL AI
WHERE AI.INVOICE_NUM IN ('2011110888'
,'20111202001');
--应付发票及付款日记账分录追溯
--日记账分录
SELECT AAL.*
,GJL.*
FROM AP_AE_HEADERS_ALL AAH
,AP_AE_LINES_ALL AAL
,GL_JE_HEADERS GJH
,GL_JE_LINES GJL
WHERE AAH.AE_HEADER_ID = AAL.AE_HEADER_ID
AND GJH.JE_HEADER_ID = GJL.JE_HEADER_ID
AND GJL.GL_SL_LINK_ID = AAL.GL_SL_LINK_ID
AND GJH.JE_SOURCE = 'Payables'
AND GJH.PERIOD_NAME = 'Dec-11'
AND AAH.AE_HEADER_ID = 1097269;
--发票匹配接收时与接收的关联关系
SELECT A.RCV_TRANSACTION_ID--rcv_transactions.transaction_id
,A.PO_DISTRIBUTION_ID
,A.*
FROM AP_INVOICE_DISTRIBUTIONS_ALL A
WHERE A.INVOICE_ID = 703771;
--应付总账分录追溯到付款
SELECT DISTINCT ACA.CHECK_NUMBER
,(SELECT INVOICE_NUM
FROM AP_INVOICES_ALL AIA
WHERE AIA.INVOICE_ID = AIP.INVOICE_ID) INVOICE_NUM
FROM AP_AE_HEADERS_ALL AAH
,AP_AE_LINES_ALL AAL
,GL_JE_HEADERS GJH
,GL_JE_LINES GJL
,GL_JE_BATCHES GJB
,AP_CHECKS_ALL ACA
,AP_ACCOUNTING_EVENTS_ALL AAE
,AP_INVOICE_PAYMENTS_ALL AIP
WHERE AAH.AE_HEADER_ID = AAL.AE_HEADER_ID
AND GJH.JE_HEADER_ID = GJL.JE_HEADER_ID
AND GJL.GL_SL_LINK_ID = AAL.GL_SL_LINK_ID
AND GJH.JE_SOURCE = 'Payables'
AND GJB.JE_BATCH_ID = GJH.JE_BATCH_ID
AND ACA.CHECK_ID = AAE.SOURCE_ID
AND AAE.SOURCE_TABLE = 'AP_CHECKS'
AND AAE.ACCOUNTING_EVENT_ID = AAH.ACCOUNTING_EVENT_ID
AND AIP.CHECK_ID = ACA.CHECK_ID
AND GJH.PERIOD_NAME = 'Jan-12'
AND GJB.NAME = '12.01.11报销 51026 Payables 25920611: A 4855700';
-- AND gjh.name = '800346773 Purchase Invoices CNY'
--应付总账分录追溯到发票
SELECT DISTINCT AIA.INVOICE_NUM
FROM AP_AE_HEADERS_ALL AAH
,AP_AE_LINES_ALL AAL
,GL_JE_HEADERS GJH
,GL_JE_LINES GJL
,GL_JE_BATCHES GJB
,AP_INVOICES_ALL AIA
,AP_ACCOUNTING_EVENTS_ALL AAE
WHERE AAH.AE_HEADER_ID = AAL.AE_HEADER_ID
AND GJH.JE_HEADER_ID = GJL.JE_HEADER_ID
AND GJL.GL_SL_LINK_ID = AAL.GL_SL_LINK_ID
AND GJH.JE_SOURCE = 'Payables'
AND GJB.JE_BATCH_ID = GJH.JE_BATCH_ID
AND AIA.INVOICE_ID = AAE.SOURCE_ID
AND AAE.SOURCE_TABLE = 'AP_INVOICES'
AND AAH.ACCOUNTING_EVENT_ID = AAE.ACCOUNTING_EVENT_ID
AND GJH.PERIOD_NAME = 'Jan-12'
AND GJB.NAME = '12.01.11报销 51026 Payables 25920611: A 4855700'
-- AND gjh.name = '800346773 Purchase Invoices CNY'
Oracle ERP 财务部分 包含了 总账 应收 应付 现金 报销 等模块,楼主应该是应收会计,应收一般针对公司或工厂的销售订单或服务订单 而言,当然也包含预收款部分,比如一个销售合同被录入系统后,发货确认后,一般会自动在应收模块生成相应发票,如果公司没有启用Oracle 订单模块,那么
财务人员就要根据其他系统手工或导入应收发票了,应收发票最终要传到总账,生成总账日记账凭证
1、首先登录到数据库中,点击右上角有个工具栏,点击工具栏上的tools。
2、选择导出用户对象,点击tools工具之后,向下查找Export User Objects功能,通过这个功能导出数据。
3、选择需要导出的表或者序列或者存储过程等。在Type列中展示的是对象属性,表、序列和存储过程等。这里要选择存储过程或者序列。
4、选择多个导出的对象。按住ctrl键进行多选导出的对象。点击Output File输出文件路径,选择文件路径输入文件名称,后缀是sql。如果后缀是sql,则是一些数据库语句,可以直接在其他应用上执行,
5、开始导出数据脚本。点击Export按钮,开始对选中的对象进行导出成数据脚本。出的时候需要选择一个目录。
6、查看导出文件。导出完成后,双击打开导出后的文件,就可以看到是一些建表存储过程等脚本。查看导出文件就可以看到是具体的脚本语言。
这是ORACLE很早期的产品,现在由Oracle Projects中的Oracle Internet Time替代了,这个可以在oracle官方网站下载
Oracle新建数据库可以参考以下操作方法:
1、首先点击桌面左下角的开始图标;
2、在跳出的窗口中找到并点击“Database Configuration Assistant”选项;
3、接着选择“创建数据库”并点击“下一步”选项;
4、接着在跳出来的窗口中输入数据库的参数,点击“下一步”;
5、会弹出对数据库的一些概要,检查无误后点击“完成”选项;
6、进行数据库“orcl”的创建;
7、耐心等待一段时间后,就创建成功了。如果不能解决问题,建议重复上述步骤再操作一遍试试看,如果还是不能解决问题,建议请专业的工作人员帮忙解决问题。
1、打开服务窗口:使用 win+r 快捷键打开运行窗口,输入命令 services.msc 按回车。
2、在标准视图下找到 oracle 的 7个服务。
3、可以看到 7 个服务中有四个服务的启动方式是自动运行的(绿线标注的)。把这几个服务的启动方式改成手动。
注:(1)以OracleDBConsoleorcl 服务为例:右击服务– 属性。
(2)修改完成之后的效果,除 OracleJobSchedulerORCL 是禁用外,其他的都是手动启动。
4、按照先后顺序依次启动服务”Oracle ServiceORCL“,”OracleOraDb11g-home1TNSListener“。启动方式:右击服务–启动,如下图所示,即可成功启动。
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流