Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035514Openbravo ERP09. Financial managementpublic2017-03-14 17:152017-03-29 15:06
maite 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q2 
aferraz
OBPS
Core
45820
No
0035514: Wrong "Product Expense" account used when posting purchase invoice referring "tax not deductible"
In case invoice has different product with different "Product Expense" account configured, accounting entry is not posting "tax not deductible" amount properly to each account
1. Create new Tax Rate for "F&B España, S.A" org, "IVA+Deductible" name, valid from today and summary level=yes
2. Create new Tax Rate for "F&B España, S.A" org, "IVA" name, valid from today, rate=20 and parent=IVA+Deductible
3. Create new Tax Rate for "F&B España, S.A" org, "Deductible" name, valid from today, rate=1, "Tax not deductible=YES" and parent=IVA+Deductible
4. Register Purchase Invoice for "España" org, "Bebidas alegres" BP.
Add line for product "Cerveza Ale 0,5L" set price=100 and tax=IVA+Deductible
Add line for product "Cerveza Lager 0,5L" set price=100 and tax=IVA+Deductible
Process invoice
5. Navigate to "Cerveza Ale 0,5L" and modify Accounting tab of "F&B España, S.A. US/A/Euro" to set "Product Expense" account to "56000 - Fianzas recibidas a corto plazo" (or any different from 60000 - Compras de mercaderías)
6. Post Purchase Invoice. Access Accounting tab, filter by "F&B España, S.A. US/A/Euro" general ledger and realize that deductible amount of 2eur has been posted to one of the product's "Product Expense" account (when expected behaviour is to have both Product Expense accounts affected, each one with 1eur amount)
No tags attached.
Issue History
2017-03-14 17:15maiteNew Issue
2017-03-14 17:15maiteAssigned To => Triage Finance
2017-03-14 17:15maiteOBNetwork customer => Yes
2017-03-14 17:15maiteModules => Core
2017-03-14 17:15maiteSupport ticket => 45820
2017-03-14 17:15maiteResolution time => 1491256800
2017-03-14 17:15maiteTriggers an Emergency Pack => No
2017-03-14 17:16maiteIssue Monitored: networkb
2017-03-14 18:26markmm82Assigned ToTriage Finance => luisrs8608
2017-03-20 17:28collazoandy4Assigned Toluisrs8608 => collazoandy4
2017-03-20 17:29collazoandy4Statusnew => scheduled
2017-03-22 22:09collazoandy4Note Added: 0095519
2017-03-28 11:31hgbotCheckin
2017-03-28 11:31hgbotNote Added: 0095600
2017-03-28 11:31hgbotStatusscheduled => resolved
2017-03-28 11:31hgbotResolutionopen => fixed
2017-03-28 11:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c6ab374457d88933377393d920cad2d8485dd808 [^]
2017-03-28 11:31hgbotCheckin
2017-03-28 11:31hgbotNote Added: 0095601
2017-03-28 11:34aferrazReview Assigned To => aferraz
2017-03-28 11:34aferrazNote Added: 0095602
2017-03-28 11:34aferrazStatusresolved => closed
2017-03-28 11:34aferrazFixed in Version => 3.0PR17Q2
2017-03-29 15:06hudsonbotCheckin
2017-03-29 15:06hudsonbotNote Added: 0095650
2017-03-29 15:06hudsonbotCheckin
2017-03-29 15:06hudsonbotNote Added: 0095651

Notes
(0095519)
collazoandy4   
2017-03-22 22:09   
As F&B International Group
 Create new Tax Rate:
   Organization: F&B España, S.A
   Name: IVA+Deductible
   Valid from: Today
   Summary level: yes
 Create new Tax Rate:
   Organization: F&B España, S.A
   Name: IVA
   Valid from: Today
   Rate: 20
   Parent Tax Rate: IVA+Deductible
 Create new Tax Rate:
   Organization: F&B España, S.A
   Name: Deductible
   Valid from: Today
   Rate: 1
   Parent Tax Rate: IVA+Deductible
   Tax Not Deductible: Yes
 Create a Purchase Invoice:
   Organization: F&B España, S.A
   Add a line:
     Product: Cerveza Ale 0,5L
     Price: 100
     Tax: IVA+Deductible
   Add a line:
     Product: Cerveza Lager 0,5L
     Price: 100
     Tax: IVA+Deductible
   Process invoice
 Go to Product window and edit Cerveza Ale 0,5L record
   In the Accounting tab of F&B España, S.A. US/A/Euro set Product Expense account to 56000 - Fianzas recibidas a corto plazo
 Post the created invoice
 Check that the accounts 56000 - Fianzas recibidas a corto plazo and 60000 - Compras de mercaderías is used with an amount of 1
(0095600)
hgbot   
2017-03-28 11:31   
Repository: erp/devel/pi
Changeset: c6ab374457d88933377393d920cad2d8485dd808
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Mar 22 17:30:36 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/c6ab374457d88933377393d920cad2d8485dd808 [^]

Fixes issue 35514: Wrong Product Expense account used with tax not deductible

When posting a Purchase Invoice with lines that contains a not deductible tax
the query to get the tax amount by lines was failing, also in the facacct create
lines process always was get the first one ignoring the product account

Now the amount its get from the invoicelinetax and a new method was created to
get the product accounts in the purchase invoice filtered by the product_id

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocLineInvoice_data.xsql
---
(0095601)
hgbot   
2017-03-28 11:31   
Repository: erp/devel/pi
Changeset: aceca41e08a189758d8eba6244b3c88f3b3607af
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Mar 28 11:21:34 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/aceca41e08a189758d8eba6244b3c88f3b3607af [^]

Related to issue 35514: Code review improvements

Remove duplicated DocInvoiceData.selectProductAcct method making productId parameter optional.
Update copyrights.

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocLineInvoice_data.xsql
---
(0095602)
aferraz   
2017-03-28 11:34   
Code review + Testing OK
(0095650)
hudsonbot   
2017-03-29 15:06   
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/f901bb68d428 [^]
Maturity status: Test
(0095651)
hudsonbot   
2017-03-29 15:06   
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/f901bb68d428 [^]
Maturity status: Test