Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045081Openbravo ERP09. Financial managementpublic2020-09-17 12:032020-10-20 09:32
maite 
Triage Omni OMS 
urgentmajoralways
closedfixed 
5
 
PR21Q1 
Core
No
0045081: Credit details appear in Aging report although prepaid order is closed
As the prepaid order is closed it can not be invoiced, so there is no way to clean the credit details from Aging reports
1. Register Sales Order with total amount 100
2. Run Add Details process to register prepayment of 100
3. Close the order. Payment plan info will be updated showing an outstanding amount of -100
4. Register another Sales Order for same org and bp with total amount 150
5. Run Add Details process to register prepayment of 150 setting:
  5.1. payment amount will be 50
  5.2. select detail of 150
  5.3. select detail of -100
6. Run Receivables Aging Report and realize that 2 credit details are shown for this bp: one detail of 100 and another of 50. This is correct
7. Create Goods Shipment for the order of 150
8. Create Sales Invoice for the order of 150
9. Run Receivables Aging Report and realize that 2 credit details are still shown for this bp: one detail of 100 and another of -100 (as the detail of 150 has been invoiced, so it is not shown any more). These details are related with a Closed order, so there is no way to invoice them to be hidden in the report
No tags attached.
related to feature request 0044881 new Triage Omni OMS Closed orders prepaid with a total amount of 0 are shown in the Aging Balance 
related to design defect 0045143 closed inigo_lerga Outstanding Amount not updated when closing Sales Order in Oracle 
Issue History
2020-09-17 12:03maiteNew Issue
2020-09-17 12:03maiteAssigned To => Triage Finance
2020-09-17 12:03maiteModules => Core
2020-09-17 12:03maiteTriggers an Emergency Pack => No
2020-09-17 12:03maiteIssue Monitored: networkb
2020-09-17 12:08maiteResolution time => 1602108000
2020-09-17 17:31ngarciaRelationship addedrelated to 0044881
2020-09-22 15:41dmiguelezNote Added: 0123292
2020-09-22 15:41dmiguelezTypedefect => design defect
2020-09-23 08:05inigo_lergaStatusnew => scheduled
2020-09-23 13:38hgbotNote Added: 0123324
2020-09-24 12:18inigo_lergaNote Added: 0123337
2020-09-25 12:26inigo_lergaRelationship addedrelated to 0045143
2020-09-25 12:30inigo_lergaNote Edited: 0123337bug_revision_view_page.php?bugnote_id=0123337#r21749
2020-10-07 16:25inigo_lergaNote Edited: 0123337bug_revision_view_page.php?bugnote_id=0123337#r21772
2020-10-20 09:32hgbotResolutionopen => fixed
2020-10-20 09:32hgbotStatusscheduled => closed
2020-10-20 09:32hgbotFixed in Version => PR21Q1
2020-10-20 09:32hgbotNote Added: 0123792
2020-10-20 09:32hgbotNote Added: 0123793
2020-10-20 09:32hgbotNote Added: 0123794

Notes
(0123292)
dmiguelez   
2020-09-22 15:41   
Given this scenario:
  - A Sales Order
  - Without an Invoice or a Goods Receipt
  - With an associated Payment (a Pre-Payment)

The Order is closed.
In this case, the generated credit is associated to the Order, however, the Order is already closed and no more actions can be done against it (like invoicing it)

That is why, if this situation happens, when closing the Order the generated credit should be moved to a different Payment and reflected as 'Generated Credit' properly.
(0123324)
hgbot   
2020-09-23 13:38   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/179 [^]
(0123337)
inigo_lerga   
2020-09-24 12:18   
(edited on: 2020-10-07 16:25)
--Test Plan Mantis--

As the F&B International Group Admin role in Backend:
1º- Go to Sales Order window and create a new record with
    'Restaurantes Luna Llena, S.A.' as Business Partner.
2º- Go to Lines Tab and create a new record with 'Cola 0,5L'
    Product and 100 units as Ordered Quantity.
3º- Book the Sales Order.
4º- Press the Add Payment button and verify '95.41' (Expected Payment)
    as Actual Payment.
5º- Close the Sales Order. Check in Payment Plan Tab that Outstanding amount
    is '-95.41' (Negative Received Payment).
6º- Create a new Sales Order with 'Restaurantes Luna Llena, S.A.'
    as Business Partner.
7º- Go to Lines Tab and create a new record with 'Cola 0,5L'
    Product and 150 units as Ordered Quantity.
8º- Book the Sales Order.
9º- Press the Add Payment button and set '47.7' as Actual Payment.
    Select both records (143.11 and -95.43 of Outstanding Amount).
    Press Done.
10º- Go to Physical Inventory window and create a new record.
11º- Go to Lines Tab and create a anew record with 'Cola 0,5L' Product
     and 10000 as Quantity count.
12º- Process the Physical Inventory.
13º- Go to Create Shipments from Orders window and select the record with 150
    units of Cola.
    Press Process button.
14º- Go to Create Invoices from Orders window and select the record with 150
    units of Cola.
    Press Process button.
15º- Go to Receivables Aging Schedule window and press the View button.

#In this moment a Warning message is thrown letting the user know that there are no
records to show. This is correct as now the records (with same conditions and from the
same order) that have equal amounts but with oposite sign should counter each other
and not be considered for this report, as their result is 0.#

(0123792)
hgbot   
2020-10-20 09:32   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 10a5e593bc37842b2cac48403b1177a260507600
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-10-20T07:30:56+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/10a5e593bc37842b2cac48403b1177a260507600 [^]

fixes BUG-45081:Equal payments with oposite signs counteract

In Aging report, two records (with same conditions and from the
same order) that have equal amounts should counter each other
and not be considered as their result is 0.

---
M src/org/openbravo/erpCommon/ad_reports/AgingDao_data.xsql
---
(0123793)
hgbot   
2020-10-20 09:32   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/179 [^]
(0123794)
hgbot   
2020-10-20 09:32   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 423beb3de276d88b5111e28cdccf4a4cbed879de
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-10-20T07:30:56+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/423beb3de276d88b5111e28cdccf4a4cbed879de [^]

related to ISSUE-45081: Applied Code Review changes

In previous commit some values were hardcoded when
they should be parameters. This patch fixes that.

---
M src/org/openbravo/erpCommon/ad_reports/AgingDao_data.xsql
---