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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029475
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2015-03-31 15:362015-06-11 18:02
ReporterpsanjuanView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Versionpi
StatusclosedFix in branchFixed in SCM revision41ab0a941f50
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11.1.0.6.0Ant version1.7.0
Product VersionSCM revision 
Review Assigned Toumartirena
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029475: 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.
Proposed SolutionTemporary VAT moved to Final VAT account should be the one corresponding to the sales invoice amount/price that is 0.84

Below posting is the correct posting in case "no grouping" option is the one selected

Debit 1.05 € (4720)
Credit 0.21 € (4720)
Debit 0.21 € (4720T)
Credit 1.05 € (4720T)

As final posting should be:
Debit 0.84 € (4720)
Credit 0.84 € (4720T)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00274843.0PR14Q4 closedAtulOpenbravo Openbravo ERP Wrong cash vat lines when payment is automatically created and invoice's amount is higher that order's amount 
related to defect 0033508 closedmarkmm82 Openbravo ERP Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown 
blocks defect 0029703 closedvmromanos Modules Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price 

-  Notes
(0076342)
psanjuan (manager)
2015-04-01 19:11
edited on: 2015-04-01 19:43

Verified for both purchase/sales:
- order price same as invoice price
- order price lower than invoice price
- order price higher than invoice price
including just one order/invoice line and more than one

for payment/transaction/reconciliation posting, including remittance settle posting (single payment / no single payment/No grouping /Grouping by invoice).

All case Cash VAT moved from temporary account to final VAT account is correct.

(0076513)
hgbot (developer)
2015-04-14 11:16

Repository: erp/devel/pi
Changeset: 1251373257c76a1b9fb589f6b4139fbd23280a91
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Dec 01 15:47:20 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/1251373257c76a1b9fb589f6b4139fbd23280a91 [^]

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

Problem is with Cash Vat Posting when payment schedule detail are merged
As there are differences in Sales Order and Sales Invoice Line prices
there are two payment detail associated and only one payment detail
was being used for cash vat posting as they were merged

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
---
(0076522)
hgbot (developer)
2015-04-14 13:08

Repository: erp/devel/pi
Changeset: c05d9da39c5822978ba76ed8d5b713a3e41d03fa
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Apr 14 13:07:46 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c05d9da39c5822978ba76ed8d5b713a3e41d03fa [^]

Related to bug 29475: Backed out changeset 1251373257c7

Backed out because causes api-break.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
---
(0076756)
hgbot (developer)
2015-04-24 14:56

Repository: erp/devel/pi
Changeset: a382e7ffe1c0d5a09acdba382b8abfb6881b87cb
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 22 17:03:17 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a382e7ffe1c0d5a09acdba382b8abfb6881b87cb [^]

Related to issue 29475: Applied code format before doing any change

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
---
(0076757)
hgbot (developer)
2015-04-24 14:56

Repository: erp/devel/pi
Changeset: 41ab0a941f5032995a4dc2cdef49cbeef8bd1e7d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 22 18:09:19 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/41ab0a941f5032995a4dc2cdef49cbeef8bd1e7d [^]

Fixed bug 29475: 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 this case the accounting process for Payment/Transaction/Reconciliation merges both payment details. However the Cash VAT logic for posting wasn't aware of the merge, creating a wrong posting.

To fix it we first store the merged payment detail id done into the getPaymentDetailWriteOffAndAmount() method. In fact we have created a new getPaymentDetailWriteOffAndAmount() method that has a new parameter with the fieldProvider that represents the processed payment detail id. In this FieldProvider object we store the Merged Payment Detail Id.

The DocLineCashVATReady_PaymentTransactionReconciliation class is now able to receive more than one payment detail, and keep track of all the InvoiceTaxCashVAT_V records associated to these payment details. So we can now link several payment details into the same DocLineCashVATReady_PaymentTransactionReconciliation object, which is exactly what we need to support the extra "merged" payment detail id.

Finally, we ensure the DocLineCashVATReady_PaymentTransactionReconciliation.getInvoiceTaxCashVAT_V() now returns a list of unique InvoiceTaxCashVAT_V records, to avoid duplications in case the setInvoiceTaxCashVAT_V() method has been called several times for the same payment detail id.

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
---
(0076781)
umartirena (developer)
2015-04-27 13:00

Code Review + Testing OK
(0077123)
hudsonbot (developer)
2015-05-07 22:16

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/a1817f84bd8b [^]
Maturity status: Test
(0077125)
hudsonbot (developer)
2015-05-07 22:16

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/a1817f84bd8b [^]
Maturity status: Test
(0077155)
hudsonbot (developer)
2015-05-07 22:16

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/a1817f84bd8b [^]
Maturity status: Test
(0077156)
hudsonbot (developer)
2015-05-07 22:16

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

- Issue History
Date Modified Username Field Change
2015-03-31 15:36 psanjuan New Issue
2015-03-31 15:36 psanjuan Assigned To => Sandrahuguet
2015-03-31 15:36 psanjuan Modules => Core
2015-03-31 15:36 psanjuan Triggers an Emergency Pack => No
2015-03-31 15:36 psanjuan Relationship added related to 0027484
2015-03-31 15:43 psanjuan Steps to Reproduce Updated View Revisions
2015-04-01 19:11 psanjuan Note Added: 0076342
2015-04-01 19:11 psanjuan Note Edited: 0076342 View Revisions
2015-04-01 19:43 psanjuan Note Edited: 0076342 View Revisions
2015-04-14 11:16 hgbot Checkin
2015-04-14 11:16 hgbot Note Added: 0076513
2015-04-14 11:16 hgbot Status new => resolved
2015-04-14 11:16 hgbot Resolution open => fixed
2015-04-14 11:16 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1251373257c76a1b9fb589f6b4139fbd23280a91 [^]
2015-04-14 13:08 hgbot Checkin
2015-04-14 13:08 hgbot Note Added: 0076522
2015-04-17 13:31 umartirena Assigned To Sandrahuguet => AtulOpenbravo
2015-04-17 13:31 umartirena Status resolved => new
2015-04-17 13:31 umartirena Resolution fixed => open
2015-04-24 14:56 hgbot Checkin
2015-04-24 14:56 hgbot Note Added: 0076756
2015-04-24 14:56 hgbot Checkin
2015-04-24 14:56 hgbot Note Added: 0076757
2015-04-24 14:56 hgbot Status new => resolved
2015-04-24 14:56 hgbot Resolution open => fixed
2015-04-24 14:56 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/1251373257c76a1b9fb589f6b4139fbd23280a91 [^] => http://code.openbravo.com/erp/devel/pi/rev/41ab0a941f5032995a4dc2cdef49cbeef8bd1e7d [^]
2015-04-27 10:26 psanjuan Proposed Solution updated
2015-04-27 13:00 umartirena Review Assigned To => umartirena
2015-04-27 13:00 umartirena Note Added: 0076781
2015-04-27 13:00 umartirena Status resolved => closed
2015-04-27 13:00 umartirena Fixed in Version => pi
2015-04-27 13:02 umartirena Relationship added blocks 0029703
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077123
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077125
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077155
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077156
2015-06-11 18:02 ngarcia Issue Monitored: ngarcia
2016-07-26 11:45 aferraz Relationship added related to 0033508


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker