zoukankan      html  css  js  c++  java
  • 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

    土豆君
  • 相关阅读:
    c++中的length,strlen;静态数据成员,静态局部变量
    c++中*的含义
    (1)引用的解释; (2)类的成员函数在类外实现的情况
    DbFunctions 作为 LINQ to Entities 查询的一部分使用时,此方法调用规范 CreateDateTime EDM 函数以创建新的 DateTime 对象。
    年视图,选择月份 ---bootstrap datepicker
    时间控件,页面刷新初始化时间控件只显示年月
    load加载层
    response 下载文件火狐浏览器文件名乱码问题
    Web Uploader
    layer是一款近年来备受青睐的web弹层组件
  • 原文地址:https://www.cnblogs.com/jenrry/p/10007244.html
Copyright © 2011-2022 走看看