UPOINT:: CGI Scripts: FAQ

Title: @1 Invoice Me: Script updates
Check if we have updated the script since you purchased it.

20 Oct 2003: No more known bugs.

20 Oct 2003: Decimal bugs
Our customer has just pointed out these 2 decimal point-related bugs to us:

HOW YOU SEE THE 2 BUGS:
1) Create a new invoice with 4 sales items. Enter the values in THIS order:
- 8.95
- 25.00
- 7.50
- 8.95
2) Click on "Calculate Grand Total" and you will get the value "50.400000000000006" (actual value should be 50.40). This is the first bug.
3) Enter "50.40" to the field "Payment Made" and click the submit button.
4) Point to the script "reminder.cgi". In the last invoice (last created), you will see the newly added invoice although the "Outstanding" is $0.00. By right the reminder.cgi script should exclude this invoice since there is no outstanding payment. This is the second bug.

WHAT HAS ACTUALLY HAPPENED?
1) Well, the script see the "Total" as 50.400000000000006. Since only 50.40 is paid, there is still an outstanding balance of 0.000000000000006.

THE UPDATES:
1) Download the invoice.zip file and replace these 3 files (make sure to edit the variables in the configuration parts):
- admin-AddNewInvoice.htm
- invoice.cgi
- reminder.cgi

WHAT ARE THE CHANGES IN THE 3 FILES ABOVE?
1) For admin-AddNewInvoice.htm, this is added to the Javascripts part:
answer = answer*100;
answer = Math.round(answer);
answer = answer/100;

2) For invoice.cgi, this is added:
answer = answer*100\;
answer = Math.round(answer)\;
answer = answer/100\;

3) For reminder.cgi, this is added to 3 locations:
$total_amount = sprintf("%.2f",$total_amount);
$payed = sprintf("%.2f",$payed);

Special thanks to our customer, Deb Colgan (USA), who pointed out these bugs to UPOINT.

29 Sep 2003: A bug fix for reminder.cgi. Before this, the date displayed (the third line) is exactly one month earlier.

21 Apr 2002: Added the "Print Price" feature:

Optionally convert "9387.89" to "Nine thousand three hundred eighty-seven dollars and eighty-nine cents" with one click.

The "Print Price" works up to "99,999.99". If you know how to modify the Javascripts to make this value higher, please let us know.

Updates involve only the following files:
- invoice.cgi
- generateinvoice.cgi
- admin-AddNewInvoice.htm

24 Dec 2001: A fix on Auto Mailing (newsletter.cgi) redirection bug where the confirmation page for "Delete Old News" and "Send Newsletter" might not be displayed in some servers (although action has been successfully taken). To update, simply update the "newsletter.cgi".

16 Sep 2001: A minor fix on Auto Mailing (newsletter.cgi) where carriage returns in area input text box for the newsletter are ignored in emails.

27 Aug 2001: Auto Mailing features added.

27 Aug 2001: Auto Reminder features added.
The above two add-on scripts have been tested in Unix/Linux but not WinNT.

19 Aug 2001: A Javascript button in "create a new invoice", "generate a new invoice from existing invoice" and "edit invoice" forms.

  Powered by Document Publisher