Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012698 | Openbravo ERP | Z. Others | public | 2010-03-16 12:59 | 2010-12-09 15:59 |
Reporter | mirurita | ||||
Assigned To | mirurita | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 20 | OS Version | Community Appliance | |
Product Version | 2.50 | ||||
Target Version | 2.50 | Fixed in Version | 2.50 | ||
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; | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|