Openbravo Issue Tracking System - Modules
View Issue Details
0042506ModulesRemittancepublic2019-12-10 14:062019-12-31 13:32
francisco 
AtulOpenbravo 
immediatemajoralways
closedfixed 
5
 
 
2019-01-11
https://code.openbravo.com/erp/devel/pi/rev/5aff6a4a578c5ce62109e8f0a04f5a17773ba182 [^]
Production - Confirmed Stable
aferraz
0042506: Error when processing a remittance if a G/L journal was previously processed
There is an error when you try to process a remittance that previously was completed the G/L journal.

We get the error:
ERROR: To reactivate the payment, Unpost and unprocess G/L Journal of the G/L Journal Line in which payment is linked.

We believe can be related to the fix:
https://code.openbravo.com/erp/devel/pi/annotate/tip/modules/org.openbravo.advpaymentmngt/src-db/database/model/triggers/APRM_FIN_PMT_CHECK_TRG.xml [^]
related top the bug:
https://issues.openbravo.com/view.php?id=39895 [^]
Tested in 19Q3 with Remittance module:
Previous configuration:
Make sure the Financial Account you use, it has Remittance as payment method
Remittance Type has the Posting Allowed flag checked

Go to G/L Journal window
Create a header
Organization: White Valley Spain S.A
General Ledger: The White Valley Group
Create a line
Organization: White Valley Spain S.A
Account: 64000 - Sueldos y salarios
Credit: 105
Open Items flag checked
Financial Account: Bank Account 1 - White Valley Spain - EUR
Payment Method: Remittance
G/LItem: G/L Item Cash Differences

Click the button Complete

Go to Remittance window
Create a header
Financial Account: Bank Account 1 - White Valley Spain - EUR

Click Select Payment button
Choose the payment created form the G/L journal with amount 105

Click on process button
We get:
Error:
ERROR: To reactivate the payment, Unpost and unprocess G/L Journal of the G/L Journal Line in which payment is linked.
No tags attached.
caused by defect 0039895 closed AtulOpenbravo Openbravo ERP Simple G/L Journal line can be removed although it has related payment. Payment can be deleted although the journal is processed 
Issue History
2019-12-10 14:06franciscoNew Issue
2019-12-10 14:06franciscoAssigned To => Triage Finance
2019-12-10 14:30PracticsIssue Monitored: Practics
2019-12-13 08:31ngarciaTypebackport => defect
2019-12-13 08:31ngarciaResolution time => 1577746800
2019-12-13 09:35dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2019-12-30 02:45AtulOpenbravoStatusnew => scheduled
2019-12-30 02:45AtulOpenbravoNote Added: 0116564
2019-12-30 02:56AtulOpenbravoNote Added: 0116565
2019-12-30 17:20AtulOpenbravoRegression date => 2019-01-11
2019-12-30 17:20AtulOpenbravoRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/5aff6a4a578c5ce62109e8f0a04f5a17773ba182 [^]
2019-12-30 17:20AtulOpenbravoRegression level => Production - QA Approved
2019-12-30 17:20AtulOpenbravoReview Assigned To => aferraz
2019-12-30 17:33AtulOpenbravoRelationship addedcaused by 0038895
2019-12-30 17:33AtulOpenbravoRelationship deletedcaused by 0038895
2019-12-30 17:34AtulOpenbravoRelationship addeddepends on 0039895
2019-12-30 17:34AtulOpenbravoRelationship replacedcaused by 0039895
2019-12-30 18:11AtulOpenbravoStatusscheduled => acknowledged
2019-12-30 18:23AtulOpenbravoRelationship addeddepends on 0042660
2019-12-30 18:27AtulOpenbravoRelationship addeddepends on 0042661
2019-12-30 18:27AtulOpenbravoStatusacknowledged => scheduled
2019-12-31 08:22AtulOpenbravoRegression levelProduction - QA Approved => Production - Confirmed Stable
2019-12-31 09:26aferrazStatusscheduled => acknowledged
2019-12-31 09:26aferrazStatusacknowledged => scheduled
2019-12-31 09:27aferrazProjectModules => Openbravo ERP
2019-12-31 09:28aferrazModules => Core
2019-12-31 09:28aferrazTriggers an Emergency Pack => No
2019-12-31 09:28aferrazCategoryRemittance => 09. Financial management
2019-12-31 09:28aferrazTarget Version => 3.0PR20Q2
2019-12-31 09:28aferrazStatusscheduled => acknowledged
2019-12-31 09:29aferrazStatusacknowledged => scheduled
2019-12-31 11:45aferrazProjectOpenbravo ERP => Modules
2019-12-31 11:46aferrazCategory09. Financial management => Remittance
2019-12-31 11:46aferrazTarget Version3.0PR20Q2 =>
2019-12-31 12:46AtulOpenbravoNote Added: 0116587
2019-12-31 12:47AtulOpenbravoNote Edited: 0116587bug_revision_view_page.php?bugnote_id=0116587#r19989
2019-12-31 12:48AtulOpenbravoNote Edited: 0116587bug_revision_view_page.php?bugnote_id=0116587#r19990
2019-12-31 13:21hgbotCheckin
2019-12-31 13:21hgbotNote Added: 0116589
2019-12-31 13:21hgbotCheckin
2019-12-31 13:21hgbotNote Added: 0116590
2019-12-31 13:21hgbotStatusscheduled => resolved
2019-12-31 13:21hgbotResolutionopen => fixed
2019-12-31 13:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/e9c92bab4e1165839abfb333db5823d28d82e249 [^]
2019-12-31 13:27hgbotCheckin
2019-12-31 13:27hgbotNote Added: 0116591
2019-12-31 13:32aferrazNote Added: 0116592
2019-12-31 13:32aferrazStatusresolved => closed

Notes
(0116564)
AtulOpenbravo   
2019-12-30 02:45   
Test Plan
- Login as F&B International Group Admin role
- Using Enterprise Module Management, create reference data in F&B US Inc Organization.
- Make sure the Financial Account Bank Account 1 has Remittance as payment method
- Remittance Type has the Posting Allowed flag checked
- Go to G/L Journal window
Create a header
Organization: F&B US Inc
General Ledger: F&B International Group US/A/US Dollar
- Create a line
Organization: F&B US Inc
Account: 6290 - Salaries
Credit: 105
Open Items flag checked
Financial Account: Bank Account 1
Payment Method: Remittance
G/LItem: Salaries
- Create a line
- Debit 105
- Account- 1110 - Checking Account
- Click the button Complete
- Realize that GL Journal is processed successfully with Payment Created message.
- Go to Remittance window
- Create a header with Financial Account: Bank Account 1
- Click Select Payment button
- Choose the payment created form the G/L journal with amount 105
- Click on process button
- Realize that Remittance is processed successfully.
(0116565)
AtulOpenbravo   
2019-12-30 02:56   
- Login as International Group admin role
- Create a Simple G/L Journal:
      Organization: F&B US East Coast
      General Ledger: F&B International Group US/A/US Dollar
- Add a line to it:
      Account: 1110 - Checking Account
      Debit: 100
      Open Items: Y
      Select Financial Account, Payment Method, G/L Item and Payment Date
- Add another line to it:
      Account: 1120 - Funds In-Transfer
      Credit: 100
      Open Items: N
- Complete it
- If payment created is registered in financial account transaction then unpost/unprocess/delete it from Financial account Transaction tab, Navigate to the payment created in previous step.
- Check you cannot use any of the action: reactivate / reactivate and delete it for the payment.
- Error message is shown as
  "APRM_ReactivatePaymentInGLJournalLine"
- Navigate to G/L Journal, - Reactivate it
- Check a warning is shown. This is correct
- Try to delete the G/L Journal Line that has previous payment linked to it.
- Error is shown as "If you want to delete G/L Journal Line, you must first reactivate and delete its related payment."
- Navigate to the payment created in previous step
- Check you can use any of the action: reactivate / reactivate and delete it for the payment and delete the payment.
- Now again navigating to G/L Journal Line, try to delete it, line could be deleted now.


Note:Error message with search key APRM_ReactivatePaymentInGLJournalLine is not shown. Expected error message is "To reactivate the payment, Unpost and unprocess G/L Journal of the G/L Journal Line in which payment is linked."
(0116587)
AtulOpenbravo   
2019-12-31 12:46   
(edited on: 2019-12-31 12:48)
Test Plan
- Install Remittance module and apply Remittance module data set in F&B US inc Organization using Enterprise Module Management.
- Create a Payment Method "Simple Check PM" with automatic execution process : Print Check simple process
- Associate Payment Method created in Financial Account : Bank Account 1
- Realize that Financial Account has 4 payment methods: Check, Wire Transfer, Remittance and Simple Check PM
- Similarly apply payment methods for Financial Account: Bank Account 2
- Create a Simple G/L Journal:
      Organization: F&B US Inc
      General Ledger: F&B International Group US/A/US Dollar

- Add a line to it:
      Account: 1110 - Checking Account
      Credit: 100
      Open Items: Y
      Select Financial Account: Bank Account 1, Payment Method: Check, G/L Item : Funds Transfer and Payment Date: Today's Date

- Add a line to it:
      Account: 1110 - Checking Account
      Credit: 100
      Open Items: Y
      Select Financial Account: Bank Account 1, Payment Method: Wire Transfer, G/L Item : Funds Transfer and Payment Date: Today's Date

- Add a line to it:
      Account: 1110 - Checking Account
      Credit: 100
      Open Items: Y
      Select Financial Account: Bank Account 1, Payment Method: Remittance, G/L Item : Funds Transfer and Payment Date: Today's Date

- Add a line to it:
      Account: 1110 - Checking Account
      Credit: 100
      Open Items: Y
      Select Financial Account: Bank Account 1, Payment Method: Simple Check PM, G/L Item : Funds Transfer and Payment Date: Today's Date

- Add another line to it:
      Account: 1120 - Funds In-Transfer
      Debit: 400
      Open Items: N

- Complete it

- Realize that process is completed successfully with message Payment Created 4

- Navigate to Payment Out and realized that 4 payment out are created with
Payment Method: Check, Status: Payment Made
Payment Method: Wire Transfer, Status: Withdrawn Not Cleared
Payment Method: Remittance / Simple Check PM, Status: Awaiting Execution

- Try to reactivate any of the payment with status Payment Made or Awaiting Execution, error message is shown as "APRM_ReactivatePaymentInGLJournalLine"

- To reactivate payment with Status: Withdrawn Not Cleared, delete the reference of the payment from Financial Account Transaction tab and then try to reactivate, same error msg is shown as above.

- Go to Remittance window
- Create a header with Financial Account: Bank Account 2
- Click Select Payment button
- Choose the payment created from the G/L journal with amount 100 each (only payment out with payment method: Remittance & Simple Check PM and status Awaiting Execution appears in the P&E window)
- Click on process button
- Realize that Remittance is processed successfully.

Note:

-Payment's with Bank Account 1 in the header are now changed to Bank Account 2 in the Payment Out Header and Payment Method to Remittance. This is correct as Remittance is processed for this Financial Account and Remittance Payment Method.
- Similar test plan tested successfully for Payment In flow

(0116589)
hgbot   
2019-12-31 13:21   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 81ffe149ae92cab1a35f7c6380c38403975a1ea7
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Dec 31 16:10:25 2019 +0530
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/81ffe149ae92cab1a35f7c6380c38403975a1ea7 [^]

Related to BUG-42506: Apply java formatting

---
M src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java
---
(0116590)
hgbot   
2019-12-31 13:21   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: e9c92bab4e1165839abfb333db5823d28d82e249
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Dec 31 17:23:53 2019 +0530
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/e9c92bab4e1165839abfb333db5823d28d82e249 [^]

Fixes BUG-42506: Error when processing a remittance if a G/L journal
was previously processed

** Setting FIN_Payment processed flag = No before updating
payment method and financial account triggers APRM_FIN_PMT_CHECK_TRG
check condition when processing remittance.
Setting processed flag = No is not needed in case of payment
with Remittance Payment Method as they have status RPAE and
payments with this status are allowed to change Financial Account
and Payment method in the same trigger.
** Method associatePaymentWithRemittancePaymentMethod added as
setting payment method and Financial account is done at two places
in the Remittance process.

---
M src/org/openbravo/module/remittance/process/REM_RemittanceProcess.java
---
(0116591)
hgbot   
2019-12-31 13:27   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 0aa23ecd49b1cd557c61741844cf1212458af67f
Author: Álvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Dec 31 13:25:35 2019 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/0aa23ecd49b1cd557c61741844cf1212458af67f [^]

Related to BUG 42506: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0116592)
aferraz   
2019-12-31 13:32   
Code review OK