DocMerge - Quotes module - How to handle comment line with quoted line items

Hello,

I am wondering how to handle Quotes template using DocMerge.

On the definition screen, you can organize your quote details with group (bundle), quoted line items and comments.

My problem is that I don't know how to manage the comments and display them in the correct position according to the quote definition.

Any sample template is welcome.

Fred

Parents
  • Hi Fred,

    Unfortunately there is no good way to organize comments and products.

    This is an example of how you can get comments and products from a product bundle:

    {#product_bundles}
      {name}
      {#product_bundle_notes}
        {description}
      {/product_bundle_notes}
      {#products}
        {name}
      {/products}
    {/product_bundles}

  • Hi ,

    I was hoping that someone found a way to mix COMMENTS and PRODUCTS together in order to be abble to generate a quote document that reflects the screen configuration.

    I suggest that they should be a "dynamic" additionnal array build for quote printing, that merge comment and product line, so user can generate a template using the current product or comment array, but also the merge one if required.

    Fred

  • That would be a nice improvement for sure. If you want to share your interest for the feature request, you could contact Support so they can file an idea that will be used to track all requests for it. Sorry we don't have the capability right now though!

  • Just curious if you have seen any traction on improving this? We made a case for it months ago but have not heard much about fixing it.

  • Hi ,

    This fix was performed outside of our standard release cycles as it was added to the backend Doc Merge service, not to the core Sugar code, so it isn't tied to a specific version/release. Due to this, there have not yet been any published materials (including release notes) that reference this issue, other than this thread. 

    I've submitted an Idea to the team that handles our documentation to add the example per your request. That can be viewed at https://portal.sugarondemand.com/#supp_Bugs/235ab6ee-1f77-11ef-880f-027f079f78e1 and our team will review it further for upcoming changes to our documentation. 

    I hope this helps! 

    -Alex

  • Has anyone tried this? I am using 14.1.0 and I am getting the error, "Invalid closing tag on #product_bundle_items"

  • Hi Norm, I know it was tested on 14.1.0 after the fix was deployed and was confirmed to work. I would recommend submitting a case with a copy of your exact file so that Support can double-check the complete syntax.

    Hope it's just a quick tweak to get it working!

    -Brenda

  • I can Confirm that i get the same error.

  • Working with the above copy

    After copying the text from the above comment into Word, I manually rewrote the line: {/product_bundle_items}.

    Once I made the change and uploaded it as a Document Template, it worked without any issues.

    Copying and pasting from different systems can be tricky since various applications might add their own formatting, which Word can interpret unpredictably. It seems there was something subtle about that specific line in this version that caused the "Invalid closing tag on #product_bundle_items" error.


    An alternate copy to try

    Copying and pasting the below version might work without requiring any editing:

    Quote Name: {name}

    {#product_bundles sort='position:asc'}
    Bundle Name: {name}

    {#product_bundle_items limit='-1'}
    {if (_module=='ProductBundleNotes')}
    Comment: {description}
    {else}
    Line Item: {name}
    Line item price: {discount_price}
    {endif}
    {/product_bundle_items}

    {/product_bundles}


    Doing this in a table

    Quote Name: {name}
    {#product_bundles sort='position:asc'}
    Bundle Name: {name}

    Quantity Service/Product Unit Price Total

    {#product_bundle_items limit='-1'}{if (_module=='ProductBundleNotes')}{else}{quantity}{endif}

    {if (_module=='ProductBundleNotes')}{description}{else}{name}{endif} {if (_module=='ProductBundleNotes')}{else}{discount_price}{endif} {if (_module=='ProductBundleNotes')}{else}{total_amount}{endif}{/product_bundle_items}

    {/product_bundles}

  • Hi  ,

    I've identified a workaround to the issue with Alex's comment.
    Please see my reply comment here for more information: 
    sugarclub.sugarcrm.com/.../32109

  • Hi  ,

    I've identified a workaround to the issue with Alex's comment.
    Please see my reply comment here for more information: 
    sugarclub.sugarcrm.com/.../32109

  • Hi  ,

    I have provided an example of using this in a table as well in this comment:
    sugarclub.sugarcrm.com/.../32109

  • Same error 

    Invalid closing tag on #product_bundle_items

    .

    CRM Business Consultant

  •   Hello Patrick, I succesfully implemented this into my quote templates. However, if I add @index for line numbers it now reserves numbers for the ProductBundleNotes.

    Exaple: Product | Note | Product results into line number 1 | 2 (hidden) | 3

    This is probably because the @index tag is now looking at ProductBundleItems instead of Products.

    Any idea's on how to use the index-tag, but make it look at the product level line-number (index)?

    Kind regards, Frank

Reply
  •   Hello Patrick, I succesfully implemented this into my quote templates. However, if I add @index for line numbers it now reserves numbers for the ProductBundleNotes.

    Exaple: Product | Note | Product results into line number 1 | 2 (hidden) | 3

    This is probably because the @index tag is now looking at ProductBundleItems instead of Products.

    Any idea's on how to use the index-tag, but make it look at the product level line-number (index)?

    Kind regards, Frank

Children
  • Code used in template:

    {#product_bundles sort='position:asc'}{name}{#product_bundle_items}

    {if (_module=='Products')}{@index} | {quantity} | {name} | {discount_price} | {discount_rate_percent}% | {net_price_per_c} | {net_deal_subtotal_c}
    {long_product_explanation_c}
    {else}{description}{endif}

    {/product_bundle_items}{/product_bundles}