When I want to generate a PDF file for the quotes , I struggle while using the PDF manger because in the template it looks good but when I open the PDF it's like a mess, please help, is there another way to make the design for the PDF?

When I want to generate a PDF file for the quotes , I struggle while using the PDF manger because in the template it looks good but when I open the PDF it's like a mess, please help, is there another way to make the design for the PDF?

Parents
  • What version of Sugar are you running?

    You should probably try DocMerge (Have not started using it myself, but it looks more promising):

    https://support.sugarcrm.com/documentation/sugar_versions/13.0/sell/application_guide/user_interface/doc_merge/

    Years ago I customized the PDF generation heavily to create prettier PDFs and format them with CSS we are still using that today in v11 (working on upgrading to 13). You can find my old post here: https://sugardeveloper.wordpress.com/2016/08/15/how-to-create-beautiful-pdfs-with-css-within-sugar/  and you are welcome to try it if you are adventurous... but I would check out Doc Merge first.

    The less you customize in code the easier it is to keep up with upgrades, and my solution is not viable for cloud customers as it requires the installation of additional software.


    FrancescaS

  • Thank you for your reply. I'm currently working with SugarCRM version 13.1, I tried Doc Merge but the  convenience of generating PDFs with a simple click for any quote adds a significant efficiency for the long term. It streamlines the process, making PDF creation readily accessible and time-effective

    tomorrow I'll see your vedio, but I have couple of questions please:

    when I open the merged document, edit and  save it, should I repeat the Doc Merge process for the saved file because it will not be saved on SugarCRM?

    Secondly, while using PDF Manager for PDF template generation, I'm facing challenges with rendering code for product set bundles. Despite checking everything, start and end codes, the expected information doesn't appear in the generated PDF. Any insights or troubleshooting steps you could share on this matter would be greatly appreciated,

  • I am not familiar with Doc Merge so I can't answer that question.

    For the products portion maybe this helps?


    support.sugarcrm.com/.../

    "

    For modules that have a subset of data in the template (e.g., Product line items in Quotes), there are special containers in the template that indicate where the repeating areas start and stop. These containers are designated by the following commands:

    • Start: {foreach from=$product_bundles item="bundle"}
    • End: {/foreach}

    "

    For bundles I have something that looks like this: (note I stripped all the formatting and the text between dashes -- are comments --, I had to remove the <! because it was not displaying them. )

    --START BUNDLE LOOP --
    {foreach from=$product_bundles item="bundle"} {if $bundle.products|@count}
      {$bundle.name}
        
        --START PRODUCT_LOOP--
        {foreach from=$bundle.products item="product"}
          -- print the products here like: --
          {$product.name} {$product.description} {$product.discount_price}{$product.line_total_amount}
        {/foreach}
        --END_PRODUCT_LOOP--
        
        -- add bundles subtotals here which includes things like: --
        {$bundle.subtotal}
        {$bundle.deal_tot}
        {$bundle.total}
    {/foreach}
    -- END BUNDLE LOOP--
        -- add grand totals here which includes things like: --
        {fields.deal_tot}
        {$fields.total}

    But I suggest you check the out of the box quote to see what they have there as these may have been altered years ago to meet our needs... sadly it's been so long since I customized quotes (since version 6, revised when quotes went sidecar in v7) I hardly remember what it looked like before the customizations.

Reply
  • I am not familiar with Doc Merge so I can't answer that question.

    For the products portion maybe this helps?


    support.sugarcrm.com/.../

    "

    For modules that have a subset of data in the template (e.g., Product line items in Quotes), there are special containers in the template that indicate where the repeating areas start and stop. These containers are designated by the following commands:

    • Start: {foreach from=$product_bundles item="bundle"}
    • End: {/foreach}

    "

    For bundles I have something that looks like this: (note I stripped all the formatting and the text between dashes -- are comments --, I had to remove the <! because it was not displaying them. )

    --START BUNDLE LOOP --
    {foreach from=$product_bundles item="bundle"} {if $bundle.products|@count}
      {$bundle.name}
        
        --START PRODUCT_LOOP--
        {foreach from=$bundle.products item="product"}
          -- print the products here like: --
          {$product.name} {$product.description} {$product.discount_price}{$product.line_total_amount}
        {/foreach}
        --END_PRODUCT_LOOP--
        
        -- add bundles subtotals here which includes things like: --
        {$bundle.subtotal}
        {$bundle.deal_tot}
        {$bundle.total}
    {/foreach}
    -- END BUNDLE LOOP--
        -- add grand totals here which includes things like: --
        {fields.deal_tot}
        {$fields.total}

    But I suggest you check the out of the box quote to see what they have there as these may have been altered years ago to meet our needs... sadly it's been so long since I customized quotes (since version 6, revised when quotes went sidecar in v7) I hardly remember what it looked like before the customizations.

Children
No Data