Infor CRM Web Client – Quotes Do Not Total For Negative Product Amounts

We recently had a customer report an issue to us that when adding products to a Quote in the Infor CRM web client, that the subtotal values do not take into account products where the price has been set to a negative amount. If is possible to set the Adjusted Price of a Quote line item to be negative but when the Quote subtotal is calculated those line items are treated like a $0 amount.

I can see the reasoning behind this- why would you essentially allow paying out money on a quote? However the fact is that the line items do allow you to set the Adjusted Price below $0 but the totals then do not reflect that accurately.

This code is contained in the Sage.Saleslogix.BusinessRules.dll assembly in the Sage.SalesLogix.Quote.Quote class in a method called SetQuoteTotal. That method calls another internal member called GetAdjustedPrice. That is where it actually ignores the negative amounts, as shown here:

    public static double GetAdjustedPrice(IQuote quote)
      return quote.QuoteItems.Sum<IQuoteItem>((Func<IQuoteItem, double>) (item =>
        if (!item.ExtendedPrice.HasValue || item.ExtendedPrice.Value <= 0.0)
          return 0.0;
        return item.ExtendedPrice.Value;

It is a pain that these methods are sealed in the BusinessRules assembly. This means that you can’t get to and change their behavior. Instead you would have to find everywhere that the SetQuoteTotal is called, which is accessible and instead re-do your own calculations after the standard code runs. From what I can teel this code is run from 3 exposed spots:

  • The Quote Entitiy’s OnBeforeInsert event
  • The Quote Entitiy’s OnBeforeUpdate event
  • The Quote RefreshPricing BusinessRule- this is called from the Quote Snapshot custom smartpart.

There may also be other internal calls to the SetQuoteTotal from other spots in compiled assemblies however.


Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published.

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!