Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0006600
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2008-12-17 10:042009-01-02 14:15
ReporternetworkbView Statuspublic 
Assigned Toeduardo_Argal 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision11392
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product Version2.40SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0006600: An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line

DescriptionWhen 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 Reproduce1-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 SolutionReview 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 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0006612 closededuardo_Argal An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line 

-  Notes
(0011542)
svnbot (reporter)
2008-12-18 17:46

Repository: openbravo
Revision: 11388
Author: eduardoargal
Date: 2008-12-18 17:46:03 +0100 (Thu, 18 Dec 2008)

Fixes bug 0006600: An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line

---
U trunk/src-db/database/model/functions/C_INVOICE_POST.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=11388&sc=1 [^]
(0011547)
svnbot (reporter)
2008-12-18 17:54

Repository: openbravo
Revision: 11392
Author: eduardoargal
Date: 2008-12-18 17:54:50 +0100 (Thu, 18 Dec 2008)

Fixes bug 0006600: An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line

---
U trunk/src-db/database/model/functions/C_INVOICE_POST.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=11392&sc=1 [^]

- Issue History
Date Modified Username Field Change
2008-12-17 10:04 networkb New Issue
2008-12-17 10:04 networkb Assigned To => rafaroda
2008-12-17 10:04 networkb sf_bug_id 0 => 2438797
2008-12-17 10:04 networkb Regression testing => No
2008-12-17 11:07 networkb Summary When a invoice with negative amount is posted and the form of payment is cash the cash journal line is not correct => A invoice (AP creditmemo) with negative amount is posted and the form of payment is cash the cash journal line is not correct
2008-12-17 11:07 networkb Description Updated
2008-12-17 13:34 rafaroda Summary A invoice (AP creditmemo) with negative amount is posted and the form of payment is cash the cash journal line is not correct => An invoice (AP creditmemo) with negative amount and Cash form of payment creates wrong cash journal line
2008-12-17 13:34 rafaroda Description Updated
2008-12-17 13:34 rafaroda Proposed Solution updated
2008-12-17 13:34 rafaroda Steps to Reproduce Updated
2008-12-17 13:35 rafaroda Status new => scheduled
2008-12-17 13:35 rafaroda Assigned To rafaroda => eduardo_Argal
2008-12-17 13:35 rafaroda fix_in_branch => trunk
2008-12-17 13:57 psarobe fix_in_branch trunk =>
2008-12-17 13:57 psarobe Proposed Solution updated
2008-12-18 17:46 svnbot Checkin
2008-12-18 17:46 svnbot Note Added: 0011542
2008-12-18 17:46 svnbot Status scheduled => resolved
2008-12-18 17:46 svnbot Resolution open => fixed
2008-12-18 17:46 svnbot svn_revision => 11388
2008-12-18 17:54 svnbot Checkin
2008-12-18 17:54 svnbot Note Added: 0011547
2008-12-18 17:54 svnbot svn_revision 11388 => 11392
2009-01-02 14:15 krishna Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker