代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
OracleEBS
】
应收计算SQL
作者:
专注Oracle EBS
/ 发布于
2012/11/29
/
710
应收开票金额: SELECT SUM(RCL.EXTENDED_AMOUNT * NVL(RCT.EXCHANGE_RATE, 1)) FROM RA_CUSTOMER_TRX_ALL RCT, RA_CUSTOMER_TRX_LINES_ALL RCL, RA_CUST_TRX_LINE_GL_DIST_ALL GD, RA_CUST_TRX_TYPES_ALL CTT WHERE 1 = 1 AND RCT.CUSTOMER_TRX_ID = GD.CUSTOMER_TRX_ID AND 'REC' = GD.ACCOUNT_CLASS AND 'Y' = GD.LATEST_REC_FLAG AND RCT.CUSTOMER_TRX_ID = RCL.CUSTOMER_TRX_ID AND RCT.CUST_TRX_TYPE_ID = CTT.CUST_TRX_TYPE_ID AND CTT.TYPE IN ('INV', 'CM') --标准发票,贷项通知单 AND CTT.ORG_ID = RCT.ORG_ID AND gd.gl_date < = TO_DATE('&deadline_date','YYYY-MM-DD') AND RCT.TRX_NUMBER = '&IN_TRX_NUMBER'; 收款原始金额: 分为两部分: 1。不存在冲销记录的收款金额: SELECT CR.AMOUNT * NVL(CR.EXCHANGE_RATE, 1) AMOUNT FROM AR_CASH_RECEIPTS_ALL CR, AR_CASH_RECEIPT_HISTORY_ALL CRH_FIRST_POSTED WHERE 1 = 1 AND CRH_FIRST_POSTED.CASH_RECEIPT_ID = CR.CASH_RECEIPT_ID AND CRH_FIRST_POSTED.ORG_ID = CR.ORG_ID AND CRH_FIRST_POSTED.FIRST_POSTED_RECORD_FLAG = 'Y' AND CR.CASH_RECEIPT_ID = &IN_CASH_RECEIPT_ID AND TRUNC(CRH_FIRST_POSTED.GL_DATE) <= TRUNC(TO_DATE(&IV_DEADLINE, 'yyyy-mm-dd hh24:mi:ss')) AND NOT EXISTS (SELECT 1 FROM AR_CASH_RECEIPT_HISTORY_ALL CRH_CURRENT --冲销日期; WHERE CRH_CURRENT.CASH_RECEIPT_ID = CR.CASH_RECEIPT_ID AND CRH_CURRENT.ORG_ID = CR.ORG_ID AND CRH_CURRENT.CURRENT_RECORD_FLAG = NVL('Y', CR.RECEIPT_NUMBER) AND CRH_CURRENT.STATUS = 'REVERSED') 2。存在收款记录的收款金额: SELECT CR.AMOUNT * NVL(CR.EXCHANGE_RATE, 1) AMOUNT, FROM AR_CASH_RECEIPTS_ALL CR, AR_CASH_RECEIPT_HISTORY_ALL CRH_FIRST_POSTED, AR_CASH_RECEIPT_HISTORY_ALL CRH_CURRENT --冲销日期 WHERE 1 = 1 AND CRH_FIRST_POSTED.CASH_RECEIPT_ID = CR.CASH_RECEIPT_ID AND CRH_FIRST_POSTED.ORG_ID = CR.ORG_ID AND CRH_FIRST_POSTED.FIRST_POSTED_RECORD_FLAG = 'Y' AND CR.CASH_RECEIPT_ID = &IN_CASH_RECEIPT_ID AND TRUNC(CRH_FIRST_POSTED.GL_DATE) <= TRUNC(TO_DATE(&IV_DEADLINE, 'yyyy-mm-dd hh24:mi:ss')) AND CRH_CURRENT.CASH_RECEIPT_ID = CR.CASH_RECEIPT_ID AND CRH_CURRENT.ORG_ID = CR.ORG_ID AND CRH_CURRENT.CURRENT_RECORD_FLAG = NVL('Y', CR.RECEIPT_NUMBER) AND CRH_CURRENT.STATUS = 'REVERSED' --冲销GL日期早于或者等于参数"截止日期不选 AND CRH_CURRENT.GL_DATE > TRUNC(TO_DATE(&IV_DEADLINE, 'yyyy-mm-dd hh24:mi:ss')) 3。开票已核销 SELECT SUM(DECODE(RCTA.INVOICE_CURRENCY_CODE, 'CNY', DECODE(UPPER(UPPER(RCTTA.TYPE)) || UPPER(ARAA.APPLICATION_TYPE), 'CMCM', -1 * NVL(ARAA.AMOUNT_APPLIED, 0), NVL(ARAA.AMOUNT_APPLIED, 0)), DECODE(UPPER(UPPER(RCTTA.TYPE)) || UPPER(ARAA.APPLICATION_TYPE), 'CMCM', -1 * NVL(ARAA.AMOUNT_APPLIED, 0), NVL(ARAA.AMOUNT_APPLIED, 0)) * RCTA.EXCHANGE_RATE)) FROM AR.RA_CUSTOMER_TRX_ALL RCTA, AR.RA_CUST_TRX_TYPES_ALL RCTTA, AR.RA_CUST_TRX_LINE_GL_DIST_ALL RCTLGDA, AR.AR_RECEIVABLE_APPLICATIONS_ALL ARAA WHERE RCTA.CUST_TRX_TYPE_ID = RCTTA.CUST_TRX_TYPE_ID AND UPPER(RCTTA.TYPE) IN ('INV', 'CM', 'DM') AND UPPER(RCTTA.POST_TO_GL) = 'Y' AND UPPER(RCTTA.ACCOUNTING_AFFECT_FLAG) = 'Y' AND UPPER(RCTLGDA.ACCOUNT_CLASS) = 'REC' AND UPPER(RCTLGDA.LATEST_REC_FLAG) = 'Y' AND RCTLGDA.CUSTOMER_TRX_ID = RCTA.CUSTOMER_TRX_ID AND UPPER(RCTA.COMPLETE_FLAG) = DECODE(UPPER('n'), 'Y', UPPER(RCTA.COMPLETE_FLAG), 'N', 'Y') AND (ARAA.APPLIED_CUSTOMER_TRX_ID = RCTA.CUSTOMER_TRX_ID OR ARAA.CUSTOMER_TRX_ID = RCTA.CUSTOMER_TRX_ID) AND ARAA.DISPLAY = 'Y' AND RCTA.TRX_NUMBER = &IN_TRX_NUMBER 4。收款已核销 SELECT ACRA.CASH_RECEIPT_ID, ACRA.RECEIPT_NUMBER, DECODE(ACRA.CURRENCY_CODE, 'CNY', NVL(ARAA.AMOUNT_APPLIED * NVL(ARAA.TRANS_TO_RECEIPT_RATE, 1), 0), NVL(ARAA.AMOUNT_APPLIED, 0) * ACRA.EXCHANGE_RATE * NVL(ARAA.TRANS_TO_RECEIPT_RATE, 1)) FROM AR_CASH_RECEIPTS_ALL ACRA, AR_CASH_RECEIPT_HISTORY_ALL ACRHA, AR_RECEIVABLE_APPLICATIONS_ALL ARAA WHERE ACRHA.GL_DATE <= TO_DATE('&deadline_date', 'yyyy-mm-dd') AND (((ACRA.RECEIPT_METHOD_ID = 1042 AND ACRHA.STATUS NOT IN ('REMITTED', 'CLEARED' , 'RISK_ELIMINATED') AND NVL(ACRHA.CURRENT_RECORD_FLAG, 'Y') = 'Y')) OR (ACRA.RECEIPT_METHOD_ID <> 1042 AND NVL(ACRHA.CURRENT_RECORD_FLAG, 'N') = 'Y')) AND EXISTS (SELECT 'A' FROM AR_CASH_RECEIPT_HISTORY_ALL T WHERE T.CASH_RECEIPT_ID = ACRHA.CASH_RECEIPT_ID AND T.CURRENT_RECORD_FLAG = 'Y' AND T.STATUS != 'REVERSED') AND ACRA.CASH_RECEIPT_ID = ACRHA.CASH_RECEIPT_ID AND UPPER(ACRHA.STATUS) != 'REVERSED' AND ARAA.CASH_RECEIPT_ID = ACRA.CASH_RECEIPT_ID AND ARAA.DISPLAY = 'Y' AND ARAA.GL_DATE <= TO_DATE('&deadline_date', 'yyyy-mm-dd') AND ARAA.APPLIED_CUSTOMER_TRX_ID <> -1 AND ACRA.RECEIPT_NUMBER = '&IN_RECEIPT_NUMBER';
试试其它关键字
应收计算SQL
同语言下
.
设置窗体的位置
.
初始化操作
.
在FORMS调用WEB页面
.
判断数据块的项是否为空
.
EBS 循环处理块记录
.
Oracle Form中调用并发请求生成报表并输出为PDF的方法
.
添加并发程序到指定职责API
.
EBS请求查询输出
.
删除 AP 发票相关脚本
.
ebs安全性
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
专注Oracle EBS
贡献的其它代码
(
66
)
.
ERP系统里的BOM展开函数
.
EBS查找报表或菜单所属职责
.
查询用户客户化的文件配置
.
SQL写出带扩展数量的BOM多级清单
.
oracle开发常用LOV
.
Oracle Patch 版本的查询
.
科目余额SQL
.
根据报表文件名称关键字查找报表的执行文件名称等信息
.
查找在标准请求组里提交的报表所在的职责
.
查找在菜单里提交的报表所在职责
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3