Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027580Openbravo ERP09. Financial managementpublic2014-09-11 10:312014-12-31 14:31
VictorVillar 
Sandrahuguet 
urgentmajoralways
closedfixed 
5
pi 
3.0PR15Q1 
Core
No
0027580: Wrong journal entries when you void a sales invoice under some circumstances
Wrong journal entries when you void a sales invoice under some circumstances
As group Admin role,
Go to Financial Account window
 Payment method Transferencia
    Upon Receipt Use: In transit Payment Account

Go to Sales order window,
  create a new for EspaƱa
  Business Partner: Alimentos y Supermercados
  Invoice Terms: Immediate
 line: Cerveza, Unit: 1
Complete it
Click on Add Payment and prepay this order. Done.

Post the Payment In created. Check the journal entry: 438 Anticipos account affected (Prepayment)

Go to Sales invoice window,
 Create a new one: Business Partner: Alimentos y Supermercados
click on Create Lines From and select the Sales order created before.
Complete it and post it. Check the journal entry: 438 Anticipos account affected (Prepayment).

Then, Void this invoice.
Navigate to the Voided Invoices created.
FIRST ERROR: Add payment button appears there, and it should not, because it is not possible to pay it.

Post it. Check the journal entry: 430 Clientes account affected, because there is not Payment plan related. SECOND ERROR: this journal entry should be the same as the above but in reverse.

THIRD ERROR: if you navigate to the original invoice and you unpost it, and post it again, check the journal entry: 430 Clientes account affected, and it is wrong. It should be affected the 438 Anticipos account (Prepayment).
No tags attached.
related to defect 0028402 new Triage Omni OMS Add payment button should not appear in the reversed invoice generated when voiding an invoice 
related to design defect 0028526 scheduled collazoandy4 Wrong accounting in case of voiding a prepaid sales invoice. 
related to defect 0028527 new Triage Omni OMS Wrong accounting in case of posting a payment related to a Cash VAT sales invoice for which new lines have been added. 
related to defect 0038487 closed AtulOpenbravo "Suspense balancing" account used when invoice's total is zero and prepayment exists 
causes defect 00299633.0PR15Q3 closed AtulOpenbravo Role without access to currency entity can not post a purchase invoice 
? issue_27580.ods (21,486) 2014-12-31 14:31
https://issues.openbravo.com/file_download.php?file_id=7647&type=bug
Issue History
2014-09-11 10:31VictorVillarNew Issue
2014-09-11 10:31VictorVillarAssigned To => dmiguelez
2014-09-11 10:31VictorVillarModules => Core
2014-09-11 10:31VictorVillarResolution time => 1413151200
2014-09-11 10:31VictorVillarTriggers an Emergency Pack => No
2014-09-11 10:31VictorVillarIssue Monitored: networkb
2014-09-29 10:50eduardo_ArgalTarget Version3.0PR14Q4 => 3.0PR15Q1
2014-10-31 13:09dmitry_mezentsevAssigned Todmiguelez => Sandrahuguet
2014-12-02 17:16SandrahuguetStatusnew => scheduled
2014-12-02 17:16Sandrahuguetfix_in_branch => pi
2014-12-12 12:41SandrahuguetRelationship addedrelated to 0028402
2014-12-12 12:43SandrahuguetNote Added: 0072449
2014-12-12 14:01hgbotCheckin
2014-12-12 14:01hgbotNote Added: 0072451
2014-12-12 14:01hgbotStatusscheduled => resolved
2014-12-12 14:01hgbotResolutionopen => fixed
2014-12-12 14:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/14bcacd308af9fd524555025a6a189cdc5ab7033 [^]
2014-12-15 10:33umartirenaNote Added: 0072496
2014-12-15 11:18hgbotCheckin
2014-12-15 11:18hgbotNote Added: 0072506
2014-12-15 22:22umartirenaNote Added: 0072528
2014-12-17 17:31hgbotCheckin
2014-12-17 17:31hgbotNote Added: 0072665
2014-12-17 17:32SandrahuguetStatusresolved => new
2014-12-17 17:32SandrahuguetResolutionfixed => open
2014-12-17 17:32SandrahuguetNote Added: 0072666
2014-12-22 13:28SandrahuguetStatusnew => scheduled
2014-12-29 08:36hgbotCheckin
2014-12-29 08:36hgbotNote Added: 0072847
2014-12-29 08:36hgbotStatusscheduled => resolved
2014-12-29 08:36hgbotResolutionopen => fixed
2014-12-29 08:36hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/14bcacd308af9fd524555025a6a189cdc5ab7033 [^] => http://code.openbravo.com/erp/devel/pi/rev/fbc674d56f047b43b679e4092bd57a0c13b81385 [^]
2014-12-30 10:43psanjuanNote Edited: 0072666bug_revision_view_page.php?bugnote_id=0072666#r7362
2014-12-30 13:48psanjuanNote Added: 0072877
2014-12-30 14:02hgbotCheckin
2014-12-30 14:02hgbotNote Added: 0072878
2014-12-30 15:08psanjuanNote Edited: 0072877bug_revision_view_page.php?bugnote_id=0072877#r7368
2014-12-30 16:23hgbotCheckin
2014-12-30 16:23hgbotNote Added: 0072882
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073211
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073219
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073238
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073272
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073279
2014-12-30 23:28hudsonbotCheckin
2014-12-30 23:28hudsonbotNote Added: 0073280
2014-12-31 14:30psanjuanNote Added: 0073289
2014-12-31 14:30psanjuanStatusresolved => closed
2014-12-31 14:30psanjuanfix_in_branchpi =>
2014-12-31 14:31psanjuanFile Added: issue_27580.ods
2015-01-07 10:01psanjuanRelationship addedrelated to 0028526
2015-01-07 10:07psanjuanRelationship addedrelated to 0028527
2015-05-25 18:12dmitry_mezentsevRelationship addedcauses 0029963
2018-05-11 12:33aferrazRelationship addedrelated to 0038487

Notes
(0072449)
Sandrahuguet   
2014-12-12 12:43   
FIRST ERROR: Add payment button appears there, and it should not, because it is not possible to pay it.

Error shown above will be fixed in the related issue 28402
(0072451)
hgbot   
2014-12-12 14:01   
Repository: erp/devel/pi
Changeset: 14bcacd308af9fd524555025a6a189cdc5ab7033
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Dec 12 12:56:00 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/14bcacd308af9fd524555025a6a189cdc5ab7033 [^]

Fixed bug 27580 Wrong journal entries when you void a sales invoice with prepayment

New column "prepaymentamt" has been added in order not to lose information
about prepayments when the invoice is voided.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/tables/C_INVOICE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
M src/org/openbravo/erpCommon/ad_forms/DocInvoice_data.xsql
---
(0072496)
umartirena   
2014-12-15 10:33   
Code Review Done.
(0072506)
hgbot   
2014-12-15 11:18   
Repository: erp/devel/pi
Changeset: 798bebfeabb61863871bd226fb94f21cf15a1e1a
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Dec 15 11:16:59 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/798bebfeabb61863871bd226fb94f21cf15a1e1a [^]

Related to bug 27580 Wrong journal entries when you void a purchase invoice

---
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0072528)
umartirena   
2014-12-15 22:22   
Code Review of the second changeset Done.
(0072665)
hgbot   
2014-12-17 17:31   
Repository: erp/devel/pi
Changeset: 132f3d7f9f75a6f651405f56195da8dd562029b3
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Dec 17 17:30:22 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/132f3d7f9f75a6f651405f56195da8dd562029b3 [^]

Related to issue 27580

---
M src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0072666)
Sandrahuguet   
2014-12-17 17:32   
(edited on: 2014-12-30 10:43)
the state has changed to new, it does not work for cash vat invoices

(0072847)
hgbot   
2014-12-29 08:36   
Repository: erp/devel/pi
Changeset: fbc674d56f047b43b679e4092bd57a0c13b81385
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 23 18:53:13 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fbc674d56f047b43b679e4092bd57a0c13b81385 [^]

Fixed issue 27580 fixed issue to cash vat invoices

Fixed wrong journal entries when you void a cash vat sales invoice
and fixed total prepayment amount

---
M src-db/database/model/triggers/C_INVOICELINE_TRG2.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0072877)
psanjuan   
2014-12-30 13:48   
(edited on: 2014-12-30 15:08)
Verified this is working for:
Total sales and purchase prepayments (order prepayments)
Total sales and purchase prepayments including new lines in the invoice.
Partial sales and purchase prepayments (order prepayments)
Partial sales and purchase prepayments including new lines in the invoice.

Verified this is working for:
Total sales and purchase prepayments (order prepayments + Write off the difference).

Same should apply to orders & invoices including Cash VAT. Verified.

(0072878)
hgbot   
2014-12-30 14:02   
Repository: erp/devel/pi
Changeset: 8cddfd318969f8f574c9abb9febe1957b1191e06
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 30 14:01:29 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8cddfd318969f8f574c9abb9febe1957b1191e06 [^]

Related to issue 27580 fixed issue to cash vat invoices

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0072882)
hgbot   
2014-12-30 16:23   
Repository: erp/devel/pi
Changeset: 222329b73c20095ed477023ed200cfa079590b43
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 30 16:23:08 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/222329b73c20095ed477023ed200cfa079590b43 [^]

Related to issue 27580 fixed issue to cash vat purchase invoices

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0073211)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test
(0073219)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test
(0073238)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test
(0073272)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test
(0073279)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test
(0073280)
hudsonbot   
2014-12-30 23:28   
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/6525fe229e06 [^]
Maturity status: Test
(0073289)
psanjuan   
2014-12-31 14:30   
Verified this is working.
See excel sheet attached.