tbh i don't understand what you mean.
can you explain further this part
These two methods are giving proper result in case on single file. I'm trying to access this from espo case. If I select it's gives an output that not matched to condition statement.
not sure what you need to achieve.
Announcement
Collapse
No announcement yet.
Compare quantity/amount in PDF-Templates (How to Debug)
Collapse
X
-
rabii, my bad I have tagged a wrong URL https://forum.espocrm.com/forum/gene...n-pdf-template Kindly check that, As suggested I have used Tcpdf
case a) {pageAbsoluteNumber} of {totalPageNumber}
case b) {pageNumber} of {totalPageNumber}
These two methods are giving proper result in case on single file. I'm trying to access this from espo case. If I select it's gives an output that not matched to condition statement.
If I select two cases, then first Page display Page 1 of 1- and second-page Display Page 2 of 1 that is wrong.
-
rabii, I have already posted on community for that, Please check and comments on https://forum.espocrm.com/forum/deve...st-not-working
-
if you are using latest version, you can use the style field which is dedicated to style all your html and it works like an charm. Espocrm is the only open source crm i know off that offer print to pdf feature. Instead of not being grateful for the work this amazing team do for free for us, just share your code and what you want to achieve and we will help you achieve it.
-
If I used the standard html then on edit its get spoiled the design and case statement. Espo is not friendly as much it should be.
-
inline style in {{#tdTag}} is not working or not supported
-
It is recommended to use tags when dealing with pdf, this is how you can achieve what you need:
PHP Code:{{#tableTag}}
{{#trTag}}
{{#ifEqual quantity "0.00"}}
{{#tdTag style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"}}<span style="font-size: 10px;">{{quantity}}</span>{{/tdTag}}
{{else}}
{{#tdTag}}Whoops is not equal 0 {{/tdTag}}
{{/ifEqual}}
{{/trTag}}
{{/tableTag}}
-
Hi arrestthepresident,
Please try #ifEqual without using styles. That is, use the opening tag before the style and the closing tag after using the style.
Leave a comment:
-
Compare quantity/amount in PDF-Templates (How to Debug)
I want to hide "quantity" in pdf-templates if it's zero but somehow i cant compare it.
I tried many ways but none work.
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#if [quantity > '0.00']}} -->{{quantity}}<!-- {{/if}} --> </span> </td>
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#if 'quantity' [>] '0.00'}} -->{{quantity}}<!-- {{/if}} --> </span> </td>
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#ifEqual 'quantity' '0.00'}} -->{{quantity}}<!-- {{/ifEqual}} --> </span> </td>
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#ifEqual quantity '0.00'}} -->{{quantity}}<!-- {{/ifEqual}} --> </span> </td>
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#ifEqual quantity 0.00}} -->{{quantity}}<!-- {{/ifEqual}} --> </span> </td>
HTML Code:<td style="background-color:#f6e7f4; border-bottom: .5px solid #CF78C3;"> <span style="font-size: 10px;"> <!-- {{#ifEqual quantity 0}} -->{{quantity}}<!-- {{/ifEqual}} --> </span> </td>
Where am i going wrong?Tags: None
Leave a comment: