Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037206Openbravo ERP07. Sales managementpublic2017-11-02 08:172017-11-15 20:40
AtulOpenbravo 
collazoandy4 
normalmajoralways
scheduledopen 
5
 
 
Core
No
0037206: Wrong outstanding amount after voiding a partial prepaid sales invoice
When a partially prepaid sales invoice is voided, its outstanding amount is wrongly set in the invoice header as well as payment plan.

Same is the case in purchase flow.
- Register Sales Order for "Restaurantes Luna Llena, S.A." in "F&B EspaƱa, S.A" organization and Invoice terms=immediate
- Add new line for product "Vino Blanco 0,75L", price=100 and tax= Entregas IVA 21%
- Process order. Total Gross Amount = 114.95
- Run Add payment to partially a the order for eg:-100.00
- Register Sales Invoice for "Restaurantes Luna Llena, S.A.", run "create lines from" and select one line. Process invoice.
- Realize that Invoice Amount = 114.95, Total Paid = 100.00, Outstanding amount = 14.95
- Post the invoice. Realize that posting is correct

  Customer Prepayment Account = 100.00 Debit
  Customer Account = 14.95 Debit
  Product Revenue = 100.00 Credit For Products
  Product Revenue = 5.00 Debit For Discount
  Tax Due = 19.95 Credit

- Void the Sales Invoice.
- Realize that original Invoice outstanding amount is negative and wrong. Navigate to payment plan, Outstanding amount is negative and wrong.

This amount is exactly the negative value of the (invoice amount - prepaid amount)
No tags attached.
related to defect 0036297 closed collazoandy4 Wrong schedule details information when Voiding an invoice which is prepaid via sales order 
related to defect 0028527 new Triage Finance Wrong accounting in case of posting a payment related to a Cash VAT sales invoice for which new lines have been added. 
Issue History
2017-11-02 08:17AtulOpenbravoNew Issue
2017-11-02 08:17AtulOpenbravoAssigned To => Triage Finance
2017-11-02 08:17AtulOpenbravoModules => Core
2017-11-02 08:17AtulOpenbravoTriggers an Emergency Pack => No
2017-11-02 08:17AtulOpenbravoRelationship addedrelated to 0036297
2017-11-02 08:18AtulOpenbravoRelationship addedrelated to 0028527
2017-11-02 08:19AtulOpenbravoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16220#r16220
2017-11-13 15:09collazoandy4Assigned ToTriage Finance => collazoandy4
2017-11-13 23:26collazoandy4Statusnew => scheduled
2017-11-15 20:40collazoandy4Note Added: 0100536

Notes
(0100536)
collazoandy4   
2017-11-15 20:40   
Test Plan
  Go to Sales Order window and create a new record:
    Bussines Partner: Alimentos y Supermercados, S.A
    Invoice Terms: Immediate
    Create a new record in Lines tab:
      Product: Agua sin Gas 1L Ordered Quantity: 10
    Book the order
    Add payment of 10.00
  Go to Sales Invoice and create a new record for Alimentos y Supermercados, S.A
    Create lines from previous order
    Complete the invoice and check:
      Payment complete: No
      Prepayment amount: 10.00
    Go to Payment Plan tab and check:
      Number of payment: 1 Expected amount: 16.66 Received amount: 10.00 Outstanding amount: 6.66
    Go to Payment Details tab and check:
      Received amount: 16.66 Amount: 10.00
    Void the invoice and check:
      Payment complete: Yes
      Prepayment amount: 0.00
    Go to Payment Plan tab and check:
      Number of payment: 1 Expected amount: 16.66 Received amount: 16.66 Outstanding amount: 0.00
    Go to Payment Details tab and check:
      Received amount: 10.00 Amount: 16.66
  Go to the reversed invoice and check:
    Payment complete: Yes
    Prepayment amount: 0.00
    Go to Payment Plan tab and check:
      Number of payment: 1 Expected amount: -16.66 Received amount: -16.66 Outstanding amount: 0.00
    Go to Payment Details tab and check:
      Received amount: -16.66 Amount: -16.66
  Go to Payment In window and check a new dummy payment was created:
    Amount: 0
    Go to Lines tab and check that have two lines one asociated to the reversed and the other to the original invoice
  Go to the previous order created and pay it with an amount of 6.66
  Go to Sales Invoice and create a new record for Alimentos y Supermercados, S.A
    Create lines from previous order
    Complete the invoice and check:
      Payment complete: Yes
      Prepayment amount: 16.66
    Go to Payment Plan tab and check:
      Number of payment: 2 Expected amount: 16.66 Received amount: 16.66 Outstanding amount: 0.00
    Go to Payment Details tab and check:
      Received amount: 6.66 Amount: 16.66
      Received amount: 10.00 Amount: 16.66
    Void the invoice and check:
      Payment complete: Yes
      Prepayment amount: 0.00
    Go to Payment Plan tab and check:
      Number of payment: 1 Expected amount: 16.66 Received amount: 16.66 Outstanding amount: 0.00
    Go to Payment Details tab and check:
      Received amount: 6.66 Amount: 16.66
      Received amount: 10.00 Amount: 16.66
  Go to the reversed invoice and check:
    Payment complete: Yes
    Prepayment amount: 0.00
    Go to Payment Plan tab and check:
      Number of payment: 1 Expected amount: -16.66 Received amount: -16.66 Outstanding amount: 0.00
    Go to Payment Details tab and check:
      Received amount: -16.66 Amount: -16.66
  Go to Payment In window and check a new dummy payment was created:
    Amount: 0
    Go to Lines tab and check that have three lines one asociated to the reversed invoiced and the other two to the original invoice