Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009710Openbravo ERP09. Financial managementpublic2009-06-29 18:202009-07-18 00:00
networkb 
harikrishnan 
immediatemajoralways
closedfixed 
5
2.40MP3 
pi 
Core
No
0009710: Create VAT register process does not include the original invoice when this one is cancelled.
An sales invoices is completed and voided.

If Create VAT register process is executed, only will take into account the cancelled invoice, not the original one.

The reason is the original invoice has 'VO' status (docstatus) and, if you revise the select of the process:

and C_Invoice.DocStatus in ('CO','CL')
         and C_Invoice.Processed= 'Y'

it does not include 'VO' status. However, the cancelled (which as negative amount) is included because its status is 'CO'
Generate a sales invoice.
Complete it.
Void it.

Create a Tax register type (Financial Managemnt > Receivables and Payables > Setup). In lines, select the tax used in the invoice.

Create a new Tax Payment (Financial Managemnt > Receivables and Payables > Transactions). Select any GL item.

Press Create VAT register.
AppsOpenbravo/src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegister_data.xsql:

Delete:

and C_Invoice.DocStatus in ('CO','CL')
No tags attached.
depends on backport 0009711 closed harikrishnan Create VAT register process does not include the original invoice when this one is cancelled. 
Issue History
2009-06-29 18:20networkbNew Issue
2009-06-29 18:20networkbAssigned To => rafaroda
2009-06-29 19:29psarobeStatusnew => scheduled
2009-06-29 19:29psarobeAssigned Torafaroda => sathiyan
2009-06-29 19:29psarobefix_in_branch => pi
2009-07-01 12:28sathiyanAssigned Tosathiyan => harikrishnan
2009-07-06 14:29hgbotCheckin
2009-07-06 14:29hgbotNote Added: 0017943
2009-07-06 14:29hgbotStatusscheduled => resolved
2009-07-06 14:29hgbotResolutionopen => fixed
2009-07-06 14:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2f7de92f832eda29ca6d250b6c95ed0733485ba6 [^]
2009-07-17 14:22sureshbabuStatusresolved => closed
2009-07-17 14:22sureshbabuNote Added: 0018367
2009-07-17 14:22sureshbabuFixed in Version => pi
2009-07-18 00:00anonymoussf_bug_id0 => 2823350

Notes
(0017943)
hgbot   
2009-07-06 14:29   
Repository: erp/devel/pi
Changeset: 2f7de92f832eda29ca6d250b6c95ed0733485ba6
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Mon Jul 06 17:52:43 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2f7de92f832eda29ca6d250b6c95ed0733485ba6 [^]

Fixes Issue 9710: Create VAT register process does not include the original invoice when this one is cancelled.

---
M src/org/openbravo/erpCommon/ad_actionButton/CreateVatRegisters_data.xsql
---
(0018367)
sureshbabu   
2009-07-17 14:22   
Tested working fine