- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Error:The remove date should not before the most recent invoice date [2019-06-01].
Problem:
Customer received below error message on Quote metrics
The remove date should not before the most recent invoice date [2019-06-01].
With orders enabled, The Charge Remove date on the Removed products is from the Contract Effective date of the previous subscription. In this case, It is 2018-09-01
Previous subscription
We have enabled the debug log and found that the error is thrown from below Zuora class
if (c.isUsageCharge()) { // not need to check the last pt date for onetime&recurring charge Date lastPt = c.computeLastPt(); if (lastPt != null && UtilTools.before(removeAt, lastPt)) { throw new ValidateException(Localizer.getMessage("The remove date should not before the most recent invoice date [" + lastPt.toString() + "].", "Subs.ChargeRemovedAfterInvoiceDate", lastPt.toString())); } }
As per above code, this error will occur if you remove a usage charge which is already invoiced and the charge removed date is earlier than the process through date.
I verified the Process Through the date for the removed charges and it is [2019-06-01].
As we can see contract effective date [09/01/2018] is earlier than Process through date[latest invoice date][2019-06-01] we got below error.
Refer Below KC to find out more about LastInvoiceDate
https://knowledgecenter.zuora.com/CB_Billing/WA_Dates_in_Zuora/B_Subscription_and_Amendment_Dates
Solution:
To solve this error we need to change the Charge remove date.To change the charge remove date you need to follow below steps.
1. Add Quote Amendment related list to the quote detail page layout Or run below query in the developer console to find the records.
select id,name,createdDate, zqu__ContractEffectiveDate__c,zqu__Type__c from zqu__QuoteAmendment__c where zqu__quote__c ='a5r0c000000bn3L'
2. Find the records with the type RemoveProduct and change the contract effective date to later than 2019-06-01 and save.
3. Now please refresh the quote metrics and see if the error is resolved.
If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √