By: Verlhac Gaëtan
Date: 2014-04-24
Time: 10:33
|
OTS ProblemHi everyone,
First, the problem: I want to display a double var in a percentage format. But my OTS file displays it like a string (i.e.: '0.7 instead of 70,00%). To be noticed: 1 - I use TBS and OpenTBS on Symfony2 thanks to mbence (https://github.com/mbence/OpenTBSBundle). 2 - As you can see the Bundle uses TBS 3.8.2 and OpenTBS 1.8.2 Now the code: In my PHP :
In the OTS file:
The cell where this code resides is in "Pourcentage > -12,95 % > Par défaut - Français (France)" with the format "0,00%" What I've done: 1 - Read the demo included in the download - seems like I have the same code as the example. 2 - Update TBS and OpenTBS to latest version 3 - Set $entiteQuotePart global and use onshow None of this was successful. Maybe I missed something, but I'm locked and I need your help. Thanks, Gaëtan. |
||||
By: Skrol29
Date: 2014-04-24
Time: 14:47
|
Re: Problem with tbs:percentBonjour Verlhac,
I did know OpenTBSBundle, it is good to know it. I didn't succeed in reproducing your problem. Since it looks like a simple wrapper for Symfony, I can not explain what the Percentage formating is not working. What you can do is to check the XML content near your TBS field using command OPENTBS_DEBUG_XML_CURRENT. May be the parameter "ope=tbs:percent" is split internally. |
||||
By: Verlhac Gaëtan
Date: 2014-04-28
Time: 11:03
|
Re: Problem with tbs:percentHi Skrol29,
When I'm using OPENTBS_DEBUG_XML_CURRENT I get the following:
Looks like it's ignoring the
I tried to used each tbs:xxx formatted like they are in your demo:
EDIT: Okay now I understand, I'm using OTS (Model) and not ODS. If I change my model from OTS to ODS it's working. My problem is that I cannot use ODS... From the DEBUG I can see:
Is there a way OTS acting different than ODS? |
||||
By: Skrol29
Date: 2014-04-28
Time: 23:55
|
Re: Problem with tbs:percentHi,
After the template is loaded, try:
If it works, I will make OpenTBS to recognize the OTS extension to be equivalent to ODS. |
||||
By: Verlhac Gaëtan
Date: 2014-04-29
Time: 09:35
|
Re: Problem with tbs:percentHi Skrol29,
It's working with the line you gave me. I'm grateful to you. Petite parenthèse, j'ai vu que tu parlais français. Pourrais-tu renommer le sujet en quelque chose qui contiendrai "OTS" pour qu'au cas où ce sujet aide quelqu'un ;) Et merci pour TBS et OpenTBS que j'apprécie. Cordialement, viviengaetan. |
||||
By: Skrol29
Date: 2014-04-29
Time: 17:13
|
Re: Problem with tbs:percent> Pourrais-tu renommer le sujet en quelque chose qui contiendrai "OTS"
Ok, c'est fait :) Merci à toi. |