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 已经完全付款的发票仍然可以选择并进行零金额的付款的更多相关文章

  1. Oracle EBS AP 发票放弃行

    -- purpose: 应付发票放弃发票行 -- 12.2.6 环境 -- author:jenrry create_date: 2017-06-07 declare l_dummy_msg VARC ...

  2. Oracle EBS AP 取消发票

    --取消发票 created by jenrry 20170425 declare l_result BOOLEAN; l_message_name VARCHAR2(240); l_invoice_ ...

  3. Oracle EBS AP 取消付款

    --取消付款 created by jenrry 20170425 declare l_return_status varchar2(50); l_msg_count number; l_msg_da ...

  4. Oracle EBS AP 创建贷项通知单并核销到相应发票

    --1.0 生成与发票一样的贷项通知单 created by jenrry 20170423 DECLARE L_CUSTOMER_TRX_ID NUMBER; L_INVOICE_NUMBER VA ...

  5. ORACLE EBS AP invoice 到付款的数据流

    --1.Invoice创建时生成数据如下表 --Invoice主表 SELECT * FROM AP_INVOICES_ALL A WHERE A.INVOICE_NUM = '20111213001 ...

  6. Oracle EBS AP 应付核销到确定一行预付款

    -- purpose: 应付标准发票核销预付款发票中的一行 -- 12.2.6 环境 -- author:jenrry create_date: 2017-06-08 declare l_error_ ...

  7. Oracle EBS AP取消核销

    --取消核销 created by jenrry 20170425 DECLARE l_result BOOLEAN; l_msg_count NUMBER; l_result_n varchar2( ...

  8. Oracle EBS AP 供应商取值

    SELECT --nvl(substr(po.vendor_name,1,instr(po.vendor_name,',',1)-1),po.vendor_name) vendor_name, po. ...

  9. Oracle EBS AP 供应商API

    --创建供应商地址上的电话号码 created by jenrry 20170419 DECLARE l_return_status VARCHAR2(1); l_msg_count NUMBER; ...

随机推荐

  1. 【链表】Remove Duplicates from Sorted List II(三指针)

    题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct  ...

  2. Mina的服务器

    (一) package testMina; import java.io.IOException; import java.net.InetSocketAddress; import java.nio ...

  3. NoSQL之Redis入门笔记

    Redis 1.Redis介绍 1.1 NoSQL:一类新出现的数据库(not only sql),它的特点 不支持sql语法 存储结构跟传统关系型数据库中的那种关系表完全不同,nosql中存储的数据 ...

  4. 使用Pelican在Github(国外线路访问)和Coding(国内线路访问)同步托管博客

    本文原文地址:使用Pelican在Github(国外线路访问)和Coding(国内线路访问)同步托管博客 介绍: Github Pages 禁用了百度爬虫,因此百度搜索引擎经常抓取不到在Github上 ...

  5. mongodb-地理坐标存储查询

    mongodb可支持空间地理搜索: 查询器 $geoWithin Selects geometries within a bounding GeoJSON geometry. The 2dsphere ...

  6. Velocity学习笔记

    一.为什么要使用velocity? 很多人下载了EasyJWeb的开源应用示例,但是对动态页面模板文件中的标签使用不是很熟悉,这里简单介绍一下.EasyJWeb特定把视图限定为Velocity,因为我 ...

  7. CSS选择器详解(一)常用选择器

    目录 类型选择器 类选择器 ID选择器 伪类 伪元素 类型选择器 通过类型选择器可以选择某一类型的html标签,并对其使用样式. 语法: selector {property1: value; pro ...

  8. rvm is not a function的解决方法

    今天在使用rvm 1.9.3 --default设置默认的ruby的命令时出现 RVM is not a function, selecting rubies with 'rvm use ...' w ...

  9. aapt命令获取apk详细信息(包名、版本号、版本名称、兼容api级别、启动Activity等)

    1.安装SDK,使用SDK自带的aapt进行查看.aapt所在位置:D:\SDK\build-tools下,任一一个均可,如D:\SDK\build-tools\19.1.0 2.cmd命令下进入ap ...

  10. 既之前的基础,先写个简单的PHP 与数据库 的数据交流

    程序分三个板块, 现在先不用 css 和 javascript     先用纯 html  php  写吧. 所以那些 嵌入式 <font  size=....  什么的看看就算了,不推荐如此使 ...