Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028956Openbravo ERP09. Financial managementpublic2015-02-16 17:522015-02-23 05:11
psanjuan 
vmromanos 
urgentmajoralways
closedfixed 
20Ubuntu 8.04.1
 
pi 
umartirena
Core
Production - Confirmed Stable
2014-05-23
3.0PR14Q3
https://code.openbravo.com/erp/devel/pi/rev/cbb97a88d93a77eb501c229068804e7bc1cc4990 [^]
No
0028956: Negative Cash VAT lines created while partially paying an AP/AR Credit Memo
Cash VAT lines populated in negative while paying partially an AP/AR Credit Memo.
Those lines should also be positive.

In case of total payment Cash VAT lines are created positive, which is correct.

This scenario have an impact on the way those amounts are being handled on VAT Tax Form as those tax forms consider those lines must be positive.
In F&B España create a vendor configured as a Cash VAT vendor.
Create a purchase invoice for that vendor dated on 2015.
Add a product, Enter 20 units of that product. Make sure that the Tax Rate used is a Cash VAT tax rate.

Complete and post. Partially pay this invoice. Navigate to Tax tab, Cash VAT sub-tab and make sure that the values shown there are positive.

Create an AP Credit Memo for that vendor, dated on 2015.
Select the same product and enter 1 (positive) unit of that product. Make sure that the Tax Rate used is a Cash VAT tax rate.

Complete and post.

Partially pay this credit memo. Navigate to Tax tab, Cash VAT sub-tab and realize that the values shown there are negative. That is not correct.

While partially paying a credit memo that includes Cash VAT, Cash VAT lines should be positive.
No tags attached.
caused by defect 00265713.0PR14Q3 closed AtulOpenbravo Openbravo ERP Error when paying a "cash vat" invoice with total amount lower than related order's amount 
blocks defect 0028966 closed vmromanos Modules Modulescript required related to issue 28956 
Issue History
2015-02-16 17:52psanjuanNew Issue
2015-02-16 17:52psanjuanAssigned To => vmromanos
2015-02-16 17:52psanjuanModules => Core
2015-02-16 17:52psanjuanRegression level => Production - Confirmed Stable
2015-02-16 17:52psanjuanRegression date => 2014-05-23
2015-02-16 17:52psanjuanRegression introduced in release => 3.0PR14Q3
2015-02-16 17:52psanjuanRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/cbb97a88d93a77eb501c229068804e7bc1cc4990 [^]
2015-02-16 17:52psanjuanTriggers an Emergency Pack => No
2015-02-16 18:40psanjuanSummaryNegative Cash VAT lines while partially paying an AP/AR Credit Memo => Negative Cash VAT lines created while partially paying an AP/AR Credit Memo
2015-02-16 18:40psanjuanDescription Updatedbug_revision_view_page.php?rev_id=7691#r7691
2015-02-16 18:40psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7693#r7693
2015-02-16 18:40psanjuanProposed Solution updated
2015-02-17 07:57dmitry_mezentsevRelationship addedcaused by 0026571
2015-02-17 13:22vmromanosStatusnew => scheduled
2015-02-17 13:22vmromanosNote Added: 0074553
2015-02-17 13:22vmromanosfix_in_branch => pi
2015-02-17 13:43vmromanosRelationship addedblocks 0028966
2015-02-17 13:44hgbotCheckin
2015-02-17 13:44hgbotNote Added: 0074554
2015-02-17 13:44hgbotCheckin
2015-02-17 13:45hgbotNote Added: 0074555
2015-02-17 13:45hgbotStatusscheduled => resolved
2015-02-17 13:45hgbotResolutionopen => fixed
2015-02-17 13:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d6d3d6ca0aaccb3fbadff29549316471e39c3a63 [^]
2015-02-17 21:22umartirenaReview Assigned To => umartirena
2015-02-17 21:22umartirenaNote Added: 0074574
2015-02-17 21:22umartirenaStatusresolved => closed
2015-02-17 21:22umartirenaFixed in Version => pi
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074772
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074773

Notes
(0074553)
vmromanos   
2015-02-17 13:22   
Requirements:
1. Fix Core's code in charge of populating Cash VAT Info
2. Create a module script in Cash VAT module to fix wrong data
(0074554)
hgbot   
2015-02-17 13:44   
Repository: erp/devel/pi
Changeset: 17600da4f044972bbd8a1ccf70c7a4c2f14ef069
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Feb 16 18:04:56 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/17600da4f044972bbd8a1ccf70c7a4c2f14ef069 [^]

Related to issue 28956: Applied Openbravo's code format

---
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0074555)
hgbot   
2015-02-17 13:44   
Repository: erp/devel/pi
Changeset: d6d3d6ca0aaccb3fbadff29549316471e39c3a63
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Feb 17 13:40:24 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d6d3d6ca0aaccb3fbadff29549316471e39c3a63 [^]

Fixed bug 28956: Negative Cash VAT info when partially paying Credit Memo

When there was a partial payment in cash vat, the calculated percentage had the wrong sign (negative, when it should be possitive).
Thus the tax and taxable amounts had also the opposite sign.

The fix negates the invoice's grand total amount in case of a "reversal" document (i.e. Credit Memo), so the percentage, tax and taxable amounts are OK.

Note that the tax and taxable amount sign must honor the correspondent c_invoicetax record.
(See testlink test case: "[cashVATe180] Sales Invoice AR Credit Memo (Cash VAT). Partial Payment. Transaction account" for more info)


For fixing previous wrong data, a module script will be available in Cash VAT module 1.0.8 or higher

---
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0074574)
umartirena   
2015-02-17 21:22   
Code Review + Testing OK
(0074772)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test
(0074773)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test