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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033354
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2016-06-24 13:122016-06-28 16:06
ReporterpsanjuanView Statuspublic 
Assigned Tovmromanos 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q3
StatusclosedFix in branchFixed in SCM revisioncc5f703395d6
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2014-08-26
Regression introduced in release3.0PR14Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/35648d50070b5bde2cbd8ff287e098d98ed0044d#l1.42 [^]
Triggers an Emergency PackNo
Summary

0033354: No correct Cash VAT posting for the payment in case of more than one General Ledger assigned to the Organization.

DescriptionNo correct Cash VAT posting for the payment in case of more than one General Ledger assigned to the Organization.
Steps To ReproduceIn an environment with F&B International Group demo data, install "Cash VAT Management" module.

Once installed apply its dataset at * organization.

Go to Account Tree window and create below accounts:

For F&B España, create the accounts:
Search Key: 47200T
Name: HP IVA soportado Transitorio
Account Type: Asset

Search Key: 47700T
Name: HP IVA repercutido Transitorio
Account Type: Liability

For F&B International Group, create the accounts:
Search Key: 2260T
Name: Sales Tax Payable Transitory
Account Type: Liability

Search Key: 7410T
Name: Tax Expense Transitory
Account Type: Expense

Go to General ledger Configuration window and enter above created accounts for each General Ledger Configuration, Defaults tab:

F&B España:
Tax Due Transitory: 47700T
Tax Credit Transitory: 47200T

F&B International:
Tax Due Transitory: 2260T
Tax Credit Transitory: 7410T

Go to Tax rate window and create below two one tax rates:
(1) For F&B España:
Name = Adquisiciones IVA 21% IVA de Caja
Valid from date = 01-01-2016
Rate = 21
Purchase Tax
Cash VAT = YES
Country= Destination country = Spain.

(1) For F&B US:
Name = Purchase Tax Cash VAT
Valid from date = 01-01-2016
Rate = 21
Purchase Tax
Cash VAT = YES
Country= Destination country = United States

Go to purchase invoice and create a new one for F&B España. Bebidas Alegres BP. Set it as Cash VAT = Yes.
Enter any line. Make sure that the tax "Adquisiciones IVA 21% IVA de Caja" is shown in there.
Complete and post the invoice.

Verify postings refers a transitory VAT account:

F&B España Euro:

204.00 (6000) Compras Mercaderias - DEBIT
42.84 (47200T) HP IVA soportado Transitorio - DEBIT
264.84 (4000) Proveedores - CREDIT

F&B International Dollar:

22.36 (5360) Product Expense - DEBIT
42.84 (7410T) Tax Expense Transitory - DEBIT
269.06 (2110) Accounts Receivable - CREDIT

Add a payment for the invoice. Go to the payment and post it.

F&B España Euro:
246.84 (40000) Proveedores - DEBIT
246.84 (57200) Bancos - CREDIT

(*) this posting is not correct as it does not move Cash VAT transitory account balance to a Final Cash VAT account

F&B International Group:

269.06 (2110) Account payables - DEBIT
46.70 (7410) Tax expense - DEBIT
269.06 (1140) Bank - CREDIT
46.70 (7410T) Tax Expense Transitory - CREDIT

(*) this posting is correct.

Moreover, create a purchase invoice for F&B US, Be Soft Drinker Inc BP. Make sure it is set as Cash VAT = Yes.

Add any line. Make sure that the tax rate "Purchase Tax Cash VAT" is used.

Complete and post.

Add a payment and verify below posting for the only general ledger related to F&B US:

F&B International Group /Dollar

366.03 (2110) Account payables - DEBIT
65.53 (7410) Tax expense - DEBIT
366.03(1140) Bank - CREDIT
63.53 (7410T) Tax Expense Transitory - CREDIT

Proposed SolutionTransitory Cash VAT should take place, therefore correct payment posting looks like:
246.84 (40000) Proveedores - DEBIT
42.84 (47200) HP IVA soportado - DEBIT
246.84 (57200) Bancos - CREDIT
42.84 (47200t) HP IVA soportado transitorio - CREDIT
TagsNo tags attached.
Attached Filesdiff file icon 33354_proposed.diff [^] (1,252 bytes) 2016-06-27 11:08 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0033341 closedvmromanos Invoice prepayment accounting needs to support Cash VAT in the case of managing more than one General Ledger configuration 
depends on backport 00333613.0PR16Q2.1 closedvmromanos No correct Cash VAT posting for the payment in case of more than one General Ledger assigned to the Organization. 
depends on backport 00333623.0PR16Q1.4 closedvmromanos No correct Cash VAT posting for the payment in case of more than one General Ledger assigned to the Organization. 
caused by defect 00274603.0PR14Q4 closedAtulOpenbravo Error when posting Payment/Transaction/Reconciliation referencing several cash vat invoices 

-  Notes
(0087899)
psanjuan (manager)
2016-06-24 13:40

I think once this issue is solved, issue related 33341 will be solved.
(0087974)
psanjuan (manager)
2016-06-27 12:36
edited on: 2016-06-27 18:33

Test Plan 1

Take into account details explained above to properly setup Cash VAT.

Create a purchase invoice for F&B España, Bebidas Alegres BP, invoice date = 27/06/2016. Set is as Cash VAT = Yes.
Enter any line. Check that a Cash VAT tax rate is used.
Complete and Post the invoice.

Verify a "Transitory" tax account has been used for both general ledger (EUR and Dollar).

Add a payment of 100% of the invoice dated on 28/06/2018, for instance.
Post the payment.

Check below posting is shown.

General Ledger F&B España Euro:

822.80 (40000) Proveedores DEBIT
142.80 (47200) HP IVA soportado DEBIT
822.80 (57200) Bancos - CREIDT
142.80 (47200T) HP IVA soportado transitorio CREDIT


General Ledger F&B international Dollar:

896.85 (2110) Account Payables DEBIT
142.80 (7410) Tax Expense DEBIT
822.80 (1170) Check In-Transfer - CREIDT
142.80 (7410T) Tax Expense Transitory CREDIT


Additional test executed for F&B España, Bebidas Alegres BP, Cash VAT = Yes:

Test Plan 2.-

Partial payments of a purchase invoice (ie. 30% - 45% and 25%) dated after invoice date.

check that = every payment post include the corresponding Cash VAT amount transfer from "Transitory" to "Final Tax accounts for both General Ledgers (EUR & Dollar).

Test Plan 3.-

Invoice prepayment, payment date (27-06-2016) dated on before invoice date (30-06-2016), purchase invoice is booked and post to the ledger prior to the payment.

Check that = invoice posting uses a transitory Tax account for both GLs and check that payment posting looks like:

F&B España GL Euro

27-06-2016
1398.76 (40700) Anticipo proveedores DEBIT
242.76 (47200) HP IVA soportado DEBIT
1398.76 (57200) Bancos CREDIT
242.76 (47200T) HP IVA soportado transitorio CREDIT

30-06-2016
1398.76 (40000) Proveedores - DEBIT
1398.76 (40700) Anticipo proveedores - CREDIT

For F&B International Group Dollar

27-06-2016
1524.65 (1410) Vendor Prepayment DEBIT
264.61 (7410) Tax Expense DEBIT
1524.65 (1140) Check In-Transfer CREDIT
264.61 (7410T) Tax Expense transitory CREDIT

30-06-2016
1524.65 (2110) Account Payables - DEBIT
1524.65 (1410) Vendor Prepayment - CREDIT

Test Plan 4.-

Partial invoice prepayment, for instance 1000.00 €, payment date (27-06-2016) dated on before invoice date (30-06-2016), purchase invoice is booked and post to the ledger prior to the payment. Second payment after invoice date.

Check that = invoice posting uses a transitory Tax account for both GLs and check that first payment posting (Prepayment) looks like:

F&B España GL Euro

27-06-2016
1000.00 (40700) Anticipo proveedores DEBIT
173.55 (47200) HP IVA soportado DEBIT
1000.00 (57200) Bancos CREDIT
173.55 (47200T) HP IVA soportado transitorio CREDIT

30-06-2016
1000.00 (40000) Proveedores - DEBIT
1000.00 (40700) Anticipo proveedores - CREDIT

For F&B International Group Dollar

27-06-2016 - June exchange rate (EUR to $) = 1.09
1090.00 (1410) Vendor Prepayment DEBIT
189.17 (7410) Tax Expense DEBIT
1090.00 (1140) Check In-Transfer CREDIT
189.17 (7410T) Tax Expense transitory CREDIT

30-06-2016 - June exchange rate (EUR to $) = 1.09
1090.00 (2110) Account Payables - DEBIT
1090.00 (1410) Vendor Prepayment - CREDIT

Check that second payment posting dated after invoice date (for the rest i.e. 645.60) looks like:

F&B España GL Euro
01-08-2016
645.60 (40000) Proveedores DEBIT
112.05 (47200) HP IVA soportado DEBIT
645.60 (57200) Bancos CREDIT
112.05 (47200T) HP IVA soportado transitory CREDIT

For F&B International Group Dollar
01-08-2016 - August exchange rate (EUR to $) = 1.05

703.70 (645.60*1.09) (2110) Account Payables DEBIT
117.65 (112.05*1.05) (7410) Tax Expense DEBIT
4.48 [(112.05*1.09)- (112.05*1.05)] (8251) Bank Revaluation loss DEBIT
677.88 (645.60*1.05) (1140) Check In-Transfer CREDIT
122.13 (112.05*1.09) (7410T) Tax Expense Transitory CREDIT
25.82 [(645.60*1.09)- (645.60*1.05)] (8050) Bank Revaluation gain CREDIT

Test Plan 5.-

Total order prepayment, purchase order is paid totally, after that purchase invoice is booked and posted.

Create a purchase order set as Cash VAT = Yes. Add a payment for the total amount of the order.

Post the payment. Check that payment posting does not include any tax accounting.

Create the purchase invoice from the order. Check it is already paid.
Post the invoice. Check that invoice posting does not include any transitory tax account but final.

Test Plan 6.-

Partial order prepayment. Book a purchase order dated on June and pay it partially (ie 300.00€ from a total gross amount = 329.12; Total Net Amount = 272.00, Tax Amount =57.12 ) on June. After that create the purchase invoice from the order dated on June. Post it and pay rest of the amount dated on June.

Check that prepayment accounting looks like:

For F&B España Euro:
300.00 (40700) Anticipo proveedores - DEBIT
300.00 (57200) Bancos - CREDIT

For F&B International Group Dollar:
327.00 (1410) Vendor Prepayment - DEBIT
327.00 (1140) Check-In Transit - CREDIT
(300.00*1.09=327.00)

Check that Invoice accounting looks like:

For F&B España Euro:
272.00 (60000) Compra mercaderias - DEBIT
52.06 (47200) HP IVA soportado - DEBIT
5.06 47200T) HP IVA soportado transitorio - DEBIT
300.00 (40700) Anticipo a proveedores - DEBIT
29.12 (40000) Proveedores - CREDIT

For F&B International Group Dollar:
296.48 (5360) Product Expense- DEBIT
56.75 (7410) Tax expense - DEBIT
5.52 (7410T) Tax expense transitory- DEBIT
327.00 (40700) Anticipo a proveedores - DEBIT
31.74 (2110) Account Payables - CREDIT
0.01 (8255) Currency balancing.

Second payment posting for the rest of the amount (29.12) looks like:

For F&B España Euro:
29.12 (40000) Proveedores - DEBIT
5.06 (47200) HP IVA Soportado - DEBIT
29.12 (57200) Bancos - CREDIT
5.06 (47200T) HP IVA Soportado transitorio CREDIT

For F&B International Group Dollar:
31.74 (2110) Accounts Payables - DEBIT
5.52 (7410) Tax Expense - DEBIT
31.74 (1140) Check-In Transit - CREDIT
5.52 (7410T) Tax Expense Transitory - CREDIT

(29.12*1.09=31.74)
(5.06*1.09=5.52)

Repeat same test as above for Sales cycle and F&B US (only one general ledger related).

(0087992)
psanjuan (manager)
2016-06-27 15:38

Test Plan above verified.

Issue can be code reviewed and closed.
(0088008)
hgbot (developer)
2016-06-28 10:02

Repository: erp/devel/pi
Changeset: cc5f703395d681b92315cdc21d19642e4f549101
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Jun 27 11:57:06 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cc5f703395d681b92315cdc21d19642e4f549101 [^]

Fixed issue 33354: Cash VAT accounting with several ledgers

Comparing objects was wrongly done using equals instead of comparing by the ID.
The iteration for the first accounting schema worked fine, but the next ones were identified as other objects (although the record ID was the same).
Now the comparation is done using the ID.

---
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0088009)
aferraz (developer)
2016-06-28 10:02

Code review OK
(0088059)
hudsonbot (developer)
2016-06-28 16: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/865878a5d292 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-06-24 13:12 psanjuan New Issue
2016-06-24 13:12 psanjuan Assigned To => Triage Finance
2016-06-24 13:24 psanjuan Steps to Reproduce Updated View Revisions
2016-06-24 13:29 psanjuan Steps to Reproduce Updated View Revisions
2016-06-24 13:39 psanjuan Steps to Reproduce Updated View Revisions
2016-06-24 13:39 psanjuan Proposed Solution updated
2016-06-24 13:39 psanjuan Steps to Reproduce Updated View Revisions
2016-06-24 13:40 psanjuan Note Added: 0087899
2016-06-24 13:40 psanjuan Relationship added related to 0033341
2016-06-27 11:04 vmromanos Project Modules => Openbravo ERP
2016-06-27 11:06 vmromanos Modules => Core
2016-06-27 11:06 vmromanos Regression level => Production - Confirmed Stable
2016-06-27 11:06 vmromanos Regression date => 2014-08-26
2016-06-27 11:06 vmromanos Regression introduced in release => 3.0PR14Q4
2016-06-27 11:06 vmromanos Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/35648d50070b5bde2cbd8ff287e098d98ed0044d#l1.42 [^]
2016-06-27 11:06 vmromanos Triggers an Emergency Pack => No
2016-06-27 11:06 vmromanos Category Cash VAT Management => 09. Financial management
2016-06-27 11:08 vmromanos File Added: 33354_proposed.diff
2016-06-27 11:11 vmromanos Relationship added caused by 0027460
2016-06-27 11:51 aferraz Status new => scheduled
2016-06-27 11:51 aferraz Assigned To Triage Finance => vmromanos
2016-06-27 12:36 psanjuan Note Added: 0087974
2016-06-27 12:38 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 12:44 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 12:46 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 12:50 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 13:00 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 13:04 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 13:15 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 13:39 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 13:59 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 15:03 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 15:38 psanjuan Note Added: 0087992
2016-06-27 18:28 psanjuan Note Edited: 0087974 View Revisions
2016-06-27 18:33 psanjuan Note Edited: 0087974 View Revisions
2016-06-28 10:02 hgbot Checkin
2016-06-28 10:02 hgbot Note Added: 0088008
2016-06-28 10:02 hgbot Status scheduled => resolved
2016-06-28 10:02 hgbot Resolution open => fixed
2016-06-28 10:02 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cc5f703395d681b92315cdc21d19642e4f549101 [^]
2016-06-28 10:02 aferraz Review Assigned To => aferraz
2016-06-28 10:02 aferraz Note Added: 0088009
2016-06-28 10:02 aferraz Status resolved => closed
2016-06-28 10:02 aferraz Fixed in Version => 3.0PR16Q3
2016-06-28 16:06 hudsonbot Checkin
2016-06-28 16:06 hudsonbot Note Added: 0088059


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker