Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038001Openbravo ERP09. Financial managementpublic2018-02-26 14:012018-03-13 17:23
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0038001: Tax Payment process is not filtering the GL Item account by General Ledger when creating the GL Journal
Tax Payment process is not filtering the GL Item account by General Ledger when creating the GL Journal, it takes the one with highest identifier
As group admin role:
   Go to G/L Item window and select International funds transfer (defined at *)
   Set the following values in Accounting tab:
      General Ledger: F&B International Group US/A/US Dollar
      Glitem debit acct: 1110 - Checking Account
      Glitem credit acct: 1110 - Checking Account

      General Ledger: F&B España, S.A. US/A/Euro
      Glitem debit acct: 10000 - Capital social
      Glitem credit acct: 10000 - Capital social

   Check through database that 1110 - Checking Account has a higher identifier than 10000 - Capital social

   Create the following Tax Register Type:
      Organization: F&B España, S.A
      G/L Item: International funds transfer
      Sales Transaction: N
   Add a line:
      Tax: Adquisiciones IVA 21% - IVA Normal
      Document Type: AP Invoice

   Create another Tax Register Type:
      Organization: F&B España, S.A
      G/L Item: International funds transfer
      Sales Transaction: Y
   Add a line:
      Tax: Entregas IVA 21% - IVA Normal
      Document Type: AR Invoice

   Create a Tax Payment:
      Organization: F&B España, S.A
      Business Partner: Bebidas Alegres, S.L.
      General Ledger: F&B España, S.A. US/A/Euro
      Starting date: 01-01-2017
      Ending date: 31-12-2017
      Generate Payment: Y
   Create Vat Registers
   Process it

   Navigate to the Journal Entry and check although G/L Journal header shows F&B España, S.A. US/A/Euro general ledger an account combination from a different general ledger is used in lines (1110 - Checking Account)
Review the following query in c_taxpayment_post database function:

      select case when tt.issotrx='Y' then max(glitem_credit_acct) else max(glitem_debit_acct) end, max(tt.c_glitem_id)
      into v_glitem_acct, v_glitem_id
      from c_taxregister_type tt
      inner join c_glitem_acct gia on gia.c_glitem_id=tt.c_glitem_id
      where tt.isactive='Y' and gia.isactive='Y' and tt.issotrx= case when v_totalcredit - v_totaldebit > 0 then 'N' else 'Y' end
      group by tt.issotrx;
No tags attached.
Issue History
2018-02-26 14:01ngarciaNew Issue
2018-02-26 14:01ngarciaAssigned To => Triage Finance
2018-02-26 14:01ngarciaModules => Core
2018-02-26 14:01ngarciaResolution time => 1521414000
2018-02-26 14:01ngarciaTriggers an Emergency Pack => No
2018-02-26 14:01ngarciaIssue Monitored: networkb
2018-03-02 14:08dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2018-03-08 21:51AtulOpenbravoStatusnew => scheduled
2018-03-08 21:51AtulOpenbravoNote Added: 0103104
2018-03-08 21:51AtulOpenbravoNote Edited: 0103104bug_revision_view_page.php?bugnote_id=0103104#r16821
2018-03-09 12:01hgbotCheckin
2018-03-09 12:01hgbotNote Added: 0103131
2018-03-09 12:01hgbotStatusscheduled => resolved
2018-03-09 12:01hgbotResolutionopen => fixed
2018-03-09 12:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/024449fcae93290bc0d2ccb8a431daec82a9c83a [^]
2018-03-09 12:02dmiguelezReview Assigned To => dmiguelez
2018-03-09 12:02dmiguelezNote Added: 0103132
2018-03-09 12:02dmiguelezStatusresolved => closed
2018-03-09 12:02dmiguelezFixed in Version => 3.0PR18Q2
2018-03-13 17:23hudsonbotCheckin
2018-03-13 17:23hudsonbotNote Added: 0103208

Notes
(0103104)
AtulOpenbravo   
2018-03-08 21:51   
Test Plan

- Login as F&B International Group Admin role.
- Go to G/L Item window and select International funds transfer (defined at *)
   Set the following values in Accounting tab:
      General Ledger: F&B International Group US/A/US Dollar
      Glitem debit acct: 1110 - Checking Account
      Glitem credit acct: 1110 - Checking Account

      General Ledger: F&B España, S.A. US/A/Euro
      Glitem debit acct: 10000 - Capital social
      Glitem credit acct: 10000 - Capital social

- Check through database that 1110 - Checking Account has a higher identifier than 10000 - Capital social

- Create the following Tax Register Type:
      Organization: F&B España, S.A
      G/L Item: International funds transfer
      Sales Transaction: N
   Add a line:
      Tax: Adquisiciones IVA 21% - IVA Normal
      Document Type: AP Invoice

- Create another Tax Register Type:
      Organization: F&B España, S.A
      G/L Item: International funds transfer
      Sales Transaction: Y
   Add a line:
      Tax: Entregas IVA 21% - IVA Normal
      Document Type: AR Invoice

- Create a Tax Payment:
      Organization: F&B España, S.A
      Business Partner: Bebidas Alegres, S.L.
      General Ledger: F&B España, S.A. US/A/Euro
      Starting date: 01-01-2017
      Ending date: 31-12-2017
      Generate Payment: Y
- Run Create Vat Registers button process
- Process it

- Navigate to the Journal Entry and check G/L Journal header shows F&B España, S.A. US/A/Euro general ledger an account combination from same General Ledger Configuration is being used in lines i.e 10000 - Capital social.

(0103131)
hgbot   
2018-03-09 12:01   
Repository: erp/devel/pi
Changeset: 024449fcae93290bc0d2ccb8a431daec82a9c83a
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Mar 09 02:23:55 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/024449fcae93290bc0d2ccb8a431daec82a9c83a [^]

Fixes Issue 38001: Tax Payment process is not filtering the GL Item
account by General Ledger when creating the GL Journal

** Added General Ledger from Tax Payment in where condition to pick
account element value id associated with the GL Item

---
M src-db/database/model/functions/C_TAXPAYMENT_POST.xml
---
(0103132)
dmiguelez   
2018-03-09 12:02   
Code Review + Testing Ok
(0103208)
hudsonbot   
2018-03-13 17:23   
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/1d3ccc92fab6 [^]
Maturity status: Test