Ticket #177 (closed defect: invalid)

Opened 1 year ago

Last modified 5 hours ago

Fix to formating of invoices and display of DID billing

Reported by: middletn Assigned to: areski
Priority: major Milestone: milestone Version 1.3
Component: Reporting Version: Branch 1.3.x
Keywords: Invoice format DID billing Cc:

Description

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

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.
Misc.patch (1.5 kB) - added by middletn on 01/05/08 12:55:54.
invoice.php (30.1 kB) - added by middletn on 01/05/08 15:10:33.
A2B_entity_invoice_detail.patch (1.6 kB) - added by middletn on 01/05/08 15:24:25.
invoice.patch (22.0 kB) - added by middletn on 01/06/08 09:52:24.

Change History

01/05/08 12:53:34 changed by middletn

  • attachment defines.patch added.

01/05/08 12:55:54 changed by middletn

  • attachment Misc.patch added.

01/05/08 13:00:46 changed by middletn

Forgot one thing, 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

*** NOTE *** All patches are based on 1.3.1

01/05/08 15:10:33 changed by middletn

  • attachment invoice.php added.

01/05/08 15:13:44 changed by middletn

pls ignore invoice.php

01/05/08 15:24:25 changed by middletn

  • attachment A2B_entity_invoice_detail.patch added.

01/06/08 08:23:56 changed by stavros

I've had a quick look at your patches these are my observations thus far:

You've got a few small problems in invoice.php now:

line 735: width="20&" instead of 20%

line 753: you close a <b> tag </b?> rather than </b>

At line 372 you've changed the name of the referenced image to 'noble strap.jpg', which doesn't seem to ship with A2B.

I suggest that to save everyone having to edit source files each time they upgrade it might be worthwhile replacing the other bare date format strings in the modified code with your new date_format setting. Rather than having a bunch of conditionals in the code why not just store the date format string in the config directly so we can select exactly what we want. Obviously if you go this route defines.php would have to select a good default (not null!) if the setting is not present. I would also define a long_date_format in the configuration file, including the hh:mm:ss and the timezone.

01/06/08 09:52:24 changed by middletn

  • attachment invoice.patch added.

01/06/08 09:59:06 changed by middletn

Patch file update with your observations. With regard to the dates, I agree, but the logic would need to go in whatever module processes defines.php, as it has to validate any format supplied.

regards

01/18/08 04:18:02 changed by areski

Hi Middletn, This is an excellent job. Can you contact me by email, there is a couple of thing I would like to discuss with you and I would like to add u in to my IM contact.

Rgds, Areski

04/29/08 03:52:50 changed by areski

can we come back on this ticket and discuss the status! It will be good to push this forward on the trunk.

Rgds, Areski

05/07/08 02:12:23 changed by areski

update please ?

Rgds, Areski

12/03/08 09:37:50 changed by areski

  • status changed from new to closed.
  • resolution set to invalid.

we need a follow up on this, I cannot commit this as it is. I will set to invalid for now.

Please redo an patch for trunk with the appropriate DB configuration.

Middletn, you can contact me if you need help on this. /Areski



Google