product groups in quotes

Hi,
New to suitecrm and maybe I am missing something.
I am trying to create a pdf quote template wih the following layout

Group name

product_line

quote total

The problem is that if I use 2 groups it creates

Group1.
product_line
quote total

Group2
product_line
quote total

but what I need is

Group1.
product_line

Group2
product_line
quote total

A real life example would be to create 2 groups. 1 for hardware and 1 for software and give a total price for both

Am I missing something?

Hhmm I don’t know much about this, but I could have a look. What exactly do you have in your template definition?

Thanks for taking the time to answer.

This is the code I use in the pdf template

<p class="western" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; color: #232323;"><strong><span style="font-size: xx-large;">Τεχνική &amp;</span></strong></span></p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; color: #232323;"><strong><span style="font-size: xx-large;">Οικονομική Πρόταση</span></strong></span></p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; font-size: x-large;"><span style="color: #999999;">Ημερομηνία: $aos_quotes_date_entered</span></span></p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; font-size: x-large;"><span style="color: #999999;">Πελάτης: <span lang="el-GR">$billing_account_name</span> </span></span></p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"><pagebreak /></p>
<p><span style="color: #ef4035; font-size: 130%; line-height: 2;"><strong>$aos_line_item_groups_name</strong></span></p>
<table style="width: 100%; border: 0pt none; border-spacing: 0pt;">
<tbody>
<tr>
<td style="padding-bottom: 10px; width: 265px; font-weight: bold; color: #666; font-size: 85%;" height="20">Είδος</td>
<td style="padding-bottom: 10px; width: 50px; font-weight: bold; color: #666666; font-size: 85%; text-align: center;" height="20">Ποσότητα</td>
<td style="padding-bottom: 10px; width: 100px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Τιμή Μονάδας</td>
<td style="padding-bottom: 10px; width: 79px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Έκπτωση</td>
<td style="padding-bottom: 10px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Σύνολο</td>
</tr>
<tr style="height: 4px; font-size: 1px;">
<td style="height: 4px; background: #ddd; font-size: 1px;" colspan="5" valign="top" bgcolor="#dddddd" width="80%" height="2"> </td>
</tr>
<tr>
<td style="padding-top: 10px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_name </span></p>
<span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: x-small;">$aos_products_quotes_description</span></td>
<td style="text-align: center;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_qty</span></p>
</td>
<td align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_unit_price</span></p>
</td>
<td align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_discount <br /></span></p>
</td>
<td align="right">
<p style="text-align: right;"><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_total_price</span></p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #c7c7c7;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_name</span></p>
</td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;" align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_service_unit_price</span></p>
</td>
<td style="border-bottom: 1px solid #c7c7c7; text-align: center;" align="right">$aos_services_quotes_service_unit_price </td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_discount <br /></span></p>
</td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;" align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_service_total_price</span></p>
</td>
</tr>
<tr style="height: 4px; font-size: 1px;">
<td style="height: 4px; background: #ddd; font-size: 1px;" colspan="5" valign="top" bgcolor="#dddddd" width="80%" height="2"> </td>
</tr>
<tr>
<td colspan="6"> </td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td width="100%">
<table style="width: 100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80% color: #999999; border-collapse: collapse; padding: 0px; margin: 0px; height: 353px;" border="0" cellspacing="0" cellpadding="20" bgcolor="#eeeeee">
<tbody>
<tr>
<td style="line-height: 2;" valign="top"><strong style="color: #ef4035; font-size: 130%; line-height: 2;">Τρόπος Πληρωμής</strong><br />60% της αξίας της προσφοράς κατά την παραγγελία με μετρητά<br />Εξόφληση του συνόλου της τιμής κατά την παράδωση του εξοπλισμού με μετρητά<br /> Λοιπές χρεώσεις την ημερομηνία έκδοσης των αντιστοίχων παραστατικών.</td>
</tr>
<tr>
<td style="line-height: 2;" valign="top"><strong style="color: #ef4035; font-size: 130%; line-height: 2;">Τραπεζικοί Λογαριασμοί</strong><br /><strong style="color: #000;">Δικαιούχος:</strong><br /><strong style="color: #000;">Εθνική Τράπεζα: </strong>IBAN GR1234567890123344567890<br /><strong style="color: #000;">Alpha Bank: </strong> IBAN GR1234567890123456789012345</td>
</tr>
</tbody>
</table>
</td>
<td align="right" valign="top" width="auto"> 
<table style="width: 100%; border: 0pt none; border-spacing: 0pt; font-size: 110%; padding-right: 30px;">
<tbody>
<tr>
<td style="text-align: right;">
<p>subtotal</p>
</td>
<td style="text-align: right;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;"> $subtotal_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; width: 100px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">discount :</span></p>
</td>
<td style="text-align: right;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_quotes_discount_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; padding-bottom: 5px; border-bottom: 2px solid #000; width: 100px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">vat (24%):</span></p>
</td>
<td style="text-align: right; padding-bottom: 5px; border-bottom: 2px solid #000;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$tax_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; padding-top: 5px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;"><strong>total (€):</strong></span></p>
</td>
<td style="text-align: right; padding-top: 5px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$total_amount</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

The result of the above code is what you see in file “Quote_test2-5.pdf”
The desired layout is in “quote-ok.pdf”

This is clearly out of my league, I’ve never used quote templates. But I’ll try to ask for help next week.

BTW, one of my many hobbies is learning ancient Greek so I had some fun deciphering your text. :slight_smile:

Try to use the $ a_quotes_subtotal_amount keys for subtotal, $ a_quotes_total_amount for total grand, $ a_quotes_discount_amount for discounts, and $ a_quotes_tax_amount for rate

1 Like

Hi,

Thanks for replying.
What I can’t understasnd is why all text is created twice.
For me this should not happen.
Sure a user should be able to have both totals by group and a grand total. But I see no reason why the whole quote should be duplacted

I would consider this a bug. But I haven’t got the logic suitecrm is working yet regading this

Sorry, but those keys that I inserted in the previous post were to have this effect of calculating only the general amount at the end of the document. Did not work?

Using the following code displays the totals as it should.
The problem is that it duplicates the quote 2 times. It should not do that IMO
See attached pdf

<p class="western" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; color: #232323;"><strong><span style="font-size: xx-large;">Τεχνική &amp;</span></strong></span></p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; color: #232323;"><strong><span style="font-size: xx-large;">Οικονομική Πρόταση</span></strong></span></p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"> </p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; font-size: x-large;"><span style="color: #999999;">Ημερομηνία: $aos_quotes_date_entered</span></span></p>
<p class="western" style="text-align: left;"><span style="font-family: helvetica; font-size: x-large;"><span style="color: #999999;">Πελάτης: <span lang="el-GR">$billing_account_name</span> </span></span></p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"> </p>
<p class="western" style="text-align: left;" align="RIGHT"><pagebreak /></p>
<p><span style="color: #ef4035; font-size: 130%; line-height: 2;"><strong>$aos_line_item_groups_name</strong></span></p>
<table style="width: 100%; border: 0pt none; border-spacing: 0pt;">
<tbody>
<tr>
<td style="padding-bottom: 10px; width: 265px; font-weight: bold; color: #666; font-size: 85%;" height="20">Είδος</td>
<td style="padding-bottom: 10px; width: 50px; font-weight: bold; color: #666666; font-size: 85%; text-align: center;" height="20">Ποσότητα</td>
<td style="padding-bottom: 10px; width: 100px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Τιμή Μονάδας</td>
<td style="padding-bottom: 10px; width: 79px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Έκπτωση</td>
<td style="padding-bottom: 10px; font-weight: bold; color: #666666; font-size: 85%; text-align: right;" height="20">Σύνολο</td>
</tr>
<tr style="height: 4px; font-size: 1px;">
<td style="height: 4px; background: #ddd; font-size: 1px;" colspan="5" valign="top" bgcolor="#dddddd" width="80%" height="2"> </td>
</tr>
<tr>
<td style="padding-top: 10px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_name </span></p>
<span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: x-small;">$aos_products_quotes_description</span></td>
<td style="text-align: center;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_qty</span></p>
</td>
<td align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_unit_price</span></p>
</td>
<td align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_discount <br /></span></p>
</td>
<td align="right">
<p style="text-align: right;"><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_total_price</span></p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #c7c7c7;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_name</span></p>
</td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;" align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_service_unit_price</span></p>
</td>
<td style="border-bottom: 1px solid #c7c7c7; text-align: center;" align="right">$aos_services_quotes_service_unit_price </td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_products_quotes_product_discount <br /></span></p>
</td>
<td style="text-align: right; border-bottom: 1px solid #c7c7c7;" align="right">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_services_quotes_service_total_price</span></p>
</td>
</tr>
<tr style="height: 4px; font-size: 1px;">
<td style="height: 4px; background: #ddd; font-size: 1px;" colspan="5" valign="top" bgcolor="#dddddd" width="80%" height="2"> </td>
</tr>
<tr>
<td colspan="6"> </td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td width="100%">
<table style="width: 100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80% color: #999999; border-collapse: collapse; padding: 0px; margin: 0px; height: 353px;" border="0" cellspacing="0" cellpadding="20" bgcolor="#eeeeee">
<tbody>
<tr>
<td style="line-height: 2;" valign="top"><strong style="color: #ef4035; font-size: 130%; line-height: 2;">Τρόπος Πληρωμής</strong><br />60% της αξίας της προσφοράς κατά την παραγγελία με μετρητά<br />Εξόφληση του συνόλου της τιμής κατά την παράδωση του εξοπλισμού με μετρητά<br /> Λοιπές χρεώσεις την ημερομηνία έκδοσης των αντιστοίχων παραστατικών.</td>
</tr>
<tr>
<td style="line-height: 2;" valign="top"><strong style="color: #ef4035; font-size: 130%; line-height: 2;">Τραπεζικοί Λογαριασμοί</strong><br /><strong style="color: #000;">Δικαιούχος:</strong><br /><strong style="color: #000;">Εθνική Τράπεζα: </strong>IBAN GR1234567890123344567890<br /><strong style="color: #000;">Alpha Bank: </strong> IBAN GR1234567890123456789012345</td>
</tr>
</tbody>
</table>
</td>
<td align="right" valign="top" width="auto"> 
<table style="width: 100%; border: 0pt none; border-spacing: 0pt; font-size: 110%; padding-right: 30px;">
<tbody>
<tr>
<td style="text-align: right;">
<p>subtotal</p>
</td>
<td style="text-align: right;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;"> $aos_quotes_subtotal_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; width: 100px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">discount :</span></p>
</td>
<td style="text-align: right;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_quotes_discount_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; padding-bottom: 5px; border-bottom: 2px solid #000; width: 100px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">vat (24%):</span></p>
</td>
<td style="text-align: right; padding-bottom: 5px; border-bottom: 2px solid #000;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;">$aos_quotes_tax_amount</span></p>
</td>
</tr>
<tr>
<td style="text-align: right; padding-top: 5px;">
<p><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: small;"><strong>total (€):</strong></span></p>
</td>
<td style="text-align: right; padding-top: 5px;">
<p>$aos_quotes_total_amount</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

Hi,

So is this considered normal or should I report a bug ?

I don’t know this area of the app well enough to answer.

But you can always try your luck with a bug report, to see if anyone can take a look at it…