Topic: Page numbering on invoices report

Anyone care to share page numbering for invoices, Page a of b?
where a is current page
and b is total pages

2 (edited by apmuthu 01/17/2015 09:02:26 am)

Re: Page numbering on invoices report

Alann Toh from Malaysia made a few requests that may be nice if added to the FA core:

  • In reports, I would like to have page numbering x of y pages instead of only page x

  • would also like to add Attn : contact_name auto derived from branch_person / contact_name and editable during invoice input by having a text box

  • A discount textboxt at direct invoice before shipping

On checking out the PDF generation classes and the bridge functions between the older FPDI and the new TCPDF, we find that the Header3() method in excel_report.inc and pdf_report.inc (that uses the Total Number of Pages in PDF data is not used in any of the reports.

Other features of the Info() method in these files too don't go beyond using the first 4 arguments in the report files whereas, the $companylogoenable$footerenable and $footertext arguments provide for additional functionality that obviates the need for repetitive coding in the reports. The excel_report.inc defines 7 arguments in the Info() method whereas it's counterpart in the pdf_report.inc additionally defines the three arguments listed earlier.

These may well be some of FrontAccounting's best kept secrets!

Attached is one way to address Alann's first request.

The second issue notes: The contact_name issue is in flux at the moment since all such info are being collimated into the crm_persons table and some reports still reference the old one though the standard forms now avoid it. It will require custom coding and maintaining it as fixes to the core code arrives will need to be taken care of unless assimilated into the core. The Invoice memo form field is the best alternative for now.

The third request fix: A discount Text box during Invoice Input can be implemented by invoicing a dummy service item (Discounts Offered) of editable description and stating amount (negative) at use time. Otherwise, provide the discount at payment allocation time.

The current stable version 2.3 will only get critical fixes backported as the devs policy which is justified, as resources are best spent on newer versions.

Post's attachments

FA_Reports_Header3_tp.png 42.5 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Page numbering on invoices report

Thank you for the detailed insights on the above issues.

Invoice memo field - same as Invoice comments ?

Re: Page numbering on invoices report

One is the FA GUI form field called by it's label and the other is the table field name (#_sales_orders.comments) into which it gets populated.

Re: Page numbering on invoices report

Is it possible to create another comment2, populate the #_sales_orders.comment2 and have it output on invoices?
This is where the comment2 being placed top at the header, serving as Attn : xxxx (as client's unique request to have it entered during invoice creation)

Re: Page numbering on invoices report

You can use the Non Field DB Data feature of FA and design your own invoices accordingly. The functional elements are already in FA v2.4 and are available as backports in my GitHub repo's FAMods folder. This way, you do not need any extra field for it and it can remain in the same field itself using hash delimited space separated elements.

Assisting you with this is outside the scope of the FA forum and you will need to either do it yourself or seek professional assistance.

The specific function that does this job is the last one in reporting/includes/reporting.inc file in the FA v2.4 Mercurial repo.