Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029475 | Openbravo ERP | 09. Financial management | public | 2015-03-31 15:36 | 2015-06-11 18:02 |
|
Reporter | psanjuan | |
Assigned To | AtulOpenbravo | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | Ubuntu 8.04.1 |
Product Version | | |
Target Version | | Fixed in Version | pi | |
Merge Request Status | |
Review Assigned To | umartirena |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0029475: Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price |
Description | Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price |
Steps To Reproduce | Configure 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 Solution | Temporary 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)
|
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0027484 | 3.0PR14Q4 | closed | AtulOpenbravo | 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 | | closed | markmm82 | Openbravo ERP | Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown | blocks | defect | 0029703 | | closed | vmromanos | Modules | Cash VAT post it is not correct in case sales invoice is linked to sales order but with a lower price |
|
Attached Files | |
|
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 | OBNetwork customer | => No |
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 | bug_revision_view_page.php?rev_id=8155#r8155 |
2015-04-01 19:11 | psanjuan | Note Added: 0076342 | |
2015-04-01 19:11 | psanjuan | Note Edited: 0076342 | bug_revision_view_page.php?bugnote_id=0076342#r8178 |
2015-04-01 19:43 | psanjuan | Note Edited: 0076342 | bug_revision_view_page.php?bugnote_id=0076342#r8179 |
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 |
Notes |
|
(0076342)
|
psanjuan
|
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
|
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
|
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
|
2015-04-24 14:56
|
|
|
|
(0076757)
|
hgbot
|
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
|
2015-04-27 13:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|