Openbravo Issue Tracking System - Modules
View Issue Details
0026397ModulesCash VAT Managementpublic2014-04-28 11:192016-04-07 12:58
ngarcia 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
0026397: Intracomunitary and international invoices/orders shouldn't be checked as Cash VAT
Intracomunitary and international invoices/orders shouldn't be checked as Cash VAT
As group admin role:

Set the organization as Cash VAT (and double cash criteria)
Change the address of one business partner to France
Create a Sales Invoice (or a purchase invoice) for that business partner
Check the Cash VAT field of the Header is set to "Yes"
Add a line to it for a product or a services by making sure that the tax rate is 0. (For instance "Adquisiciones Intracomunitarias Exentas" in the case of a purchase invoice or "Entregas Intracomunitarias (%N0>0%) in the case of a sales invoice.
Complete the invoice.
Realize that the invoice can be completed without any problem but the Cash VAT field of the header remains selected (and that should not be the case, because that kind of invoices are not Cash VAT invoices).

After that:
Create a new Purchase Invoice for that business partner
Check the Cash VAT field of the Header is set to "Yes"
Add a line to it for a product or a services by making sure that the tax rate is NOT 0, for instance "Adquisiciones Intracomunitarias 21%"
Complete the invoice.
Realize that the invoice can not be completed and the following error is shown:

"Error:
Any of the tax rates in the document doesn't match the Cash VAT configured at the header"
For an organization under CASH VAT regimen, if a purchase or sales invoice/order is created for a Vendor/Customer located in a different country than organization country "Cash VAT" check in the header needs to be remove.

No tags attached.
related to feature request 0027037 new psanjuan Intracomunitary and international invoices shouldn't be checked as Cash VAT, including exempt invoices (tax rates), Canary  
Issue History
2014-04-28 11:19ngarciaNew Issue
2014-04-28 11:19ngarciaAssigned To => jonalegriaesarte
2014-04-28 11:19ngarciaIssue Monitored: networkb
2014-05-20 18:35ngarciaSummaryIntracomunitary invoices shouldn't be checked as Cash VAT => Intracomunitary and international invoices shouldn't be checked as Cash VAT
2014-05-20 18:35ngarciaDescription Updatedbug_revision_view_page.php?rev_id=5873#r5873
2014-05-20 18:35ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5875#r5875
2014-06-27 14:12psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5995#r5995
2014-06-27 14:12psanjuanProposed Solution updated
2014-07-02 16:35vmromanosStatusnew => scheduled
2014-07-02 16:35vmromanosAssigned Tojonalegriaesarte => vmromanos
2014-07-02 16:35vmromanosfix_in_branch => pi
2014-07-04 08:47hgbotCheckin
2014-07-04 08:47hgbotNote Added: 0068539
2014-07-04 08:47hgbotStatusscheduled => resolved
2014-07-04 08:47hgbotResolutionopen => fixed
2014-07-04 08:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8e3618710571267e284ed724a3732bbab2e4e7f0 [^]
2014-07-09 15:03psanjuanStatusresolved => closed
2014-07-09 15:03psanjuanfix_in_branchpi =>
2014-07-09 15:06psanjuanNote Added: 0068570
2014-07-09 15:08psanjuanRelationship addedrelated to 0027037
2014-07-09 15:13psanjuanSummaryIntracomunitary and international invoices shouldn't be checked as Cash VAT => Intracomunitary and international invoices/orders shouldn't be checked as Cash VAT
2014-07-09 15:13psanjuanDescription Updatedbug_revision_view_page.php?rev_id=6014#r6014
2014-07-09 15:13psanjuanProposed Solution updated
2014-08-08 18:52hudsonbotCheckin
2014-08-08 18:52hudsonbotNote Added: 0069139
2016-04-07 12:58psanjuanProposed Solution updated

Notes
(0068539)
hgbot   
2014-07-04 08:47   
Repository: erp/devel/pi
Changeset: 8e3618710571267e284ed724a3732bbab2e4e7f0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jul 03 13:51:48 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8e3618710571267e284ed724a3732bbab2e4e7f0 [^]

Fixed issue 26397: Cash VAT for orders and invoices based also on location

Cash VAT regime is only allowed for transactions inside the same country.
In case the Organization's and Business Partner's countries are different, the document's Cash VAT flag (for orders and invoices) is forced to be unchecked.
This is controlled through several callouts at Invoice's/Order's header on the Organization and Business Partner Location columns.

---
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartner.java
M src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_Organization.java
M src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java
M src/org/openbravo/erpCommon/ad_callouts/SE_Order_Organization.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
A src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartnerLocation.java
A src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartnerLocation.java
---
(0068570)
psanjuan   
2014-07-09 15:06   
fixed and working but for exempt invoices (purchase/sales). Check issue:
(0069139)
hudsonbot   
2014-08-08 18:52   
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/4450016dee64 [^]
Maturity status: Test