Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045443Openbravo ERP09. Financial managementpublic2020-11-13 09:502020-12-01 11:24
ngarcia 
platform 
urgentmajoralways
closedfixed 
5
 
PR21Q1 
Core
No
0045443: Lines selected after sorting the Payment Proposal Expected Payments are not included on it
Lines selected after sorting the Payment Proposal Expected Payments are not included on it
As group admin role:
   Go to Payment Proposal window
   Create a header
   Open Select Expected Payments
   Clear the filter
   Select two lines
   Sort the records by Expected date
   Notice the lines remain selected
   Select a new line and submit
   Check only the last selected line is included in the Payment Proposal Lines
No tags attached.
Issue History
2020-11-13 09:50ngarciaNew Issue
2020-11-13 09:50ngarciaAssigned To => Triage Finance
2020-11-13 09:50ngarciaModules => Core
2020-11-13 09:50ngarciaTriggers an Emergency Pack => No
2020-11-13 09:51ngarciaIssue Monitored: networkb
2020-11-13 09:52ngarciaResolution time => 1607036400
2020-11-13 12:17dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2020-11-22 18:06AtulOpenbravoStatusnew => scheduled
2020-11-23 17:53dmiguelezNote Added: 0124574
2020-11-23 17:54dmiguelezAssigned ToAtulOpenbravo => platform
2020-11-26 14:11hgbotNote Added: 0124632
2020-12-01 11:24hgbotResolutionopen => fixed
2020-12-01 11:24hgbotStatusscheduled => closed
2020-12-01 11:24hgbotNote Added: 0124673
2020-12-01 11:24hgbotFixed in Version => PR21Q1
2020-12-01 11:24hgbotNote Added: 0124674

Notes
(0124574)
dmiguelez   
2020-11-23 17:53   
The root cause of the problem is in the 'Payment' column and the fact that the value in this column is lost when reordering the Pop up.

Log in as F&B International Group Admin

Go to Payment Proposal Window and create a new record with the default values
(Organization: F&B España Región Norte, Payment from: Caja-EUR)
Click on 'Select Expected Payments' button
Remove the filter.
There should be some lines shown, select 2 of them.
Check that each time the user selects a line, the value in the 'Payment' column is modified from 0 to the Expected amount value.

Reorder the fields by the 'Expected Amount' column.
The value of the 'Payment' columns is reset to 0 (since the query against the view behind the data is launched again)
Any manual or automatic change done the value of the 'Payment' column is done.

Afterwards, the code discards all the records with 0 amount in this column.

This is a problem because a user might have introduced values in this column in several records and that work will be lost by reordering the table.
(0124632)
hgbot   
2020-11-26 14:11   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/248 [^]
(0124673)
hgbot   
2020-12-01 11:24   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/248 [^]
(0124674)
hgbot   
2020-12-01 11:24   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b6b916aafeae93895a53226ffffe837d1576e6fe
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-12-01T10:59:22+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b6b916aafeae93895a53226ffffe837d1576e6fe [^]

Fixes ISSUE-45443: Lines selected after sort Payment Proposal Payments are not included

Payment Proposal Expected Payments Pick&Execute window was losing the
Payment field value when a filter was applied or a column was sorted.
This was due to the record being modified but not the editValues from
the grid. A refactor has been made on the onSelect event handler to fix
this and use grid.setEditValue instead of the old record.value = ...

Also, a validator was also modifying values from the record, to avoid
this, the logic that modified the payment + difference has been
extracted to an onChange event handler.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js
---