Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013314Openbravo ERP09. Financial managementpublic2010-05-13 12:382010-08-30 18:42
networkb 
sathiyan 
highminoralways
closedfixed 
5
2.50MP14 
2.50MP20 
Core
No
0013314: Error when posting an invoice with negative line amount
When creating an invoice which has a line with negative line amount and other with positive line amounts, and all of them have same Product Revenue account. Accounting entry generated group positive quantities but not negative quantity.
1. Sales Management || Transactions || Sales Invoice || Header: create record for any BP
2. Sales Management || Transactions || Sales Invoice || Header >> Lines:
   * add one line of boots with positive Net Unit Price
   * add one line of hat with positive Net Unit Price
   * add one line of beer with negative Net Unit Price
3. Complete and Post invoice
4. Realize that accounting entry has grouped positive quantities but not negative one
No tags attached.
related to defect 00142342.50MP22 closed sathiyan Grouping in Journal is not correct. 
png screen1_negatives_In_different_group.png (189,745) 2010-06-24 08:33
https://issues.openbravo.com/file_download.php?file_id=2709&type=bug
png

png screen2_lines_grid.png (196,494) 2010-06-24 08:33
https://issues.openbravo.com/file_download.php?file_id=2710&type=bug
png

png screen3_allow_negative_entries_off.png (188,524) 2010-06-24 08:34
https://issues.openbravo.com/file_download.php?file_id=2711&type=bug
png
Issue History
2010-05-13 12:38networkbNew Issue
2010-05-13 12:38networkbAssigned To => dalsasua
2010-05-13 15:53psarobeNote Added: 0027204
2010-05-13 15:53psarobeStatusnew => feedback
2010-05-13 16:14networkbNote Added: 0027206
2010-05-13 16:14networkbStatusfeedback => new
2010-05-13 16:22adrianromeroStatusnew => scheduled
2010-05-13 16:22adrianromerofix_in_branch => pi
2010-05-18 19:16networkbTarget Version2.50MP19 => 2.50MP20
2010-05-18 19:16networkbfix_in_branchpi =>
2010-06-24 07:59sathiyanAssigned Todalsasua => sathiyan
2010-06-24 08:31sathiyanNote Added: 0028723
2010-06-24 08:33sathiyanFile Added: screen1_negatives_In_different_group.png
2010-06-24 08:33sathiyanFile Added: screen2_lines_grid.png
2010-06-24 08:34sathiyanFile Added: screen3_allow_negative_entries_off.png
2010-06-24 08:40sathiyanNote Added: 0028724
2010-06-24 08:41sathiyanStatusscheduled => feedback
2010-06-24 14:01sathiyanStatusfeedback => scheduled
2010-06-24 14:01sathiyanfix_in_branch => pi
2010-06-24 15:56dalsasuaNote Added: 0028746
2010-06-25 14:41hgbotCheckin
2010-06-25 14:41hgbotNote Added: 0028779
2010-06-25 14:41hgbotStatusscheduled => resolved
2010-06-25 14:41hgbotResolutionopen => fixed
2010-06-25 14:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f094e3983471b19291f5868591825f6a31140007 [^]
2010-06-30 12:17hudsonbotCheckin
2010-06-30 12:17hudsonbotNote Added: 0028911
2010-07-16 13:49sureshbabuNote Added: 0029364
2010-07-16 13:49sureshbabuStatusresolved => closed
2010-07-17 00:00anonymoussf_bug_id0 => 3030766
2010-08-25 10:27dalsasuaRelationship addedrelated to 0014234
2010-08-30 18:42dalsasuaNote Added: 0030480

Notes
(0027204)
psarobe   
2010-05-13 15:53   
Have you tried with negative quantity instead of negative price?

It makes no sense to enter negative prices
(0027206)
networkb   
2010-05-13 16:14   
Yes, same behavior with negative quantity instead of negative price.
(0028723)
sathiyan   
2010-06-24 08:31   
I have attached screen shots there posting entries are grouped based on negatives and positives. It should be on same account(product revenue) only. If we want entries in different type(negatives as debit), we have to un-select(check off) the flag of allow negative entries(Financial Management || Accounting || Setup || Accounting Schema || Accounting Schema) and need to submit. It is behave as expected.
(0028724)
sathiyan   
2010-06-24 08:40   
Additional notes below:
If business user want entries to be posted on different account altogether, it should be done through different document type only.

For instance, ARI(AR Invoice is subject to posted on 70000 (account id) only always(whether it is positive -credit side or not - debit side). They want to post it on different account id, they have to configure new document type and need to configure account id for that.
(0028746)
dalsasua   
2010-06-24 15:56   
Now it's clear for the developer what the issue consists of.
(0028779)
hgbot   
2010-06-25 14:41   
Repository: erp/devel/pi
Changeset: f094e3983471b19291f5868591825f6a31140007
Author: Sathiyan Sivaprakasam <sathiyan.sivaprakasam <at> openbravo.com>
Date: Fri Jun 25 18:10:20 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/f094e3983471b19291f5868591825f6a31140007 [^]

Fixes Issue 13314: Error when posting an invoice with negative line amount/quantity.

---
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal_data.xsql
---
(0028911)
hudsonbot   
2010-06-30 12:17   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/f094e3983471 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/0670375d782d [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17726.obx [^]
(0029364)
sureshbabu   
2010-07-16 13:49   
Verified, right now system behaves when we post an invoice with below line amt

line 1: 100 euros
line 2: -30 euros

When we post the invoice, 70 euros will be posted in
Dr customer account 70 euros
Cr Product account 70 euros
(0030480)
dalsasua   
2010-08-30 18:42   
Fix to 0014234 restores previous behavior of the report. If user wants this grouping to happen, must un-flag the "Allow negatives" check.