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

  • It looks like we have a fix for this, which is now live.  shared this example with me to show the syntax:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    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}
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please try it out when you get a chance. I hope this helps! 

  • Thank you for sharing this!
    Could you please let me know whether it was published in any materials regarding Doc Merge? It also would be nice if incorporate this into the Quote template here https://support.sugarcrm.com/knowledge_base/doc_merge/sample_document_templates/#Sample_Document_Templates_for_Doc_Merge

    Also, I'm wondering whether anyone here managed to use the example above and create a nice-looking table with a list of Products and Comments similar to how it looks in the Sugar interface?Thinking

    Thanks

  • 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

1 2 3