Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045097Openbravo ERP09. Financial managementpublic2020-09-21 11:032020-09-24 09:03
maite 
inigo_lerga 
urgentmajoralways
closedfixed 
5
 
PR20Q4 
Core
Pre packaging ( pi )
2020-08-14
pi
https://gitlab.com/openbravo/product/openbravo/-/merge_requests/120?commit_id=b6f4205fb4260501abd5493116377646ffad38b2 [^]
No
0045097: Payment wrongly shown as Credit, as it is also associated to the invoice
Payment associated to an invoiced order appears as Credit, when it should not
1. Create Sales Order for any org and BP. Set Immediate invoice terms. Add any product and complete it
2. Create Sales Invoice for same org and BP. Run Create Lines from and select previous order. Complete
3. Go to Sales Order and run Add Payment process to pay both order and invoice
4. Run Receivables Aging Report and realize that this payment appears in Credits section. It should not appear as it is also paying the invoice
No tags attached.
depends on backport 0045099PR20Q3.1 closed inigo_lerga Payment wrongly shown as Credit, as it is also associated to the invoice 
depends on backport 0045100PR20Q2.2 closed inigo_lerga Payment wrongly shown as Credit, as it is also associated to the invoice 
caused by defect 0044788 closed inigo_lerga Wrong information in Credits section of Aging Report: the date when a prepaid order was invoiced needs to be considered 
Issue History
2020-09-21 11:03maiteNew Issue
2020-09-21 11:03maiteAssigned To => Triage Finance
2020-09-21 11:03maiteModules => Core
2020-09-21 11:03maiteResolution time => 1602453600
2020-09-21 11:03maiteTriggers an Emergency Pack => No
2020-09-21 11:34dmiguelezNote Added: 0123258
2020-09-21 11:35dmiguelezAssigned ToTriage Finance => inigo_lerga
2020-09-21 13:05inigo_lergaStatusnew => scheduled
2020-09-22 09:20inigo_lergaNote Added: 0123274
2020-09-22 09:21inigo_lergaNote Edited: 0123274bug_revision_view_page.php?bugnote_id=0123274#r21730
2020-09-22 09:21inigo_lergaNote Edited: 0123274bug_revision_view_page.php?bugnote_id=0123274#r21731
2020-09-22 09:33hgbotNote Added: 0123275
2020-09-22 11:44dmiguelezRegression level => Pre packaging ( pi )
2020-09-22 11:44dmiguelezRegression date => 2020-08-14
2020-09-22 11:44dmiguelezRegression introduced in release => pi
2020-09-22 11:44dmiguelezRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/merge_requests/120?commit_id=b6f4205fb4260501abd5493116377646ffad38b2 [^]
2020-09-22 11:44dmiguelezNote Added: 0123279
2020-09-22 11:48hgbotNote Added: 0123280
2020-09-22 11:48hgbotResolutionopen => fixed
2020-09-22 11:48hgbotStatusscheduled => closed
2020-09-22 11:48hgbotFixed in Version => PR20Q4
2020-09-22 11:48hgbotNote Added: 0123281
2020-09-22 14:36inigo_lergaNote Edited: 0123274bug_revision_view_page.php?bugnote_id=0123274#r21736
2020-09-24 09:03maiteRelationship addedcaused by 0044788

Notes
(0123258)
dmiguelez   
2020-09-21 11:34   
In the previous steps to reproduce, the date used for all documents was 'Today'

If the Aging report is executed for 'Tomorrow' the information shown is correct.

This means that the issue is related to how the dates are compared between the filter and the Invoice Date.
(0123274)
inigo_lerga   
2020-09-22 09:20   
(edited on: 2020-09-22 14:36)
--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 'Alimentos y Supermercados, S.A' as Business Partner.
2º- Set the Invoice Terms to Inmediate.
3º- Go to Lines Tab and create a new line with any product and quantity desired.
4º- Save and Book the record.
5º- Go to Sales Invoice window and create a new record with 'Alimentos y Supermercados, S.A' as Business Partner.
6º- Set Today as Invoice Date
7º- Press the Create Lines From Order button and select the ones from the previous Sales Order.
8º- Save and Complete the Sales Invoice.
9º- Go back to Sales Order window, to previous record, Press the Add payment button and Done button in the popup window.
10º- Go to Receivables Aging Schedule window, set Today as the As Of Date field and press the View button.

    #You will see that now this payment is not wrongly shown as Credit#

(0123275)
hgbot   
2020-09-22 09:33   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/175 [^]
(0123279)
dmiguelez   
2020-09-22 11:44   
Test Plan.

Also tested plan for Issue https://issues.openbravo.com/view.php?id=44788 [^]
(0123280)
hgbot   
2020-09-22 11:48   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/175 [^]
(0123281)
hgbot   
2020-09-22 11:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: fc66b38a794b2a1bbdf9775aea9b9e4571d5d46e
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-09-21T18:00:07+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/fc66b38a794b2a1bbdf9775aea9b9e4571d5d46e [^]

fixes BUG-45097:Date of order invoice properly considered

Records can be shown as Credit only if the reference date of
the report is previous to the records' invoice date.

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