PQ Accounting requested to cancel unaccounted invoice

来源:互联网 发布:java 网站开发框架 编辑:程序博客网 时间:2024/06/06 14:09

Doc ID: AG1023

Subject: PQ Accounting requested to cancel unaccounted invoice

Type: Problem

Creation Date: 06-Nov-08

Last Revision Date: 04-DEC-08

Status: Open

Owner: Kevin

 

Symptom

The error occurred where they cancelled the unaccounted invoice. (Refer to AG1023_01 AG1023_02)

 

Cause

APP-SQLAP-10234: This invoice cannot be fully cancelled because it has an accounting hold. Please either correct the errors that caused the hold then cancel the invoice, or manually release the hold so the cancellation process will automatically complete.

 

Solutions

1.    [06-Nov-08] Kevin tried to manually release the hold but he was failed. (Refer to AG1023_03)

2. [06-Nov-08] Kevin suggested PH accounting to try to increase budget for this and then manually release the hold because the Hold Reason was “Insufficient funds exist for this invoice”. (Refer to AG1023_04)

3. [10-Nov-08] PH Accounting said that one invoice was cancelled, the other one was not able to be cancelled. (Refer to AG1023_05)

4. [17-Nov-08] Kevin ran the script in ERPDB,

    delete ap_invoice_distributions_all
where invoice_id=162465  ----非标准的处理方法,各位请慎用

5. [18-Nov-08] Kevin released the hold manually and cancelled the invoice “DN2006-0109rev2” in ERPDB. (Refer to AG1023_06)

6. [03-Dec-08] Kevin applied the solution in ERPDB again and asked PH Accounting to check it.

7. [03-Dec-08] PH Accounting confirmed that the problem was ok in ERPDB.

8. [03-Dec-08] Kevin applied the solution in ERPAPP and asked PH Accounting to check it.

9. [04-Dec-08] PH Accounting confirmed that the problem was ok in ERPAPP. (Refer to AG1023_07)

从ITPUB看到一位高人的解决办法,应该可行,但是没有测试,方法如下:

1.删掉ap_ae_headers, ap_ae_lines中的相关纪录

2.删掉ap_accounting_events中相关纪录

3.将ap_invoice_distributions_all表中相关纪录的post flag, accrual post flag, accounting event id 置掉POSTED_FLAG='N' ,aida.accrual_posted_flag='N', aida.accounting_event_id='';

4.re-run create accounting