Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0047895Openbravo ERP09. Financial managementpublic2021-10-20 15:522021-10-27 11:29
lbressan 
vmromanos 
highmajoralways
closedfixed 
5
3.0PR20Q1 
 
Core
No
0047895: Remittance accounting process paused in "In process" status
Remittance accounting process paused in "In process" status in the version PR20Q1
1) Go to the "Remittances" window and create a remittance

2) Select the "Select orders or invoices" button, select the "show" check and select some invoices

3) Process the payment of each invoice

4) Go to the window "Settlement / Refund of remittances" and look for the remittances that we have created

5) Choose one and return it with some random date. The others we enter

6) Return to the "Remittances" window and in the "Returned" tab we choose one. When selecting we go to "Payment" and cancel it

7) Return to the "Returned" tab and select the button "to save or post"

8) Go to the tab "instructions to the bank" and we will post it

9) We account the one found in the tab "liquidated"

10) In the tab "instructions to the bank" we select "Delete accounting entry" and we contalibize it

11) It can be seen that it announces "This record is being accounted for by another process"

I leave the video link here:
https://watch.screencastify.com/v/FpM00QLDULevyB9B6KPZ [^]
To correct, the client connects by database, and unchecks a check called [In Process] so that the accounting process will try to post it again.
No tags attached.
Issue History
2021-10-20 15:52lbressanNew Issue
2021-10-20 15:52lbressanAssigned To => Triage Finance
2021-10-20 15:52lbressanModules => Core
2021-10-20 15:52lbressanRegression date => 2021-11-01
2021-10-20 15:52lbressanTriggers an Emergency Pack => No
2021-10-22 15:35vmromanosStatusnew => scheduled
2021-10-22 15:35vmromanosAssigned ToTriage Finance => vmromanos
2021-10-25 16:11hgbotNote Added: 0132613
2021-10-25 16:30vmromanosRegression date2021-11-01 =>
2021-10-25 16:30vmromanosNote Added: 0132614
2021-10-25 16:30vmromanosSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23237#r23237
2021-10-25 16:33vmromanosNote Edited: 0132614bug_revision_view_page.php?bugnote_id=0132614#r23239
2021-10-27 11:29hgbotResolutionopen => fixed
2021-10-27 11:29hgbotStatusscheduled => closed
2021-10-27 11:29hgbotNote Added: 0132672
2021-10-27 11:29hgbotNote Added: 0132673

Notes
(0132613)
hgbot   
2021-10-25 16:11   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.module.remittance/-/merge_requests/6 [^]
(0132614)
vmromanos   
2021-10-25 16:30   
(edited on: 2021-10-25 16:33)
Test plan:

In an environment with the Remittance module installed and configured, login into the Backoffice.
As System Admin, deactivate the accounting background process.

Change role to F&B admin.
Create a sales order with any product and book it.
Go to remittance window and create a new header. Fill mandatory fields.
Press "Select Orders or Invoices" button. In the popup, select Payment In, Orders, and set "Show payments for alternative payment methods". Now select the sales order created before. Press Process button.
Process the Remittance, select no grouping.
Go to Settle / Protest Remittances and select the remittance.
Select the line, set any accounting Date and press "Settle".
Go back to the remittance window and try to reactivate it. An error is shown "At least one of the lines contained in the remittance has already been canceled/returned.".
Now try to post the remittance. Verify it has been successfully posted (before it showed "This record is being posted by another process" warning).

(0132672)
hgbot   
2021-10-27 11:29   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.module.remittance [^]
Changeset: d693bbcf28471f0dd57545d8db2df47790c185b2
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-10-25T15:05:32+02:00
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.module.remittance/-/commit/d693bbcf28471f0dd57545d8db2df47790c185b2 [^]

Fixed ISSUE-47895: Avoid setting Remittance's processing flag.

The code was setting the processing='Y' at the very beginning of the process.
However, when there was a controlled error, the flag was kept with that value,
thus creating a conflict with the accounting process.

The fix removes the code that sets the remittance's processing flag as it
was creating a conflict with the accounting engine, and actually because
this flag was totally unused (or wrongly used) by the REM_RemittanceProcess, i.e.
the process was never checking the flag status and it wasn't committed to the
database either (so two different threads/transactions might see different statuses).

After the fix the flag is only managed and consumed by the accounting engine.

---
M src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java
---
(0132673)
hgbot   
2021-10-27 11:29   
Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.module.remittance/-/merge_requests/6 [^]