Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019567Openbravo ERPZ. Otherspublic2012-01-26 12:552013-02-18 17:39
maite 
dmiguelez 
highminoralways
closedfixed 
5
 
 
Advanced Payables and Receivables Mngmt
No
0019567: Not grouped Transaction accounting entry when order amount is higher than invoice amount
Not grouped Transaction accounting entry when order amount is higher than invoice amount
1. Create Purchase Order for any BP and any product with total amount 100, and a tax rate with a rate higher than 0%.
2. Create Purchase Invoice using "Create Lines From" process and selecting previous order.
3. Go to Purchase Invoice line and modify Tax to set smaller tax amount (so invoice's total amount is smaller that order's total amount): for example, an exempt tax rate.
4. Process Invoice
5. Run "Add Payment In/Out" from Invoice and pay invoice completely (selecting both lines)
6. In case the payment processing hasn't created the withdrawal, go to related Financial Account and add the transaction to the financial account.
7. Configure the payment method in the financial account to generate accounting for the withdrawals.
8. Post Transaction and realize that accounting entry lines associated to provider's account are not grouped.

Problem is that one amount is positive and other negative, and ReportGeneralLedgerJournal_data.xsql does not group this case.

[If you follow same steps but with invoice's amount higher than order's amount, accounting entry lines associated to provider's account are grouped.]

NOTE: Same behaviour experienced in Payment's accounting
A first idea for the fix is to modify in ReportGeneralLedgerJournal_data.xsql file, the four GROUP BY statements like this one:
(CASE F.AMTACCTDR WHEN 0 THEN (CASE SIGN(F.AMTACCTCR) WHEN -1 THEN 1 ELSE 2 END) ELSE (CASE SIGN(F.AMTACCTDR) WHEN -1 THEN 3 ELSE 4 END) END)
must be modified to just generate 2 different values (no four): positive debit and negative credit will generate one value; negative debit and positive credit the other value.

As mentioned: it's, in principle, a simple change. Nevertheless, given that the report is used in several ways, and from different places of the ERP; and given that it's a quite critical piece of the financial management area of the ERP, IMHO, it must go to a risky release.
No tags attached.
related to defect 0024990 closed eduardo_Argal Modules Not grouped Remittance's accounting entry when there is a negative remittance line 
related to defect 0034432 closed collazoandy4 Openbravo ERP Accounting information should be grouped by invoice when posting payment/transaction/reconciliation 
Issue History
2012-01-26 12:55maiteNew Issue
2012-01-26 12:55maiteAssigned To => jonalegriaesarte
2012-01-26 12:55maiteModules => Advanced Payables and Receivables Mngmt
2012-01-26 12:56maiteAssigned Tojonalegriaesarte => dalsasua
2012-01-26 19:07maiteIssue Monitored: networkb
2012-02-10 08:44maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3152#r3152
2012-02-20 18:20jonalegriaesarteAssigned Todalsasua => eduardo_Argal
2012-03-02 13:53eduardo_ArgalNote Added: 0045706
2012-03-02 13:53eduardo_ArgalStatusnew => feedback
2012-03-02 13:53eduardo_ArgalAssigned Toeduardo_Argal => vmromanos
2012-03-02 13:57jonalegriaesarteNote Added: 0045708
2012-03-02 13:57jonalegriaesarteTarget Version3.0MP9 => 3.0MP10
2012-03-02 14:09jonalegriaesarteAssigned Tovmromanos => jonalegriaesarte
2012-03-02 14:11jonalegriaesarteStatusfeedback => new
2012-03-06 17:53jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-03-09 12:30dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3261#r3261
2012-03-09 12:34dalsasuaStatusnew => scheduled
2012-03-09 12:34dalsasuafix_in_branch => pi
2012-03-09 12:35dalsasuaTarget Version3.0MP10 => 3.0MP12
2012-03-09 12:35dalsasuafix_in_branchpi =>
2012-03-09 12:36dalsasuaNote Added: 0046230
2012-03-09 12:36dalsasuaNote Edited: 0046230bug_revision_view_page.php?bugnote_id=0046230#r3263
2012-03-09 12:54dalsasuaProposed Solution updated
2012-04-13 10:11jecharriAssigned Tojecharri => ioritzCia
2012-04-17 13:56jonalegriaesarteTypedefect => design defect
2012-05-30 16:15ioritzCiaTarget Version3.0MP12 =>
2012-09-13 10:42jonalegriaesarteAssigned ToioritzCia => dmiguelez
2013-01-24 12:12hgbotCheckin
2013-01-24 12:12hgbotNote Added: 0055808
2013-01-24 12:12hgbotStatusscheduled => resolved
2013-01-24 12:12hgbotResolutionopen => fixed
2013-01-24 12:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8e07931c30b939d1c8f92eba1fc28a44b2dfe5fb [^]
2013-01-24 21:41hudsonbotCheckin
2013-01-24 21:41hudsonbotNote Added: 0055828
2013-02-04 20:04hgbotCheckin
2013-02-04 20:04hgbotNote Added: 0056140
2013-02-04 20:41hgbotCheckin
2013-02-04 20:41hgbotNote Added: 0056141
2013-02-05 09:36hgbotCheckin
2013-02-05 09:36hgbotNote Added: 0056144
2013-02-05 12:16hgbotCheckin
2013-02-05 12:16hgbotNote Added: 0056156
2013-02-05 22:44hudsonbotCheckin
2013-02-05 22:44hudsonbotNote Added: 0056191
2013-02-05 22:44hudsonbotCheckin
2013-02-05 22:44hudsonbotNote Added: 0056192
2013-02-05 22:44hudsonbotCheckin
2013-02-05 22:44hudsonbotNote Added: 0056193
2013-02-05 22:44hudsonbotCheckin
2013-02-05 22:44hudsonbotNote Added: 0056195
2013-02-18 17:39maiteNote Added: 0056529
2013-02-18 17:39maiteStatusresolved => closed
2013-10-22 17:13maiteRelationship addedrelated to 0024990
2016-11-08 17:08maiteRelationship addedrelated to 0034432

Notes
(0045706)
eduardo_Argal   
2012-03-02 13:53   
When selecting allow negatives for a particular document info should be merged.
Have you tried?
(0045708)
jonalegriaesarte   
2012-03-02 13:57   
Changed to MP10 due to other priorities
(0046230)
dalsasua   
2012-03-09 12:36   
As it is a risky change, needs to be included in a risky release. Next one is MP12.

Yes, Eduardo, I tried, and it's failing :o(

(0055808)
hgbot   
2013-01-24 12:12   
Repository: erp/devel/pi
Changeset: 8e07931c30b939d1c8f92eba1fc28a44b2dfe5fb
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 24 11:04:36 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8e07931c30b939d1c8f92eba1fc28a44b2dfe5fb [^]

Fixes Issue 19567: When Posting, checks if a Payment Schedule Detail
is an adjust between an Order and an Invoice, and if so, merges it
with another line.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0055828)
hudsonbot   
2013-01-24 21:41   
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/fbbe21bdfeff [^]

Maturity status: Test
(0056140)
hgbot   
2013-02-04 20:04   
Repository: erp/devel/pi
Changeset: 8f647753ac34451577bd692a7b53c35692b3709d
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Feb 04 20:03:46 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8f647753ac34451577bd692a7b53c35692b3709d [^]

Related to Issue 0019567: Fixes problem when Posting a Reconciliataion
without Posting the Payment and the Transaction.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0056141)
hgbot   
2013-02-04 20:41   
Repository: erp/devel/pi
Changeset: 4130d55738b877f8d3b23a415fba06cb919c1a25
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Feb 04 20:40:52 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4130d55738b877f8d3b23a415fba06cb919c1a25 [^]

Related to Issue 19567: Fixes wrong set of amount.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0056144)
hgbot   
2013-02-05 09:36   
Repository: erp/devel/pi
Changeset: 9bbd07a91478244bc79f62e8e0b46d078e0bc962
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 05 09:35:36 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9bbd07a91478244bc79f62e8e0b46d078e0bc962 [^]

Related to Issue 19567: Fixes Issue with Invoices without related
Order.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0056156)
hgbot   
2013-02-05 12:16   
Repository: erp/devel/pi
Changeset: d47fbb19ff2c8934f895dd710c450bfd4f9629f2
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 05 12:16:10 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d47fbb19ff2c8934f895dd710c450bfd4f9629f2 [^]

Related to Issue 19567. Centralizes code.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0056191)
hudsonbot   
2013-02-05 22:44   
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/86db3ad54671 [^]

Maturity status: Test
(0056192)
hudsonbot   
2013-02-05 22:44   
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/86db3ad54671 [^]

Maturity status: Test
(0056193)
hudsonbot   
2013-02-05 22:44   
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/86db3ad54671 [^]

Maturity status: Test
(0056195)
hudsonbot   
2013-02-05 22:44   
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/86db3ad54671 [^]

Maturity status: Test
(0056529)
maite   
2013-02-18 17:39   
verified