Updated 14/1/08
Further update. Headers in the email sending out invoices did not include a valid return path. This means that you would not be notified if message bounced.
Issue fixed as per patch submitted to Trac
http://trac.asterisk2billing.org/cgi-bin/trac.cgi/ticket/182
This reformating exercise has now been submitted to trac (ticket 177) as there has been some further modifications. The patch files are based on 1.3.1
http://trac.asterisk2billing.org/cgi-bin/trac.cgi/ticket/177
Quote:
Formating of invoices were not displaying properly. In addition, legal requirements for invoicing were not present. DID billing SQL select did not work properly
** Note ** No data was harmed in this exercise (it's all display work)
Changes
Added a function in Misc.php to format totals to two decimal places Added new section [invoice] in Defines.php to allow entry of invoice company name, address, vat number etc (these should be in the DB, but I don't have the skills to write forms)
New section of a2billing.conf
[invoice]
;Information to be displayed on Invoices emailed to customers
my_company_name = My Company
my_company_reg =
my_company_vat_num = VAT: 999 996 3760 88
my_company_add1 = Line 1
my_company_add2 = Line 2
my_company_add3 = Line 3
my_company_add4 = Line 4
Misc.php now has option to specify date format
[webui]
;Format for date display
; 1 (default) d/m/y
; 2 m/d/y ;date_format_display = 2
Files affected
/A2Billing_UI/lib/invoice.php
/A2Billing_UI/lib/Misc.php
/A2Billing_UI/lib/defines.php
/A2Billing_UI/Public/A2B_entity_invoice_detail.php
regards
Attachments
defines.patch (2.3 kB) - added by middletn on 01/05/08 12:53:34.
invoice.patch (22.3 kB) - added by middletn on 01/05/08 12:55:28.
Misc.patch (1.5 kB) - added by middletn on 01/05/08 12:55:54.
A2B_entity_invoice_detail.patch (2.2 kB) - added by middletn on 01/05/08 12:57:29.
I've cleaned up the invoice module as it wasn't displaying properly and there was no invoice number
The part in question was the script that emailed invoices to customers.
The invoice now displays properly as a PDF.
If you want to display your own info, such as company details etc, suggestion would be to replace asterisk01.jpg
Changes:
Added Invoice number and account name
Totals including tax/VAT are now rounded to two decimal places
Changed DID charges to correct value
Modified where cause not to retrieve zero value DID's
Removed connection status (who cares, it's an invoice!)
Now displays unbilled/billed on invoice and file name as appropriate
fixed image path
Installation:
Download invoice.txt and misc.txt. Then rename to .php then
simply copy invoice.php to /a2billing_UI/lib folder overwriting old ones
[Update]
Grand total wasn't being displayed.
Made changes to misc.php as follows
Added new function to display to 2 decimal places
Changed date format to European d/m/y, clearly if you are in the US, you'll need to edit misc.php to be 'm/d/y' as required
regards