Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0019638 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] 09. Financial management | major | always | 2012-02-02 14:02 | 2012-03-02 15:34 | |||
| Reporter | dalsasua | View Status | public | |||||
| Assigned To | eduardo_Argal | |||||||
| Priority | immediate | Resolution | fixed | Fixed in Version | pi | |||
| Status | closed | Fix in branch | pi | Fixed in SCM revision | cdb3da352133 | |||
| Projection | none | ETA | none | Target Version | 3.0MP9 | |||
| OS | Linux 32 bit | Database | Oracle | Java version | 1.6.0_21 | |||
| OS Version | Ubuntu 10.10 | Database version | 11.2.0 SE | Ant version | 1.8.0 | |||
| Product Version | pi | SCM revision | 9e5c205aa931 | |||||
| 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 | 0019638: Prepaid account must exists to post an invoice, even if it hasn't got any prepayment | |||||||
| Description | Prepaid account must exists to post an invoice, even if it hasn't got any prepayment | |||||||
| Steps To Reproduce | Create a BP. In accounting tab unselect any prepayment account. Create an invoice with some lines. Process and post. Posting will not take place, and this message will be shown: Error Account Not Defined For: Vendor Prepayment || Owner: XX || Accounting Schema: XX | |||||||
| Proposed Solution | diff -r f757e34def52 src/org/openbravo/erpCommon/ad_forms/DocInvoice.java --- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java Thu Feb 02 13:04:52 2012 +0100 +++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java Thu Feb 02 13:37:50 2012 +0100 @@ -305,7 +305,8 @@ fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, true, false, conn), this.C_Currency_ID, m_payments[i].Amount, "", Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn); - if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID)) { + if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID) + && new BigDecimal(m_payments[i].PrepaidAmount).compareTo(ZERO) != 0) { fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, true, true, conn), this.C_Currency_ID, m_payments[i].PrepaidAmount, "", Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn); @@ -406,7 +407,8 @@ nextSeqNo(SeqNo), DocumentType, conn); // Pre-payment: Probably not needed as at this point we can not generate pre-payments // against ARC. Amount is negated - if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID)) { + if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID) + && new BigDecimal(m_payments[i].PrepaidAmount).compareTo(ZERO) != 0) { fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, true, true, conn), this.C_Currency_ID, "", prepaidAmount.negate().toString(), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn); @@ -493,7 +495,8 @@ fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, false, false, conn), this.C_Currency_ID, "", m_payments[i].Amount, Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn); - if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID)) { + if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID) + && new BigDecimal(m_payments[i].PrepaidAmount).compareTo(ZERO) != 0) { fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, false, true, conn), this.C_Currency_ID, "", m_payments[i].PrepaidAmount, Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, @@ -597,7 +600,8 @@ nextSeqNo(SeqNo), DocumentType, conn); // Pre-payment: Probably not needed as at this point we can not generate pre-payments // against APC. Amount is negated - if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID)) { + if (m_payments[i].C_Currency_ID_From.equals(as.m_C_Currency_ID) + && new BigDecimal(m_payments[i].PrepaidAmount).compareTo(ZERO) != 0) { fact.createLine(m_payments[i], getAccountBPartner(C_BPartner_ID, as, false, true, conn), this.C_Currency_ID, prepaidAmount.negate().toString(), "", Fact_Acct_Group_ID, nextSeqNo(SeqNo), | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
|||||||||
|
|||||||||
Notes |
|
|
(0044811) hgbot (developer) 2012-02-02 14:20 |
Repository: erp/devel/pi Changeset: cdb3da3521330cbfd5e9c8f164f536e9807e2420 Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com> Date: Thu Feb 02 14:19:18 2012 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/cdb3da3521330cbfd5e9c8f164f536e9807e2420 [^] Fixes bug 19638: Prepaid account must exists to post an invoice, even if it hasn't got any prepayment --- M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java --- |
|
(0044869) psarobe (viewer) 2012-02-03 16:49 |
Test: Remove the prepayment account for hoteles buenas noches create an invoice and complete it post the document I was able to post it without any problems |
|
(0045733) hudsonbot (viewer) 2012-03-02 15:34 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/544d64e0c159 [^] Maturity status: Test |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-02-02 14:02 | dalsasua | New Issue | |
| 2012-02-02 14:02 | dalsasua | Assigned To | => eduardo_Argal |
| 2012-02-02 14:02 | dalsasua | Modules | => Core |
| 2012-02-02 14:02 | dalsasua | OBNetwork customer | => No |
| 2012-02-02 14:09 | dalsasua | Relationship added | related to 0019639 |
| 2012-02-02 14:18 | eduardo_Argal | Status | new => scheduled |
| 2012-02-02 14:18 | eduardo_Argal | fix_in_branch | => pi |
| 2012-02-02 14:20 | hgbot | Checkin | |
| 2012-02-02 14:20 | hgbot | Note Added: 0044811 | |
| 2012-02-02 14:20 | hgbot | Status | scheduled => resolved |
| 2012-02-02 14:20 | hgbot | Resolution | open => fixed |
| 2012-02-02 14:20 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/cdb3da3521330cbfd5e9c8f164f536e9807e2420 [^] |
| 2012-02-03 16:49 | psarobe | Note Added: 0044869 | |
| 2012-02-03 16:49 | psarobe | Status | resolved => closed |
| 2012-02-03 16:49 | psarobe | Fixed in Version | => pi |
| 2012-03-02 15:34 | hudsonbot | Checkin | |
| 2012-03-02 15:34 | hudsonbot | Note Added: 0045733 | |
| Copyright © 2000 - 2009 MantisBT Group |