I am auto-generating
OpportunityLineItemSchedules when a
OpportunityLineItem record is inserted, by calculating monthly revenue based on custom business logic. Sometimes on edge-cases the
OpportunityLineItemSchedule record Revenue calculation is wrong by marginal amount.
This leads to wrong Opportunity Amount getting populated on
Opportunity as the
OpportunityLineItemProductSchedule.Revenue amount rolls up to
OpportunityProduct.TotalPrice Total Price, and the total price rolls up to