Page 1 of 1

Invoice showing monthly Payments

Posted: 11 Mar 2015, 15:36
by Music Geek
Hi There,

At the moment I'm using a standard invoice that shows the total amount due. I want to add another field that will break down the total figure into a bite sized chunk, such as a monthly figure. For example if my total figure was £250 for 4 months of lessons, I want a field that will show what the monthly repayment of that total figure will be.

Any help on that would be greatly appreciated! Thanks!

Re: Invoice showing monthly Payments

Posted: 11 Mar 2015, 16:58
by brucedenney
Well... The "Sage" way of doing this is to enter a single invoice for one month and set it to repeat 4 times at monthly intervals.

I can understand why you don't want to do this.

What you could do is to add an expression to tell the customer the instalment payment terms

The expression is "This invoice can be paid in X Y Instalments of Z"

So in your example X = 4 Y= Monthly and Z = Invoice Total divided by X

The issue is we need to put X and Y into the invoice so that the report designer knows what values to use.

So if you put X in NOTES_1 and Y in NOTES_2

You can build up the expression below

Code: Select all

"This Invoice is payable in "+INVOICE.NOTES_1+" "+INVOICE.NOTES_2+" instalments of "+CURRENCY.SYMBOL+" "+formatstring("{0:f2}",INVOICE.FOREIGN_INVOICE_GROSS/StringToFloat(INVOICE.NOTES_1))
Why is it so complicated? well it isn't when you break it down.

Starting with the far right of the expression and working back.

The NOTES_1 field is text, so we can't do maths with it in its raw state so we convert it to being a number with "StringToFloat"
The resulting amount will be expressed as a string and will look strange eg 21.2 not 21.20 so the formatstring function is used to make it have 2 decimal places even if it doesn't
the rest of it is just adding strings together to make a big bit of text to say what we want.

This arrangement might be more than you need, it allows you to raise an invoice paid in 5 weekly instalments or 4 quarterly instalments or whatever you want, it is also currency aware so you can invoice in any currency you like.


Attached is a working sample.

I have also added some conditional printing, so the normal terms print if there is nothing in NOTES_1 and these special terms do not

Re: Invoice showing monthly Payments

Posted: 24 Mar 2015, 12:28
by Music Geek
Fantastic that is really helpful, thank you, I shall give that a go.

Re: Invoice showing monthly Payments

Posted: 24 Mar 2015, 12:54
by Music Geek
Hi Bruce,

Thanks so much with your help on this. Just a quick question, I've tried to preview the working template you've attached, but it comes up with an error message "input string was not in a correct formatt" Is that because I need to insert the relevant information in notes 1 and 2 as yous said before? If that's the case, how do I do that?

Thanks very much.

Re: Invoice showing monthly Payments

Posted: 24 Mar 2015, 15:28
by brucedenney
Yes

Re: Invoice showing monthly Payments

Posted: 25 Mar 2015, 15:11
by Music Geek
How do I insert that I formation into notes 1 and 2? I can't get it to work so I must be doing it wrong. Sorry! Really appreciate your help with this, thanks!

Re: Invoice showing monthly Payments

Posted: 25 Mar 2015, 16:42
by brucedenney
What are the payment terms you want to apply to this invoice?
What have you put in the field notes 1 on this invoice?
and what in notes 2 on this invoice?