How do I print the invoice amount in words or text on my invoice layouts ?

We do not actually support or recommend displaying amounts in words or text in modern day computerised invoices. This was a practice passed down from the days of handwritten invoice and is not necessary in modern computerised invoices.

However if you really must have it, try the following :

1. In Ezy Invoice, go to the Invoice form, click on [Layout & Options ] then [Design] to bring up the layout designer.

2. In the designer, click on the “Code” page towards the top left corner. Copy the code below between the {********} and paste the code to the top of the Code page in Ezy Invoice. Ensure that you copy all code including the {***Start of Code ***} and {***End of Code ***}. It must be at the top of the page pushing any existing scripts or code down.

3. Now click on the “Page1”. Add a new text object where you want the amount in words to be displayed. At the Memo dialog, copy and paste the expression below :


4. Now preview the invoice.

NOTE : The function below (CurrToWords) by default uses “Dollars” and “Cents”. If you need to change the currency, simply carefully change the text between the ‘ ‘ for CurrString and FracString.

IMPORTANT : As mentioned, we have not fully tested this function so you should check it carefully before using it.

{********************Start of Code *********************************}

{Takes a currency parameter and converts it to the currency amount in words}
function CurrToWords(Number: Currency): string;
CurrString = ‘Dollars’;
FracString = ‘Cents’;
ErrorString = ‘Value is out of range’;
min = 0;
max = 2100000000;

if (Number >= Min) and (Number <= Max) then
Result := RecurseNumber(Round(Int(Number)))+ ‘ ‘ + CurrString;
{Added for cents in a currency value}

if not(Frac(Number) = 0.00) then
Result := Result + ‘ and ‘ + RecurseNumber(Round(Frac(Number) * 100)) + FracString;
Result := Result + ‘ and Zero ‘ + FracSTring;
//Value is out of range,
result := ErrorString;

function RecurseNumber(N: Int): string;
Numbers = [‘Zero’, ‘One’, ‘Two’, ‘Three’, ‘Four’, ‘Five’, ‘Six’, ‘Seven’, ‘Eight’, ‘Nine’, ‘Ten’, ‘Eleven’, ‘Twelve’, ‘Thirteen’, ‘Fourteen’, ‘Fifteen’, ‘Sixteen’, ‘Seventeen’, ‘Eighteen’, ‘Nineteen’];
Tenths = [‘Zero’, ‘Ten’, ‘Twenty’, ‘Thirty’, ‘Forty’, ‘Fifty’, ‘Sixty’, ‘Seventy’, ‘Eighty’, ‘Ninety’];

case N of
1..19: Result := Numbers[N];
20..99: Result := Tenths[N div 10] + ‘ ‘ + RecurseNumber(N mod 10);
100..999: Result := Numbers[N div 100] + ‘ Hundred ‘ + RecurseNumber(N mod 100);
1000..999999: Result := RecurseNumber(N div 1000) + ‘ Thousand ‘ +
RecurseNumber(N mod 1000);
1000000..999999999: Result := RecurseNumber(N div 1000000) + ‘ Million ‘
+ RecurseNumber(N mod 1000000);
1000000000..4294967295: Result := RecurseNumber(N div 1000000000) + ‘ Billion ‘ +
RecurseNumber(N mod 1000000000);
end;{Case N of}

{********************End of Code *********************************}