16.02.2014 Views

Download - SoftMaker

Download - SoftMaker

Download - SoftMaker

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. The formula that you have to enter in place of the question marks after “Total”<br />

is: TOTAL=HOURS*PRICE.<br />

(The result of the calculation HOURS times PRICE has now been assigned to<br />

the variable TOTAL, and this result is shown in the text. What matters here is<br />

that if you later change the value of HOURS or PRICE, the content of the variable<br />

TOTAL will change accordingly.)<br />

4. After “+ 19% tax” insert the formula TAX=TOTAL*0.19 with Insert > Calculation.<br />

(This formula uses the total just calculated as a basis for a further calculation.<br />

Here too, what counts is that the result for TAX is automatically corrected for<br />

whenever the result for TOTAL changes.)<br />

5. Finally, calculate the “Amount due” as TOTAL+TAX.<br />

(In the last step we opt not to define another variable. We just want to get the<br />

result into the text; we don’t need to reference it anywhere else.)<br />

If you check the Display field names option on the View property sheet in the File<br />

> Properties dialog, the formulas in the text will become visible. The invoice then<br />

ought to look something like this:<br />

I N V O I C E<br />

{Formula: HOURS=2} hours @ {Formula: PRICE=10}<br />

------------<br />

Total<br />

= {Formula: TOTAL=HOURS*PRICE}<br />

------------<br />

+ 19% tax = {Formula: TAX=TOTAL*0.19}<br />

Amount due<br />

= {Formula: TOTAL+TAX}<br />

------------<br />

When you uncheck Display field names, you will see the results in the text again.<br />

To write an invoice for another customer, all you have to do now is change the<br />

value of HOURS. To do this, select the 2 before “hours”, invoke Insert > Calculation<br />

and simply replace the 2 in the formula with the desired number of hours.<br />

After your OK, TextMaker carries out the recalculation.<br />

Decimal places: You might find it more desirable to show the amounts with two<br />

decimal places. You can make the necessary change immediately: for each amount,<br />

select the corresponding calculation field, invoke Insert > Calculation, choose the<br />

Fixed option for Decimals and enter a “2” beside it.<br />

Manual TextMaker Calculations in the text 363

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!