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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032216
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2016-02-12 11:312016-03-17 10:56
ReporterpsanjuanView Statuspublic 
Assigned Tovmromanos 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revision5435ecfe6c1f
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032216: An error is shown in the Cash VAT tab in the case of decreasing Purchase Invoice Amount created from a prepaid order.

DescriptionAn error is shown in the Cash VAT tab in the case of decreasing Purchase Invoice Amount created from a prepaid order.

Same applies to sales.
Steps To Reproduce- Register purchase order set is as Cash VAT. Add a line:
* Ordered quantity = 500
* Net unit price = 100.00
* Tax Rate = "Adquisiciones IVA 21% IVA de Caja".
- Book the order.
- Register payment out for the total gross amount of the order, that is Total Gross Amount = 60.500
- Create a purchase invoice from the order
- Go to lines tab and change the Invoiced Quantity from 500 to 400, Complete the invoice.
- Total Gross Amount is now 48.400, Total Net Amount = 40.000
- Check that Payment complete remains as YES
- Check that Prepayment Amount remains as 60.500
- Go to the Cash VAT tab and check that an error is show:
Error
More than one row with the given identifier was found: C345048D563045C0B6A6421D5CA11DA2, for class: InvoiceTaxCashVAT_V_ComputedColumns


Proposed SolutionNo error should be shown.

Cash VAT tab should show the corresponding percentage.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00321003.0PR16Q2 closedvmromanos Error when processing CashVAT invoice that has been previously reactivated 
causes defect 0033620 closeddmiguelez Performance problems in Postgresql 9.3 when invoking view from query 

-  Notes
(0084155)
psanjuan (manager)
2016-02-12 13:37
edited on: 2016-02-16 10:26

Test Plan I
- Register purchase order set is as Cash VAT. Add a line:
* Ordered quantity = 500
* Net unit price = 100.00
* Tax Rate = "Adquisiciones IVA 21% IVA de Caja".
- Book the order.
- Register payment out for the total gross amount of the order, that is Total Gross Amount = 60.500
- Create a purchase invoice from the order
- Go to lines tab and change the Invoiced Quantity from 500 to 400, Complete the invoice.
- Total Gross Amount is now 48.400, Total Net Amount = 40.000
- Check that Payment complete remains as YES
- Check that Prepayment Amount remains as 60.500
- Go to the Cash VAT tab and check below data:
Percentage = 100
Tax Amount = 8.400
Taxable Amount = 40.000

- Post the invoice, verify below posting:
40.000 (60000) compra mercaderias DEBIT
8.400 (47200) HP IVA soportado DEBIT
48.400 (407000) Anticipo a Proveedores CREDIT


Repeat same scenario for Sales.

Test Plan II
- Go to purchase invoice window and create a new one. By using the option "Create Lines From" select the order created in test plan I above. Check that there are 100 units remaining to be invoice.
- Select 100 units and complete the invoice.
- Check that Prepayment Amount remains as 60.500
- Go to the Cash VAT tab and check below data:
Percentage = 100
Tax Amount = 2.100
Taxable Amount = 12.100

- Post the invoice, verify below posting:
10.000 (60000) compra mercaderias DEBIT
2.100 (47200) HP IVA soportado DEBIT
12.100(407000) Anticipo a Proveedores CREDIT


Repeat same scenario as above, but in the second invoice change the "Invoiced Quantity" from 100 units to 50 units and complete the invoice. Check Cash VAT tab and make sure that Cash VAT info is properly shown in there.


Repeat same scenario for Sales.

(0084231)
psanjuan (manager)
2016-02-16 10:27

Test plan above verified and working.

Issue can be code reviewed and closed.
(0084245)
hgbot (developer)
2016-02-16 13:09

Repository: erp/devel/pi
Changeset: 5435ecfe6c1f4f7100784a9f3bc74c23062584fd
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Feb 12 15:13:04 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5435ecfe6c1f4f7100784a9f3bc74c23062584fd [^]

Fixed bug 32216: Cash VAT tab with prepaid invoice

The C_INVOICETAX_CASHVAT_V view, which populates the Sales/Purchase Invoice | Cash VAT tab, has been rewritten to properly manage the scenarios of prepaid invoices where the invoice amount is lower than the original order, either because of a partial invoice or because of a cheaper invoice.

The view has been split in 2 queries merged with an union all to improve the performance:
1. The first one searches the Cash VAT records linked to a payment. In this part we only filter by the records linked to the invoice's FPS, which fixes the scenarios raised by the issue.
2. The second one searches the Cash VAT records linked to a manual cash vat settlement. In this part there is no need to join with the payment tables, so the global performance is better.

---
M src-db/database/model/views/C_INVOICETAX_CASHVAT_V.xml
---
(0084247)
aferraz (manager)
2016-02-16 13:10

Code review OK
(0085143)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-02-12 11:31 psanjuan New Issue
2016-02-12 11:31 psanjuan Assigned To => Triage Finance
2016-02-12 11:31 psanjuan Modules => Core
2016-02-12 11:31 psanjuan Triggers an Emergency Pack => No
2016-02-12 11:31 psanjuan Steps to Reproduce Updated View Revisions
2016-02-12 12:14 psanjuan Description Updated View Revisions
2016-02-12 13:37 psanjuan Note Added: 0084155
2016-02-12 13:43 psanjuan Note Edited: 0084155 View Revisions
2016-02-12 13:43 psanjuan Note Edited: 0084155 View Revisions
2016-02-12 13:49 psanjuan Note Edited: 0084155 View Revisions
2016-02-12 13:51 psanjuan Note Edited: 0084155 View Revisions
2016-02-12 13:51 psanjuan Steps to Reproduce Updated View Revisions
2016-02-12 13:51 psanjuan Proposed Solution updated
2016-02-12 13:52 psanjuan Note Edited: 0084155 View Revisions
2016-02-12 14:08 psanjuan Relationship added related to 0032100
2016-02-15 12:28 vmromanos Status new => scheduled
2016-02-15 12:28 vmromanos Assigned To Triage Finance => vmromanos
2016-02-16 10:15 psanjuan Note Edited: 0084155 View Revisions
2016-02-16 10:26 psanjuan Note Edited: 0084155 View Revisions
2016-02-16 10:27 psanjuan Note Added: 0084231
2016-02-16 13:09 hgbot Checkin
2016-02-16 13:09 hgbot Note Added: 0084245
2016-02-16 13:09 hgbot Status scheduled => resolved
2016-02-16 13:09 hgbot Resolution open => fixed
2016-02-16 13:09 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5435ecfe6c1f4f7100784a9f3bc74c23062584fd [^]
2016-02-16 13:10 aferraz Review Assigned To => aferraz
2016-02-16 13:10 aferraz Note Added: 0084247
2016-02-16 13:10 aferraz Status resolved => closed
2016-02-16 13:10 aferraz Fixed in Version => 3.0PR16Q2
2016-03-17 10:56 hudsonbot Checkin
2016-03-17 10:56 hudsonbot Note Added: 0085143
2016-08-08 14:34 aferraz Relationship added causes 0033620


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker