|
#1
|
|||
|
|||
|
We're looking to implement an Australian payment platform called BPAY. On each invoice our company will display its unique biller code, along with a customer reference number that is unique to each customer (essentially their UID plus a check-digit). They customer enters both of these at their financial institution when they are making a payment.
I have created a custom client field where I can enter the reference number for each client and would now like to include this number in the Invoice Customization > Terms section at the bottom of the invoice. How can I achieve this? Are there place holders to access variables, as can exist in the e-mail templates? It would also be great if I could have Blesta automatically calculate the customer reference number based up on their UID, but this may be trickier as their UID probably doesn't exist when initially creating a new client. Any advice would be appreciated. Thanks! |
|
#2
|
||||
|
||||
|
How do you calculate the customer reference number using their UID?
The Invoice Customization > Terms section does not support variables. To get it to display on the invoice, you'll want to modify inc/invoice-tcpdf.class.php which draws all the elements on the invoice, and fetch & position the data how you like. If you use some type of algorithm to generate the reference number, and it just requires the UID, you may be able to do so directly in that file, rather than fetching it from the custom field. |
|
#3
|
|||
|
|||
|
Thanks Paul, you pointed me in the right direction. In case there are any other Australian users of Blesta that go down the BPAY path, here's the amended Footer() function for inc/invoice-tcpdf.class.php which will replace [crn] in the customised footer terms with a customer reference number (CRN).
For our system, we are using a zero-filled 5-digit client ID (UID) plus a MOD10 v5 check digit. Simply change the sprintf statement to accommodate larger or smaller UIDs. You could also replace $this->inv['client_id'] with $this->inv['id'] if you wanted the CRN to refer to a specific invoice rather than just the client ID. PHP Code:
|
![]() |
| Bookmarks |
| Tags |
| bpay, custom, invoice, payment, variable |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invoice and Proforma invoice | naja7host | General Discussion | 4 | 05-07-2012 07:36 AM |
| Invoice specific custom fields? (Purchase Order Number) | Hugh | Pre-Sale Questions | 5 | 05-19-2009 12:10 PM |
| Custom Invoice Lines | Telifon | API & Order Forms | 1 | 12-10-2008 05:05 PM |
| cronjob probleme !!!!! | naja7host | General Discussion | 15 | 02-07-2008 11:16 PM |