Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030260Openbravo ERP09. Financial managementpublic2015-06-26 13:562019-01-09 15:11
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q4 
vmromanos
Core
No
0030260: It is not possible to Reactivate a GL Journal with any line defined as "open items"
It is not possible to Reactivate a GL Journal with any line defined as "open items"
1. Register GL Journal for F&B US East Coast organization
2. Add Header
3. Add line setting any account and debit amount=100
4. Add line setting any different account and credit amount=100. Check "Open items" section and define Financial Account, Payment Method, GL Item and DAte
5. Process header
6. Try to Reactivate journal and following error will be raised "Error:
There is a related Payment for the Journal Line/s with No.: 20". This is OK
7. Navigate to related payment from journal line and run "Reactivate" or "Reactivate and delete lines"
8. Come back to GL Journal and try to Reactivate it again. Same error is received but you should be able to reactivate journal document
When "Reactivate" or "Reactivate and delete lines" process is run for a payment in/out created from a gl journal, link between payment and journal should be deleted
No tags attached.
related to defect 0039895 closed AtulOpenbravo Simple G/L Journal line can be removed although it has related payment. Payment can be deleted although the journal is processed 
Issue History
2015-06-26 13:56maiteNew Issue
2015-06-26 13:56maiteAssigned To => Triage Finance
2015-06-26 13:56maiteModules => Core
2015-06-26 13:56maiteResolution time => 1438380000
2015-06-26 13:56maiteTriggers an Emergency Pack => No
2015-06-26 13:57maiteIssue Monitored: networkb
2015-07-02 11:04AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-07-02 11:04AtulOpenbravoStatusnew => scheduled
2015-07-07 15:42vmromanosNote Added: 0078709
2015-07-10 08:04AtulOpenbravoNote Added: 0078747
2015-07-10 08:08AtulOpenbravoNote Added: 0078748
2015-07-10 11:58hgbotCheckin
2015-07-10 11:58hgbotNote Added: 0078749
2015-07-10 11:58hgbotStatusscheduled => resolved
2015-07-10 11:58hgbotResolutionopen => fixed
2015-07-10 11:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/766e0ed013ed798d723865abd6b02ba079afbdb4 [^]
2015-07-10 11:58hgbotCheckin
2015-07-10 11:58hgbotNote Added: 0078750
2015-07-10 11:59vmromanosReview Assigned To => vmromanos
2015-07-10 11:59vmromanosNote Added: 0078751
2015-07-10 11:59vmromanosStatusresolved => closed
2015-07-16 11:59gorka_gilFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/766e0ed013ed798d723865abd6b02ba079afbdb4 [^] => http://code.openbravo.com/erp/devel/pi/rev/cde83b6e025c [^]
2015-07-16 12:00gorka_gilNote Edited: 0078749bug_revision_view_page.php?bugnote_id=0078749#r9040
2015-07-16 12:00gorka_gilNote Edited: 0078750bug_revision_view_page.php?bugnote_id=0078750#r9042
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079487
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079488
2019-01-09 15:11ngarciaRelationship addedrelated to 0039895

Notes
(0078709)
vmromanos   
2015-07-07 15:42   
Proposed solution:
1. Always allow to reactivate a GL Journal, even in the case it contains lines linked to a payment. Only in that scenario show a warning message informing the user about that situation. The message could be the following:
"There is a related process Payment for the Journal Line/s with No.: %s.
If you want to modify the Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date of any of these lines, you must first reactivate and delete its related payments."

2. Add an onDelete="setnull" constraint to the GL_JOURNALLINE.FIN_PAYMENT_ID column.

3. Add an error and avoid the user to modify the Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date when the line is associated to a fin_payment_id (you can use a callout or an EventEntityObserver). Error message: "If you want to modify the Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date of this line, you must first reactivate and delete its related payment."
(0078747)
AtulOpenbravo   
2015-07-10 08:04   
Test Plan
1. Register GL Journal for F&B US East Coast organization.
2. Add Header.
3. Add line setting any account and debit amount=100.
4. Add line setting any different account and credit amount=100. Check "Open items" section and define Financial Account, Payment Method, GL Item and payment date.
5. Process header.
6. Try to Reactivate journal. Check that journal entry is reactivated with following warning message "Warning: There is a related Payment for the Journal Line/s with No.: 20. If you want to modify the Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date of any of these lines, you must first reactivate and delete its related payments."
7. Go to line 20 and try to edit Credit amount or Debit Amount or Open Item flag.
8. Error message will be shown as "If you want to modify the Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date of any of these lines, you must first reactivate and delete its related payments."
9. Go to related payments. Using Reactivate and delete lines delete the lines and also the payment.
10. Navigate back to previous Journal Line No 2. Check that related payment in the line is blank. User can edit Credit/Debit/Financial Account/Payment Method/GL Item/Payment Date of the line.
(0078748)
AtulOpenbravo   
2015-07-10 08:08   
Alternate Test Plan

Complete and reactivate a simple journal entry

1. Register GL Journal for F&B US East Coast organization.
2. Add Header.
3. Add line setting any account and debit amount=100.
4. Add line setting any different account and credit amount=100.
5. Complete the journal entry. Check that it is successful.
6. Post the journal entry. Check that it is successful.
7. Unpost the journal entry. Check that it is successful.
8. Reactivate the journal entry. Check that it is successful.
(0078749)
hgbot   
2015-07-10 11:58   
(edited on: 2015-07-16 12:00)
Repository: erp/devel/pi
Changeset: cde83b6e025c
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jul 10 11:24:17 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/cde83b6e025c [^]

Fixes Issue 30260:It is not possible to Reactivate a GL Journal with any
line defined as "open items"

Reactivating of GL Journal is allowed when its line/s have related payment
with a warning message. If user tries to change credit / debit or open item
flag of line having related payment event handler takes care to avoid user
to update line. Warning/Error message guides user to reactivate and delete
related payment inorder to update credit/debit, financial account, payment
method, glitem, payment date of the line.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java
M src-db/database/sourcedata/AD_MESSAGE.xml
A src/org/openbravo/event/GLJournalLineEventHandler.java
---

(0078750)
hgbot   
2015-07-10 11:58   
(edited on: 2015-07-16 12:00)
Repository: erp/devel/pi
Changeset: 45f294a02a37
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jul 10 11:56:32 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/45f294a02a37 [^]

Related to issue 30260: Code review improvements

FIN_AddPaymentFromJournal.java:
1. Removed unused variables
2. Warning message improved to inform the user that the reactivation process was succesfull

GLJournalLineEventHandler.java:
1. Removed TODO comment
2. Moved check stuff to a separate method
3. Cast objects to compare to BigDecimal and Boolean and use the right comparator methods

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java
M src/org/openbravo/event/GLJournalLineEventHandler.java
---

(0078751)
vmromanos   
2015-07-10 11:59   
Code review + testing OK
(0079487)
hudsonbot   
2015-08-20 23:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8c91718397a5 [^]
Maturity status: Test
(0079488)
hudsonbot   
2015-08-20 23:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8c91718397a5 [^]
Maturity status: Test