Openbravo Issue Tracking System - Modules
View Issue Details
0036646ModulesRemittancepublic2017-08-14 10:372017-08-31 12:58
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
 
aferraz
0036646: Expected date of a Remittance should not be changed to a date before the due date of orders and invoices included on it
Expected date of a Remittance should not be changed to a date before the due date of orders and invoices included on it

When selecting orders or invoices to be included in a remittance, you can only select the ones with a due date previous to the remittances due date. Once selected, you could modify the remittances due date and assign a date previous to the invoices' due date
As group admin role:
   Create two invoices, one with Immediate payment terms and the other with 30 days payment terms
   Create a remittance
   Add today as transaction date
   Add a date between invoices' due date as expected date
   Launch the Select Orders or Invoices Process and check only one of the invoices is shown
   Change the remittances expected date with a date after invoices' due date
   Launch the Select Orders or Invoices Process and check two invoices are shown
   Change the remittances due date to a date previous to invoices' due date
   Launch the Select Orders or Invoices Process and check two invoices are shown (as they were selected)
   Remove its selection
   Launch the Select Orders or Invoices Process and check two invoices are not shown
   
No tags attached.
Issue History
2017-08-14 10:37ngarciaNew Issue
2017-08-14 10:37ngarciaAssigned To => Triage Finance
2017-08-14 10:38ngarciaIssue Monitored: networkb
2017-08-14 10:38ngarciaResolution time => 1504476000
2017-08-28 10:56aferrazAssigned ToTriage Finance => markmm82
2017-08-28 15:56markmm82Statusnew => scheduled
2017-08-28 19:34markmm82Note Added: 0098668
2017-08-31 11:06hgbotCheckin
2017-08-31 11:06hgbotNote Added: 0098747
2017-08-31 11:06hgbotStatusscheduled => resolved
2017-08-31 11:06hgbotResolutionopen => fixed
2017-08-31 11:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/0128d25eb5b69d972c35006d321a869f9824de71 [^]
2017-08-31 11:06hgbotCheckin
2017-08-31 11:06hgbotNote Added: 0098748
2017-08-31 12:52hgbotCheckin
2017-08-31 12:52hgbotNote Added: 0098753
2017-08-31 12:52hgbotCheckin
2017-08-31 12:52hgbotNote Added: 0098754
2017-08-31 12:58aferrazReview Assigned To => aferraz
2017-08-31 12:58aferrazNote Added: 0098755
2017-08-31 12:58aferrazStatusresolved => closed

Notes
(0098668)
markmm82   
2017-08-28 19:34   
Test plan:
As group admin role:
1. Create a sales invoice
     Payment terms = Immediate
     Invoice Date = 2017-08-28
   Add a line to it and complete the document.
   Notice in Payment Plan Expected Date is the same at header = 2017-08-28.
2. Create another sales invoice
     Payment terms = 30 days
     Invoice Date = 2017-08-28
   Add a line to it and complete the document.
   Notice in Payment Plan Expected Date is onem month later than header's date = 2017-09-27.

3. Create a remittance
4. Add today as transaction date (2017-08-28)
5. Add a date between invoices' due date as expected date, for instance = 2017-08-30. Save record.
   Notice you can do it successfully.
6. Launch the Select Orders or Invoices Process and check only first invoice with due date previous than expected date is shown (2017-08-28)
7. Change the remittances expected date with a date after invoices' due date, for instance = 2017-09-30. Save record.
8. Launch the Select Orders or Invoices Process and check two invoices are shown. Select both lines and PROCESS.
   Notice two new remittance lines has been created.
9. Change the remittances due date to a date previous to invoices' due date, for instance 2017-09-15.
   Notice an error messge is shown after saving changes:
   "Error
    Saving failed. Expected date of a Remittance can't be changed to a date before the due date of orders and invoices included on it."
10. Cancel the change and remove the last invoice included in remittance with due date later than 2017-09-15.
11. Change again the remittances due date to a date previous to invoices' due date, for instance 2017-09-15.
    Notice this time it is possible save change and no error is shown.
12. Launch the Select Orders or Invoices Process and check just invoice previously selected is shown
13. Remove its selection. Notice process is successfully.
(0098747)
hgbot   
2017-08-31 11:06   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 0128d25eb5b69d972c35006d321a869f9824de71
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Aug 28 17:05:46 2017 -0400
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/0128d25eb5b69d972c35006d321a869f9824de71 [^]

Fixes issue 36646: Expected date of a Remittance should not be changed

When selecting orders or invoices to be included in a remittance, it is only possible
select the ones with a due date previous to the remittances due date. Once selected,
is possible modify the remittances due date and assign a date previous to the
invoices' due date, and it is not consistent with process of selecting orders and
invoices.

To avoid this issue, every time the expected date of the remittance is changed it
is validated that doesn't exists any line with a due date before than the new remittance's
expected date, if exists an error message is shown and remittance can't be saved.

---
M src-db/database/model/triggers/REM_REMITTANCE_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0098748)
hgbot   
2017-08-31 11:06   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: d87ab36953287b042fd14d73fc24809d7760f6ca
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 31 11:05:23 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/d87ab36953287b042fd14d73fc24809d7760f6ca [^]

Related to issue 36646: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0098753)
hgbot   
2017-08-31 12:52   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 513b46a1e1a17f18f6739973684a0a6445bb18cf
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 31 12:40:18 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/513b46a1e1a17f18f6739973684a0a6445bb18cf [^]

Related to issue 36646: Avoid no data found error in Oracle

---
M src-db/database/model/triggers/REM_REMITTANCE_TRG.xml
---
(0098754)
hgbot   
2017-08-31 12:52   
Repository: erp/mods/org.openbravo.module.remittance
Changeset: 627bcbae77fe89f4b2ff224165e8a0a1256ed97f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Aug 31 12:41:01 2017 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.module.remittance/rev/627bcbae77fe89f4b2ff224165e8a0a1256ed97f [^]

Related to issue 36646: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0098755)
aferraz   
2017-08-31 12:58   
Code review + Testing OK