|
|
||||||||
|
|
|
|
|
|
|
Forums
Billings
Creating Estimates and Invoices
How do you format the results of a mathematical expression?|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Apprentice |
I'm trying the demo of Billings as an alternative to iBiz and so far so good, except for a few nagging issues with customizing the templates.
I've been using the "evaluate entire text as mathematical expression" option in a dynamic text area to display 50% of a total due. Unfortunately, this removes any formatting (font, color, alignment) I've added. I've tried using the pre/post data extraction area to do the math, but nothing I try displays anything other than the original data. I've tried reading through the documentation on the reporting engine but I can't find anything that is applicable (other than letting me know it can be done). Can anyone provide help? |
||
|
|
Marketcircle Team |
Hi Roger,
This seems to be an issue with formatting when using the "Evaluate entire text as mathematical expression". I have logged this as a bug. Another method of going about this it to write a script. First display the token you want to manipulate in a dynamic text field. Grab the key path from a token you want to manipulate. This is displayed by clicking on the token. The path is located at the bottom of the window beside the label "Path", copy it for later use in the fscript. Create a script token. Select the token and paste the following into the fscript text box. --------- "The token value is passed into the variable estimateTotal" estimateTotal := element valueForKeyPath:'Insert Path Here'. "It is then divided by 2 and then passed into the variable halfTotal" halfTotal := estimateTotal / 2. "returns variable halfTotal" halfTotal. --------- You can then set the format on the dynamic text. |
|||
|
|
Apprentice |
Can you direct us to some detailed instructions on this step, Oscar? I've been naging my head against a wall with it all afternoon. |
|||
|
|
Apprentice |
D'oh…I got the solution to this from Oscar and I forgot to update this thread. Sorry everyone — here's my layman's description of how to get this working…
First step, get the path to the "token" you're going to be altering. In this case, I want to display 50% of an estimate total, so I opened up my template in the editor, entered a dynamic text box, and hunted down EstimateTotal. When you insert it, copy the path it inserts for you: Next, delete the token and find the Scripts token. Scripts is located under the "Special" tab — it's on the top right hand side next to Fields. Double click on the Scripts token (it may take a couple of tries as this area is just a bit buggy). When you do it right, a Script token will be inserted with areas for the label and the F-Script you want to use: Change the label to whatever you'd like, then copy and paste Oscar's script (or another script you'd like to use). Make sure to paste the path to your altered token you copied earlier into the script so it's affecting the right element: After that, you can right click on the token and adjust the font to how you see fit. Make sure to update the font formatting of dynamic text in the dynamic text area editor! If you do this in the main editor window, the app will crash. Personally, the font formatting was still not taking place — I had to toggle the "Allow dynamic text" checkbox a few times for the formatting to take place (another bug, and I'm not too sure if that's the right workaround, but it worked for me): So…I hope that helps everyone. There's no preview function in this comment field so pardon any formatting issues |
|||
|
|
Marketcircle Team |
Beaten to it by Roger! Thanks roger. |
|||
|
|
Marketcircle Team |
It's related to the same bug. Once you click "evaluate entire text as a mathematical expression" it sets certain attributes on the dynamic text field but when you uncheck it for some reason some of the attributes stay on the dynamic text. When you toggle "Allow dynamic text" off and on it removes all formating that was attributed to the dynamic text, therefore removing the attributes that were added when you applied "evaluate entire text as a mathematical expression". |
|||
|
|
Apprentice |
Some people had a related issue with showing the cost of a slip before the discount.
Here is the script I came up with based on Oscar's solution for Roger. ************************ SlipTotal := element valueForKeyPath:'parent.reportData.object.derivedTotal'. SlipDiscountTotal := element valueForKeyPath:'parent.reportData.object.derivedDiscountTotal'. SlipTotalWithoutDiscount := SlipTotal + SlipDiscountTotal. SlipTotalWithoutDiscount. ************************ |
|||
|
|
Apprentice |
Hi, I'm new to Billings and I was wondering if there was an easy way for people to download a template with all this complicated scripting and whatnot already done. Seems like a pretty standard feature that shouldn't be missing from Billings anyway - not something that people should have to screw arround with to implement themselves (esspecially the last post about showing the cost fo a slip before the discount - why wouldn't you want your clients to see the discounts you're giving them?!?!?!?!)
What would be really nice is a template database on the Billings website where users could submit custom templates for other users to enjoy. But for now could anybody post a template with this scripting added to it for people to see first hand what's going on? Thanks! |
|||
|
|
Apprentice |
anybody?
|
|||
|
|
Apprentice |
Are the screenshots not helpful? I tried to make it as clear as I can. I'm sure the main reason there isn't a downloadable template with custom scripting available is because of the "custom" part.
As far as uploading a template, why don't you post yours here and I'll add the script you want if I can find the time. Call me ornery but I have an issue with posting my agency's custom templates online as I worked hard to make them attractive and unique. |
|||
|
|
Veteran |
and design: this bug will be fixed in an update to be released shortly,
HTH, adam |
|||
|
|
Apprentice |
Hi - any idea when this update might be out? I'm very frustrated by not being able to easily add a VISIBLE discount that I'm offering my customers. In fact, I have to add a visible discount graphically in Acrobat before sending a bill, so it's throwing off my accounting.
|
|||
|
|
Apprentice |
What sort of visible discount are you having trouble with? A flat amount? A percentage of one item? A percentage of the total? I've been able to do all of those things fairly easily, albeit not in a "push button" way—but certainly not resorting to adding a graphic via Acrobat.
|
|||
|
|
Apprentice |
Never mind, I see you've cross posted your question elsewhere. :|
|
|||
|
|
Apprentice |
Thanks, Roger. Actually I use both discounted and flat-amount discounts. For example - prompt payment gets a discount. A "sale item" often gets a significant flat-amount discount, for example $300 off a web design. So... it would help to have both visible.
You noted the cross-pointing http://forums.marketcircle.com/eve/forums/a/tpc/f/29310...581085205#1581085205
|
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Forums
Billings
Creating Estimates and Invoices
How do you format the results of a mathematical expression?
