Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||
| View Issue Details | |||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0019638 | Openbravo ERP | 09. Financial management | public | 2012-02-02 14:02 | 2012-03-02 15:34 | ||||||||
| Reporter | dalsasua | ||||||||||||
| Assigned To | eduardo_Argal | ||||||||||||
| Priority | immediate | Severity | major | Reproducibility | always | ||||||||
| Status | closed | Resolution | fixed | ||||||||||
| Platform | OS | 20 | OS Version | Ubuntu 10.10 | |||||||||
| Product Version | pi | ||||||||||||
| Target Version | 3.0MP9 | Fixed in Version | pi | ||||||||||
| 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), | ||||||||||||
| Additional Information | |||||||||||||
| Tags | No tags attached. | ||||||||||||
| Relationships |
| ||||||||||||
| Attached Files | |||||||||||||
| 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 | |||||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||