Total cost price of quote products

We're running the latest version of SugarCRM Enterprise on the Sugar Cloud.

We're wondering if anyone knows the best way to create a field against a quote that calculates the total cost price of products within that quote?

Can't seem to get access to the product costs unless I'm missing something.

Cheers,

Nathan

Parents
  • Hi Nathan Morrison,

    The relationship you want to use for rolling up the cost of the quoted line items in a Sugar Logic formula is $products. The following formula gives me a rollup of individual cost of each line item on a quote:

    rollupSum($products,"cost_usdollar")

    Here are a few notes about the formula:

    1. The formula provides you a roll up of the cost price of a single unit for each line item in your base currency.
      1. If you want to account for multiple units of a single item being sold, create a calculated field on the Quoted Line Items module to multiple the quantity by the cost_usdollar field. Then update the formula above to reference that calculated field instead of "cost_usdollar".
      2. I do not recommend using "cost_price" in any calculation as that is a value based on the specific currency associated with that line item. Using this field corrupts aggregate reporting and potentially even within the quote itself if multiple line items have different currencies.
    2. The formula unconditionally sums all line items on the quote. If you want to only sum line items with a specific characteristic, use the rollupConditionalSum formula.

    I hope that helps!

    Chris

  • Thanks Chris that is a tremendous help.

    Especially the multiple item work around.

    Regards,

    Nathan

Reply Children
No Data