Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028526Openbravo ERP09. Financial managementpublic2015-01-07 10:002017-11-03 12:05
psanjuan 
collazoandy4 
urgentmajoralways
scheduledopen 
20Ubuntu 8.04.1
 
 
Google Chrome
Core
No
0028526: Wrong accounting in case of voiding a prepaid sales invoice.
Wrong accounting in case of voiding a prepaid sales invoice.
Go to sales order window and create a new order for F&B España.
Business Partner "Restaurantes Luna Llena".Select any product.
Book the order and change Invoice Terms to "Inmediate". Save.
Enter a partial prepayment of the order by using "Add Payment" process button.

Go to sales invoice window and create a new one for F&B España.
Select "Restaurantes Luna Llena" and populate invoice lines by using "Create Lines From" process button. Select the order just created.

Add two new lines to the invoice by selecting any product(s).

Complete the invoice. Post the invoice.
Posting would look like:

Debit: Accounts receivable (43000)
Debit: Customer prepayments (43800)
Debit: Revenue - product (70000) - discount.

Credit: Revenue - product (70000)
Credit: Sales Tax payable (47700)

Add a new partial payment.

Void the invoice by using the process button "Reactivate".

Navigate to the voided invoice and post it. Posting looks like:

Debit: Revenue - product (70000)
Debit: Sales Tax payable (47700)

Credit: Accounts Receivable (43000)
Credit: Revenue - product (70000) - discount.

Above shown posting is not correct as prepaid amount is not reflected.

Correct posting should be:

Debit: Revenue - product (70000)
Debit: Sales Tax payable (47700)

Credit: Accounts receivable (43000)
Credit: Customer prepayments (43800)
Credit: Revenue - product (70000) - discount.
No tags attached.
related to defect 00275803.0PR15Q1 closed Sandrahuguet Wrong journal entries when you void a sales invoice under some circumstances 
Issue History
2015-01-07 10:00psanjuanNew Issue
2015-01-07 10:00psanjuanAssigned To => dmiguelez
2015-01-07 10:00psanjuanWeb browser => Google Chrome
2015-01-07 10:00psanjuanModules => Core
2015-01-07 10:00psanjuanTriggers an Emergency Pack => No
2015-01-07 10:01psanjuanWeb browserGoogle Chrome => Google Chrome
2015-01-07 10:01psanjuanSummarytbd => Wrong accounting in case of voiding a prepaid sales invoice.
2015-01-07 10:01psanjuanDescription Updatedbug_revision_view_page.php?rev_id=7385#r7385
2015-01-07 10:01psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7387#r7387
2015-01-07 10:01psanjuanRelationship addedrelated to 0027580
2015-01-07 10:45psanjuanWeb browserGoogle Chrome => Google Chrome
2015-01-07 10:45psanjuanAssigned Todmiguelez => Sandrahuguet
2015-01-07 10:48psanjuanWeb browserGoogle Chrome => Google Chrome
2017-05-29 13:45SandrahuguetAssigned ToSandrahuguet => Triage Finance
2017-11-03 01:10collazoandy4Assigned ToTriage Finance => collazoandy4
2017-11-03 01:10collazoandy4Statusnew => scheduled
2017-11-03 10:01psanjuanNote Added: 0100240
2017-11-03 10:20psanjuanNote Edited: 0100240bug_revision_view_page.php?bugnote_id=0100240#r16225
2017-11-03 12:05psanjuanNote Added: 0100246
2017-11-03 12:05psanjuanWeb browserGoogle Chrome => Google Chrome
2017-11-03 12:05psanjuanTypedefect => design defect

Notes
(0100240)
psanjuan   
2017-11-03 10:01   
(edited on: 2017-11-03 10:20)
See another example:

Go to Sales order window and create a new one for F&B España, Restaurantes Luna LLena BP. Select Agua sin Gas 1 L product. Ordered Quantity = 1 and price 210.00
Select Tax = Ventas Exentas.
Book the order and paid the order.

Go to Sales Invoice window and create a new one for F&B España, Restaurantes Luna Llena BP. Use Create lines from and select the order just created. Complete and post the invoice. (Check that Sales Invoice is set to Payment Complete = Yes, as a prepayment amount = 210 is shown).

Verify below posting is shown:
210.00 (4380) Anticipo de Clientes DEBIT
210.00 (7000) Venta CREDIT

Void the invoice (verify that prepayment info is removed). Navigate to the new invoice created. Post it.

Verify below posting is shown:
210.00 (7000) Ventas DEBIT
210.00 (4300) Clientes CREDIT

This last posting is not correct as prepayment info behind is not shown. Correct posting must be:
210.00 (7000) Ventas DEBIT
210.00 (4380) Clientes CREDIT

Dummy (Zero) payment created removes prepayment info in the invoice, therefore accounting entry is not correct.

Accounting of the original invoice would need to be re-generated, therefore it is
210.00 (4300) Clientes DEBIT
210.00 (7000) Venta CREDIT

(0100246)
psanjuan   
2017-11-03 12:05   
This issue can not be considered a defect but a design defect because Openbravo is not currently design to allow this scenario in a correct way.

It will not possible to re-generate accounting if the period is closed.
We would need to take into account both total pre-payments and partial pre-payment.

An additional research is required to understand how this issue should be designed and therefore fix.