Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025638Openbravo ERP09. Financial managementpublic2014-02-03 11:012014-02-12 18:29
vmromanos 
vmromanos 
urgentmajoralways
closedfixed 
20Debian 5.0
 
3.0PR14Q3 
Core
No
0025638: Cash VAT: Withholding and tax exempt (rate=0%) support
Right now it is not possible to enter a cash VAT invoice with a withholding tax rate. This is wrong and the system should allow this scenario.

The withholding tax rates are declared as cash vat=N and withholding=Y. Besides, we can have a summary level tax rate declared as cash vat, which includes a cash VAT tax rate and a withholding tax rate, for example the Spanish tax rate "Arrendamientos 21% -21%R (cobros)" for Cash VAT.

A cash VAT invoice (declared at the invoice's header) must include (at least) a Cash VAT tax rate, an optionally it may also include a withholding tax rate or even a exempt tax rate for any of its lines.

The Cash VAT information and Cash VAT accounting flow must only apply to the cash VAT tax amount, ignoring the withholding and the exempt (rate=0%) tax rates.
1. Create a sales invoice. Set the Cash VAT=Y
2. Enter a line with a cash vat tax rate previously created (for example Entregas IVA 21% IVA de Caja)
3. Enter a new line but this time selecting a withholding tax rate previously created (for example "Arrendamientos 21% -21%R (cobros)")
4. Try to complete the invoice. An error is shown

Expected behaviour:
1. The invoice is successfully completed regardless having cash vat and withholding or exempt (rate=0%) tax rates at the same time
2. When registering a payment, the Cash VAT tab is filled only for the Cash VAT tax rates, ignoring the withholding tax rates and exempt tax rate (rate=0%).
3. The invoice/payment/transaction/reconciliation accounting will use the transitory accounts only for the tax amounts related to the Cash VAT tax rates.
No tags attached.
related to feature request 00246153.0MP30 closed vmromanos Openbravo 3 needs to allow Cash VAT management 
Issue History
2014-02-03 11:01vmromanosNew Issue
2014-02-03 11:01vmromanosAssigned To => vmromanos
2014-02-03 11:01vmromanosModules => Core
2014-02-03 11:01vmromanosTriggers an Emergency Pack => No
2014-02-03 11:03vmromanosStatusnew => scheduled
2014-02-03 11:03vmromanosfix_in_branch => pi
2014-02-03 12:13vmromanosRelationship addedrelated to 0024615
2014-02-04 10:22hgbotCheckin
2014-02-04 10:22hgbotNote Added: 0063881
2014-02-04 10:22hgbotStatusscheduled => resolved
2014-02-04 10:22hgbotResolutionopen => fixed
2014-02-04 10:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5b7d0ffec3637c35311e451916cf1fc360f1ec5b [^]
2014-02-11 09:57psanjuanNote Added: 0064041
2014-02-11 09:57psanjuanStatusresolved => closed
2014-02-11 09:57psanjuanfix_in_branchpi =>
2014-02-12 18:29hudsonbotCheckin
2014-02-12 18:29hudsonbotNote Added: 0064152

Notes
(0063881)
hgbot   
2014-02-04 10:22   
Repository: erp/devel/pi
Changeset: 5b7d0ffec3637c35311e451916cf1fc360f1ec5b
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Feb 03 12:11:07 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5b7d0ffec3637c35311e451916cf1fc360f1ec5b [^]

Fixed bug 25638: [cashvat] Withholding and tax exempt (rate=0%) support

Cash VAT invoices are allowed to include withholding and exempt (rate=0%) tax rates.
Cash VAT information at Invoice | Tax level only created for Cash VAT tax rates (neither withholding nor exempt tax rates).
Cash VAT accounting flow (usage of tax transitory accounts) only for Cash VAT tax rates (neither withholding nor exempt tax rates).

---
M modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml
M src-db/database/model/functions/C_GETTAX.xml
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/C_ORDER_POST1.xml
M src-db/database/model/triggers/C_INVOICELINE_TRG.xml
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocTax.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0064041)
psanjuan   
2014-02-11 09:57   
Fixed and working. Issue can be closed.
(0064152)
hudsonbot   
2014-02-12 18:29   
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/d1a5bb862230 [^]
Maturity status: Test