Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0006612 | Openbravo ERP | 09. Financial management | public | 2008-12-17 13:35 | 2009-01-25 20:17 | |||||||
Reporter | networkb | |||||||||||
Assigned To | eduardo_Argal | |||||||||||
Priority | immediate | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 20 | OS Version | |||||||||
Product Version | 2.40 | |||||||||||
Target Version | Fixed in Version | 2.40MP2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | No | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0006612: An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line | |||||||||||
Description | When an invoice (AP creditmemo) that has form of payment Cash and negative amount is completed (C_INVOICE_POST procedure), the amount of the cash journal line created is wrong. It creates a line in the cash journal but with positive amount when it should be negative. Then you are not able to post the cash journal because the amount of the line does not match with the amount of the dept payment. | |||||||||||
Steps To Reproduce | 1-Create a purchase invoice with form of payment cash and Transaction Document: AP creditmemo 2-Create a line with a negative quantity (the total amount is negative) 3-Complete the invoice 4-It will create a cash journal with its line in the same date as the date of the invoice(financial management->Receivables%payables->Transactions->Cash journal) 5-Go to Payment tab and see that the Amount is positive (correct). 6-Go to Cash Journal window and to Lines tab. You will see a new line but the amount has not the quantity like the invoice we have posted. Instead of being negative, it is positive. 6-Try to complete the cash journal, and you get the following error: Error: In line10 the amount does not match with amount of the debt payment | |||||||||||
Proposed Solution | Review the procedure C_INVOICE_POST [1] since it is inserting badly the cash journal line when the invoice is of document type AP Credit Memo. Review line: INSERT INTO C_CASHLINE ( C_CashLine_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, C_Cash_ID, C_Debt_Payment_ID, Line, Description, Amount, CashType, C_Currency_ID, DiscountAmt, WriteOffAmt, IsGenerated ) VALUES ( v_CashLine, v_Client_ID, v_Org_ID, 'Y', now(), v_UpdatedBy, now(), v_UpdatedBy, v_Cash, v_debtPaymentID, v_line, v_BPartnerName, C_Currency_Convert((CASE v_IsSOTrx WHEN 'Y' THEN v_paymentAmount ELSE -v_paymentAmount END), v_Currency_ID, v_CB_Curr,v_DateAcct,NULL,v_Client_ID, v_Org_ID), 'P', v_Currency_ID, 0, 0, 'Y' ) [1] https://dev.openbravo.com/websvn/openbravo/trunk/src-db/database/model/functions/C_INVOICE_POST.xml [^] | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2008-12-17 13:35 | rafaroda | New Issue | ||||||||||
2008-12-17 13:35 | rafaroda | Assigned To | => eduardo_Argal | |||||||||
2008-12-17 13:35 | rafaroda | Status | new => scheduled | |||||||||
2008-12-17 13:58 | psarobe | OBNetwork customer | => No | |||||||||
2008-12-17 13:58 | psarobe | Proposed Solution updated | ||||||||||
2008-12-18 17:53 | svnbot | Checkin | ||||||||||
2008-12-18 17:53 | svnbot | Note Added: 0011546 | ||||||||||
2008-12-18 17:53 | svnbot | Status | scheduled => resolved | |||||||||
2008-12-18 17:53 | svnbot | Resolution | open => fixed | |||||||||
2008-12-18 17:53 | svnbot | svn_revision | => 11391 | |||||||||
2009-01-25 20:17 | psarobe | Regression testing | => No | |||||||||
2009-01-25 20:17 | psarobe | Status | resolved => closed |
Notes | |||||
|
|||||
|
|