Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032915Openbravo ERP07. Sales managementpublic2016-05-10 13:242017-11-07 23:02
psanjuan 
collazoandy4 
urgentmajoralways
scheduledopen 
20Professional Appliance
 
 
Core
No
0032915: Not correct distribution while partially paying a reversed sales invoice.
Not correct distribution while partially paying a reversed sales invoice.
- Go to Sales invoice and create a new one for F&B España. BP Alimentos.
- Change Transaction Document to Reversed Sales Invoice.
- Save it

- Go to lines and create a new one with below detail:
** Product = Agua sin Gas 1L
** Invoiced quantity = -850
- Complete it (Do not use credit if any).

- Click on Add Payment.
- Change Actual Payment to -500.00 for instance

- Check that Openbravo automatically takes some amount of an existing positive invoice. See image attached.

A -500.00 actual payment turns into totally paying the reversed invoice for an amount of -1573.61 because Openbravo is automatically collecting a positive amount from the customer = 1073.61

This is not correct, unless the end-user decides to do so.


This behavior is not correct because this time we are not collecting any payment in from the customer but paying back to it (as a negative payment in should be created).

Openbravo should not automatically distribute but just in case there is another reversed sales invoice with a negative amount and in case actual payment amount is higher (negative) than the first reversed sales invoice to pay.

For instance there are two reversed sales invoices:
RS invoice 1 for an amount = -750.00
RS invoice 2 for an amount = -1530.00
and we are entering an actual payment of -1000.00, in that case first invoice can be settle totally and second invoice partially.
No tags attached.
related to defect 0032914 closed aferraz Wrong payment status as well payment in details when partially paying a Reversed Sales Invoice 
png Issue_32915.png (88,353) 2016-05-10 13:25
https://issues.openbravo.com/file_download.php?file_id=9381&type=bug
png
Issue History
2016-05-10 13:24psanjuanNew Issue
2016-05-10 13:24psanjuanAssigned To => Triage Finance
2016-05-10 13:24psanjuanModules => Core
2016-05-10 13:24psanjuanTriggers an Emergency Pack => No
2016-05-10 13:25psanjuanFile Added: Issue_32915.png
2016-05-10 13:28psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12034#r12034
2016-05-10 13:31psanjuanProposed Solution updated
2016-05-10 14:02psanjuanRelationship addedrelated to 0032914
2017-11-07 21:41collazoandy4Assigned ToTriage Finance => collazoandy4
2017-11-07 21:41collazoandy4Statusnew => scheduled
2017-11-07 23:02collazoandy4Note Added: 0100315

Notes
(0100315)
collazoandy4   
2017-11-07 23:02   
Test Plan
  As F&B International Group Admin Role
    Go to Payment Termn window and create a new record:
      Search Key/Name: 30-60
      Offset Month Due: 1
      Create a new record in Lines Tab:
        Percentage due: 60
        Rest: Y
    Go to Sales Invoice window and create a new record:
      Business Partner: Alimentos y Supermercados, S.A
      Payment Terms: 30 days
      Create a new record in Lines tab:
        Product: Agua sin Gas 1L
        Invoiced quantity: 100
        Unit Price: 1
        Tax: Ventas exentas
      Complete the invoice
      Clic on Add Payment button and check:
        Actual Payment: 100
        The record in Order/Invoice grid is selected with an amount of 100
      Edit the Actual Payment value to 50 and check the record in Order/Invoice grid is selected with an amount of 50 (just click outside the field to trigger on change event)
      Edit the Actual Payment value to 0 and check the is no record selected in Order/Invoice grid
      Edit the Actual Payment value to 100 and check one record in Order/Invoice grid is selected with an amount of 50 and an overpayment of 50
      Clic on Cancel Button
    Create a new sales invoice header:
      Business Partner: Alimentos y Supermercados, S.A
      Payment Terms: 30-60
      Create a new record in Lines tab:
        Product: Bebida Energética 0,5L
        Invoiced quantity: 300
        Unit Price: 1
        Tax: Ventas exentas
      Complete the invoice
      Clic on Add Payment button and check:
        Actual Payment: 300
        The are to records selected in Order/Invoice grid asociated to the invoice created with amounts value as 180 and 120
      Edit the Actual Payment value to 150 and check one record in Order/Invoice grid is selected with an amount of 150
      Edit the Actual Payment value to 0 and check the is no record selected in Order/Invoice grid
      Edit the Actual Payment value to 450 and check 3 records previously created are selected in Order/Invoice grid (one for previous invoice and two for this invoice) and an overpayment of 50
      Clic on Cancel Button

Test Plan II
  Repeat the same previous steps using Reversed Sales Invoice as Transaction Document for the invoice and check only negative records are selected

Test Plan III
  Go To Payment In window and create a new record:
    Receiving from: Alimentos y Supermercados, S.A
    Amount: 100
    Clic on Add Details button and check that the selected record have an amount of 100
      Edit the Actual Payment to 400 and check the amount field in selected lines are properly updated and no overpayment is shown (only positive amounts are selected)
      Deselect all lines and edit the Actual Payment with a negative amount and check the amount field in selected lines are properly updated (only negative amounts are selected)