|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
SELECT acr.attribute5 合同号,
acr.receipt_number 收款编号,
acr.attribute3 业务线,
to_char(acr.receipt_date, 'yyyy-mm-dd') 收款日期,
acr.AMOUNT 收款金额,
sum(ara.AMOUNT_APPLIED) 未核销收款
FROM ar_cash_receipts acr, ar_receivable_applications ara
WHERE 1 = 1
and ara.CASH_RECEIPT_ID(+) = acr.CASH_RECEIPT_ID
AND trunc(acr.receipt_date) BETWEEN
trunc(nvl(to_date('2003-01-01', 'yyyy-mm-dd'), acr.receipt_date)) AND
trunc(nvl(to_date('2006-07-01', 'yyyy-mm-dd'), acr.receipt_date))
and ara.STATUS = 'UNAPP'
having sum(ara.AMOUNT_APPLIED) <> 0
group by acr.attribute5,
acr.receipt_number,
acr.attribute3,
acr.receipt_date,
acr.AMOUNT
;
begin
fnd_client_info.set_org_context(85);
end; |
|