Openbravo Issue Tracking System - Modules
View Issue Details
0037974ModulesService Contract Managementpublic2018-02-20 11:392018-03-12 12:45
maite 
collazoandy4 
urgentmajoralways
closedinvalid 
5
 
 
vmromanos
0037974: "Copy record" button should also copy "Cover To" date
Contract created using "Copy record" button will fail when running "Update Invoice Plan" process because "Cover to" date is null
0. Configure Contract Invoice Schedule: http://wiki.openbravo.com/wiki/Contract_Invoice_Schedule [^]
1. Create Contract header. Set any BP and today's date
2. Mark it as "automatic renewal" and set previous Contract Invoice Schedule. Set any duration and duration unit. Realize that "Cover to" date is calculated
3. Create record in "Invoice Plan Master" tab
4. Run "Copy record" process and realize that new contract has "Cover To" date null. If you process contract and run "Update Invoice Plan" process it will fail due to following error

b6af10f1 2018-02-20 04:10:48,928 [ajp-bio-127.0.0.1-8009-exec-5] ERROR org.openbravo.service.db.DalBaseProcess - The process org.openbravo.contract.services.process.UpdateInvoicePlan has thrown an exception.
java.lang.NullPointerException
        at java.sql.Timestamp.compareTo(Timestamp.java:513)
        at org.openbravo.contract.services.process.UpdateInvoicePlan.doExecute(UpdateInvoicePlan.java:84)
        at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:82)
        at org.openbravo.scheduling.ProcessRunner.execute(ProcessRunner.java:83)
        at org.openbravo.erpWindows.org.openbravo.contract.Contract.Contract8F9CA53965834621900034A7C378127E.doPost(Contract8F9CA53965834621900034A7C378127E.java:372)
No tags attached.
png error_contract_template.png (99,882) 2018-03-12 12:39
https://issues.openbravo.com/file_download.php?file_id=11633&type=bug
png

png template_info.png (16,622) 2018-03-12 12:42
https://issues.openbravo.com/file_download.php?file_id=11634&type=bug
png
Issue History
2018-02-20 11:39maiteNew Issue
2018-02-20 11:39maiteAssigned To => Triage Finance
2018-02-20 11:39maiteResolution time => 1520895600
2018-02-20 11:40maiteIssue Monitored: networkb
2018-03-02 14:08dmiguelezAssigned ToTriage Finance => collazoandy4
2018-03-06 21:19collazoandy4Statusnew => scheduled
2018-03-06 23:30collazoandy4Note Added: 0103047
2018-03-12 12:39vmromanosFile Added: error_contract_template.png
2018-03-12 12:42vmromanosFile Added: template_info.png
2018-03-12 12:45vmromanosReview Assigned To => vmromanos
2018-03-12 12:45vmromanosNote Added: 0103152
2018-03-12 12:45vmromanosStatusscheduled => closed
2018-03-12 12:45vmromanosResolutionopen => invalid

Notes
(0103047)
collazoandy4   
2018-03-06 23:30   
Test Plan
  Go to Contract Type window and create a new record:
    Name: Contract Type
  Go to Contract window and create a new record:
    Contract Type : Contract Type
    Search Key/Name: Empty Contract
    Business Partner: Alimentos y Supermercados, S.A
    Starting Date: Today
    Clone the record created and check the process ends with no errors
Test Plan II
  Go to Contract Invoice Schedule window and create a new record:
    Name: IssueInvoiceSchedule
    Invoice Frequency: Monthly
  Go to Contract window and create a new record:
    Contract Type : Contract Type
    Search Key/Name: Issue Contract
    Business Partner: Alimentos y Supermercados, S.A
    Starting Date: First Month Date
    Contract Invoice Schedule: IssueInvoiceSchedule
    Duration: 1
    Duration Unit: Day
    Check Covert to Date = First Month Date
    Check Renewal Date = First Mont Date + 1 day
    Clone the record created and check the process ends with no errors
      Cloned Stating Date: Today
      Cloned Covert To Date: Today
      Cloned Renewal Date = Today + 1 day
(0103152)
vmromanos   
2018-03-12 12:45   
Issue rejected.

Service Contract module MUST be always installed with the Service Contract Management Template, as it clearly says in the template's information (attached).

If so, there is a validation that forces you to fill Notice Period information (attached screenshot) which is mandatory to properly calculate the contract's renewal/cover to dates in auto-renewal contracts.

It's very important to always install the template if you want this feature to behave properly.