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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029703
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Remittancemajoralways2015-04-27 13:012015-06-11 18:02
ReporterumartirenaView Statuspublic 
Assigned Tovmromanos 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision5b1a9f61c1fa
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Toumartirena
Regression introduced in release
Summary

0029703: Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price

DescriptionCash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price
Steps To ReproduceConfigure F&B España as Cash VAT organization and make sure you do have applied Spanish Cash VAT tax rates.

Create a new business partner in F&B España.

Create a sales order for that BP for a quatity amount = 1 and price = 5.
Book the order.

Create a sales invoice for that BP by using "Create Lines from" feature. Select the order and change the price = 4.

Complete and post the invoice.

Temporary VAT posted is 0.84

Add a payment for that invoice for a later date.

Post the payment and realize that the Temporary VAT moved to Final VAT account is not 0.84 but 1.05 that is the corresponding amount of the Sales order price 5


Same applies in case of making opposite scenario that is a sales order with a price of 5 and a sales invoice with a price of 6. It always takes into account the VAT of the order and that should not be the case as it should be invoice VAT.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0029475 closedAtulOpenbravo Openbravo ERP Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price 

-  Notes
(0077341)
vmromanos (manager)
2015-05-12 16:05

Install remittance module
Apply remittance dataset to *
Go to financial account, select "Cuenta de banco", go to payment method and add "Remittance"
Create a Cash VAT tax rates (or apply Spanish cash vat taxes module).
Specify the cash vat accounts at Tax Rate | Accounting tab

Test plan I:

1. Create a sales order.
BP = Restaurantes luna llena
Invoice terms = Immediate
2. Create a line:
Qty= 1
Price = 5
Tax Rate = 21% Cash VAT
3. Complete it
4. Go to sales invoice and create a new record:
BP = Restaurantes luna llena
Payment method = Remittance
5. Press Create lines from and select previous order
6. Go to lines and change the price from 5 to 4
7. Complete and post. Verify tax amount is moved to temporal account
8. Go to remittance and create a new record:
Remittance type = Printable Remittance
Transaction Date = Expected date = 2 month after the invoice date
Financial account = Cuenta de banco
9. Add the invoice previously created. 2 lines will be added
10. Process the remittance and select group by invoice
11. Verify 1 bank instruction is created as a merge of both lines
12. Go to Settle/Protest window. Search for the previous remittance
13. Select it, set any accounting date and Settle it
14. Go back to remittance window, search for the previous remittance and go to Settled tab
15. Post the line. Verify the tax amount is moved from the temporal account to the final tax account


Test plan II:
1. Repeat steps of the Test Plan I from 1 to 7
2. Create a new invoice:
BP = Restaurantes luna llena
Payment method = Remittance
3. Enter any line for any cash vat tax rate
4. Complete and post. Verify tax amount is moved to temporal account
5. Go to remittance and create a new record:
Remittance type = Printable Remittance
Transaction Date = Expected date = 2 month after the invoice date
Financial account = Cuenta de banco
6. Add the 2 invoices previously created. 3 lines will be added
7. Process the remittance and select group by business partner
8. Verify 1 bank instruction is created as a merge of the lines
9. Go to Settle/Protest window. Search for the previous remittance
10. Select it, set any accounting date and Settle it
11. Go back to remittance window, search for the previous remittance and go to Settled tab
12. Post the line. Verify the tax amount is moved from the temporal account to the final tax account


Test plan III:
1. Repeat steps of the Test Plan I from 1 to 9
2. Process the remittance. Do not group
3. Verify the remittance has 2 bank instructions lines
4. Go to Settle/Protest window. Search for the previous remittance
5. Select the 2 lines, set any accounting date and Settle it
6. Go back to remittance window, search for the previous remittance and go to Settled tab
7. Post the lines. Verify the tax amount is moved from the temporal account to the final tax account
(0077356)
hgbot (developer)
2015-05-12 20:00

Repository: erp/mods/org.openbravo.module.remittance
Changeset: 5b1a9f61c1faa9ed00e51a6a37e0e58a7a6ff1b4
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue May 12 15:43:51 2015 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/5b1a9f61c1faa9ed00e51a6a37e0e58a7a6ff1b4 [^]

Fixed bug 29703: Cash VAT post incorrect when invoice's price is lower than linked order

When the invoice's price is lower than the linked order's price, the system creates 2 payment details: the first one to pay the order, and another one with the difference.
In the remittance window, when you select the invoice, the system adds the 2 payment details. When processing the remittance, if any grouping is selected (by invoice, by business partner, etc.), both payment details are merged into a single one.
Later on, when the settle remittance is posted, the Cash VAT logic for posting remittance wasn't aware of the merge, creating a wrong posting.

The solution is based on the API created for issue 0029475, where the merged payment detail is pased to the cash vat accounting engine, creating the right posting.
The dependency to APRM module (aka Core) has been increased to use this API.

---
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
M src/org/openbravo/module/remittance/ad_forms/DocREMRemittanceCancel.java
---
(0077357)
umartirena (reporter)
2015-05-12 20:02

Code Review + Testing OK

- Issue History
Date Modified Username Field Change
2015-04-27 13:01 umartirena New Issue
2015-04-27 13:01 umartirena Assigned To => vmromanos
2015-04-27 13:02 umartirena Relationship added depends on 0029475
2015-05-12 13:34 vmromanos Status new => scheduled
2015-05-12 16:05 vmromanos Note Added: 0077341
2015-05-12 20:00 hgbot Checkin
2015-05-12 20:00 hgbot Note Added: 0077356
2015-05-12 20:00 hgbot Status scheduled => resolved
2015-05-12 20:00 hgbot Resolution open => fixed
2015-05-12 20:00 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/5b1a9f61c1faa9ed00e51a6a37e0e58a7a6ff1b4 [^]
2015-05-12 20:02 umartirena Review Assigned To => umartirena
2015-05-12 20:02 umartirena Note Added: 0077357
2015-05-12 20:02 umartirena Status resolved => closed
2015-06-11 18:02 ngarcia Issue Monitored: ngarcia


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker