Oracle EBS AP 已经完全付款的发票仍然可以选择并进行零金额的付款
1>找出相应的发票;
SELECT DISTINCT ai.invoice_id, ai.invoice_num invoice_num,
pv.segment1 vendor_num, pv.vendor_name vendor_name,
'The fully Paid invoice should be closed!' status
FROM ap.ap_invoices_all ai,
po.po_vendors pv,
ap.ap_payment_schedules_all aps
WHERE ai.invoice_id = aps.invoice_id
AND ai.set_of_books_id = &sob
AND ai.invoice_amount = ai.amount_paid
AND ai.cancelled_date IS NULL
AND ai.vendor_id = pv.vendor_id
AND ( ai.payment_status_flag <> 'Y'
OR aps.payment_status_flag <> 'Y'
)
2>更新相应flag以符合实际业务;
update ap_invoices_all
set payment_status_flag='Y'
where invoice_id=&invoice_id;
update ap_payment_schedules_all
set payment_status_flag='Y'
where invoice_id=&invoice_id;
结论: 测试发现
1>两表中的payment_status_flag任一一个为Y,另一个取值N或P,在付款工作台会选择不到发票;
2>两表中的payment_status_flag均不为Y,两者不管取N或P,在付款工作台上都能选择到发票.
Metalink反馈[SR:7571908.994]
CAUSE DETERMINATION
====================
The cause of the issue is invalid / incorrect data in AP_PAYMENT_SCHEDULES_ALL and AP_Invoices_All tables
Extra row(s) with AMOUNT_REMAINING, BATCH_ID, DUE_DATE ,GROSS_AMOUNT fields should not be null in
AP_PAYMENT_SCHEDULES_ALL table PAYMENT_STATUS_ FLAG should not be P in AP_Invoices_All table
SOLUTION / ACTION PLAN
======================
To implement the solution, please execute the following steps:
1. Ensure that you have taken a backup of your system before applying the recommended s
olution.
2. Run the following scripts in a TEST environment first:
Create table TAR_7571908_994_APSA as
Select * from ap_payment_schedules_all
Where amount_remaining is null and
batch_id is null and
due_date is null and
gross_amount is null and
payment_status_flag='P';
Create table TAR_7571908_994_AIA as
Select * from AP_Invoices_All
Where INVOICE_ID in (485237, 492065) and
PAYMENT_STATUS_FLAG = 'P';
Delete from ap_payment_schedules_all
Where amount_remaining is null and
batch_id is null and
due_date is null and
gross_amount is null and
payment_status_flag='P';
--This should delete all extra row(s) rows with null values fields in ap_payment_schedules_all
Update AP_Invoices_All
Set PAYMENT_STATUS_FLAG = 'Y'
Where INVOICE_ID in (485237, 492065);
--This should update PAYMENT_STATUS_FLAG field in the invoices specified
Oracle EBS AP 已经完全付款的发票仍然可以选择并进行零金额的付款的更多相关文章
- Oracle EBS AP 发票放弃行
-- purpose: 应付发票放弃发票行 -- 12.2.6 环境 -- author:jenrry create_date: 2017-06-07 declare l_dummy_msg VARC ...
- Oracle EBS AP 取消发票
--取消发票 created by jenrry 20170425 declare l_result BOOLEAN; l_message_name VARCHAR2(240); l_invoice_ ...
- Oracle EBS AP 取消付款
--取消付款 created by jenrry 20170425 declare l_return_status varchar2(50); l_msg_count number; l_msg_da ...
- Oracle EBS AP 创建贷项通知单并核销到相应发票
--1.0 生成与发票一样的贷项通知单 created by jenrry 20170423 DECLARE L_CUSTOMER_TRX_ID NUMBER; L_INVOICE_NUMBER VA ...
- ORACLE EBS AP invoice 到付款的数据流
--1.Invoice创建时生成数据如下表 --Invoice主表 SELECT * FROM AP_INVOICES_ALL A WHERE A.INVOICE_NUM = '20111213001 ...
- Oracle EBS AP 应付核销到确定一行预付款
-- purpose: 应付标准发票核销预付款发票中的一行 -- 12.2.6 环境 -- author:jenrry create_date: 2017-06-08 declare l_error_ ...
- Oracle EBS AP取消核销
--取消核销 created by jenrry 20170425 DECLARE l_result BOOLEAN; l_msg_count NUMBER; l_result_n varchar2( ...
- Oracle EBS AP 供应商取值
SELECT --nvl(substr(po.vendor_name,1,instr(po.vendor_name,',',1)-1),po.vendor_name) vendor_name, po. ...
- Oracle EBS AP 供应商API
--创建供应商地址上的电话号码 created by jenrry 20170419 DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; ...
随机推荐
- 【数组】Game of Life
题目: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a ce ...
- postman—集成到jenkins
前言 Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能. 将postman导出的脚本,持续集成到 ...
- 使用subgit进行svn迁移至git(branch,tags)
前言: 最近公司需要将整体项目从svn迁移至gitlab上,经过几天的研究,现记录一下流程 整体思路是进行一次导入: 先通过subgit将svn整个import至本地,在与git上的项目进行合并. 1 ...
- 机器学习--boosting家族之GBDT
本文就对Boosting家族中另一个重要的算法梯度提升树(Gradient Boosting Decison Tree, 以下简称GBDT)做一个总结.GBDT有很多简称,有GBT(Gradient ...
- linux更改文件权限
chown –Rh cheat:cheat /home/cheat/task/Cheat
- Linux-(ps,grep)
grep命令 1.命令格式: grep [option] pattern file 2.命令功能: 用于过滤/搜索的特定字符.可使用正则表达式能多种命令配合使用,使用上十分灵活. Linux系统中gr ...
- php发送get请求
感谢:http://www.zoneself.org/2014/07/21/content_2665.html 1.用PHP发送get请求,很简单: <?php $url='http://www ...
- NewBluePill源码学习 <一>
NewBluePill的源码也看的差不多了,一直说等有时间了再写学习的一些心得,拖来拖去弄到现在了,时间不是等来的,慢慢开始吧. 0x00 初识硬件虚拟化 硬件虚拟化对大数人来讲还是比较陌生. ...
- kafka-spark streaming (一)
Kafka-spark streaming 1.安装包 kafka安装需要zookeeper.jdk. 官网下载最新的: https://kafka.apache.org/downloads http ...
- Linux内核编程规范与代码风格
source: https://www.kernel.org/doc/html/latest/process/coding-style.html translated by trav, travmym ...