Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0012698 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Z. Others | minor | always | 2010-03-16 12:59 | 2010-12-09 15:59 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | mirurita | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 2.50 | |||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 2f0fe8d95d09 | |||
Projection | none | ETA | none | Target Version | 2.50 | |||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | 2.50 | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Advanced Payables and Receivables Mngmt | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0012698: Updating payment monitor fails in FIN_GEN_PAYMENTSCHEDULE_INV extension point | |||||||
Description | At the end of the extension point the payment monitor is updated. The problem appears when the queries return a NULL value and then we try to set to the a not nullable columns (TOTALPAID, OUTSTANDINGAMT, DUEAMT) of the C_INVOICE table a NULL value. -- reading Data from FIN_PAYMENT_SCHEDULE SELECT sum(PAIDAMT) as PaidAmount, SUM(OUTSTANDINGAMT) as OutstandingAmount INTO v_PaidAmount,V_OutstandingAmount FROM FIN_PAYMENT_SCHEDULE WHERE C_INVOICE_ID=P_RECORD_ID GROUP BY c_invoice_id; -- getting DueAmount from FIN_PAYMENT_SCHEDULE for the Invoice SELECT SUM(OUTSTANDINGAMT) as DueAmount INTO V_DueAmount FROM FIN_PAYMENT_SCHEDULE WHERE C_INVOICE_ID=P_RECORD_ID AND duedate<=TO_DATE(NOW()) GROUP BY c_invoice_id; -- updating Payment Monitor values into C_INVOICE UPDATE C_INVOICE SET TOTALPAID = v_PaidAmount, --ERROR IF NULL OUTSTANDINGAMT = V_OutstandingAmount, --ERROR IF NULL DUEAMT = V_DueAmount --ERROR IF NULL WHERE C_INVOICE_ID = P_RECORD_ID; https://code.openbravo.com/erp/devel/pi-engdev/rev/d7d77cdf4e4e [^] | |||||||
Steps To Reproduce | 1) Create an invoice 2) Create a line 3) Complete the invoice | |||||||
Proposed Solution | Add a COALESCE to avoid NULL values. -- updating Payment Monitor values into C_INVOICE UPDATE C_INVOICE SET TOTALPAID = COALESCE(v_PaidAmount, 0), OUTSTANDINGAMT = COALESCE(V_OutstandingAmount, 0), DUEAMT = COALESCE(V_DueAmount, 0) WHERE C_INVOICE_ID = P_RECORD_ID; | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0025543) mirurita (viewer) 2010-03-16 17:19 |
Fixed on pi-engdev revision 6754:2f0fe8d95d09 https://code.openbravo.com/erp/devel/pi-engdev/rev/2f0fe8d95d09 [^] |
(0025844) hgbot (developer) 2010-03-31 18:11 |
Repository: erp/devel/pi Changeset: 2f0fe8d95d095dd9736767568ff575b2f3aedb4e Author: Mikel Irurita <mikel.irurita <at> openbravo.com> Date: Tue Mar 16 16:00:15 2010 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/2f0fe8d95d095dd9736767568ff575b2f3aedb4e [^] Fixes issue 0012698: Updating payment monitor fails in FIN_GEN_PAYMENTSCHEDULE_INV extension point --- M src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml --- |
(0026405) hudsonbot (viewer) 2010-04-19 21:11 |
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated: Changeset: http://code.openbravo.com/erp/devel/main/rev/2f0fe8d95d09 [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^] Tests: http://builds.openbravo.com/view/devel-int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^] |
(0026762) sureshbabu (viewer) 2010-04-28 12:59 |
Tested for the below scenarios a) Due date = System date b) Due date < System date d) Due date > System date working fine |
![]() |
|||
Date Modified | Username | Field | Change |
2010-03-16 12:59 | mirurita | New Issue | |
2010-03-16 12:59 | mirurita | Assigned To | => mirurita |
2010-03-16 12:59 | mirurita | OBNetwork customer | => No |
2010-03-16 12:59 | mirurita | Status | new => scheduled |
2010-03-16 12:59 | mirurita | fix_in_branch | => pi |
2010-03-16 17:19 | mirurita | Note Added: 0025543 | |
2010-03-16 17:19 | mirurita | Status | scheduled => resolved |
2010-03-16 17:19 | mirurita | Resolution | open => fixed |
2010-03-31 18:11 | hgbot | Checkin | |
2010-03-31 18:11 | hgbot | Note Added: 0025844 | |
2010-03-31 18:11 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/2f0fe8d95d095dd9736767568ff575b2f3aedb4e [^] |
2010-04-19 21:11 | hudsonbot | Checkin | |
2010-04-19 21:11 | hudsonbot | Note Added: 0026405 | |
2010-04-28 12:59 | sureshbabu | Note Added: 0026762 | |
2010-04-28 12:59 | sureshbabu | Status | resolved => closed |
2010-04-28 12:59 | sureshbabu | Fixed in Version | => 2.50 |
2010-12-09 15:59 | anonymous | sf_bug_id | 0 => 3133056 |
Copyright © 2000 - 2009 MantisBT Group |