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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0019638
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2012-02-02 14:022012-03-02 15:34
ReporterdalsasuaView Statuspublic 
Assigned Toeduardo_Argal 
PriorityimmediateResolutionfixedFixed in Versionpi
StatusclosedFix in branchpiFixed in SCM revisioncdb3da352133
ProjectionnoneETAnoneTarget Version3.0MP9
OSLinux 32 bitDatabaseOracleJava version1.6.0_21
OS VersionUbuntu 10.10Database version11.2.0 SEAnt version1.8.0
Product VersionpiSCM revision9e5c205aa931 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0019638: Prepaid account must exists to post an invoice, even if it hasn't got any prepayment

DescriptionPrepaid account must exists to post an invoice, even if it hasn't got any prepayment
Steps To ReproduceCreate 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 Solutiondiff -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),
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0019639 closedjonalegriaesarte Localization Pack: Spain Pre-payment account is required not in the ERP 

-  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 (manager)
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 (developer)
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: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
Powered by Mantis Bugtracker