Question
I have a quote Quote with the expiry date already in the past and when I create a copy of the quoteQuote, the date changes to "today". The effective date is not copied from the original quote Quote and in the copy it is also set to "today". So I end up with a quote Quote which has both effective and expiry dates set to "today" which is not ideal.
Is it possible to have the header logic to set the dates like this: expiry = today + x days?
...
hidden | true |
---|
...
Answer
You can try this:
Code Block | ||
---|---|---|
| ||
if (earliestEffectiveDate == null) earliestEffectiveDate = today
if (latestExpiryDate == null) latestExpiryDate = today + 90
quoteProcessor.updateField("targetDate", earliestEffectiveDate)
quoteProcessor.updateField("expiryDate", latestExpiryDate) |