| Author |
Message |
|
tanoinc
|
Post subject: Changing default customer tab/field Posted: Mon Jun 14, 2010 2:24 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Hi Dave,
Firstly I must say that I am successfully using PhreeBooks with all your assistance and have converted 2 other small business owners from Pastel. This is really a great piece of software.
I now serve as their main technical reference - hehehe
Anyway, In South Africa we are required by law to fill in the VAT (Value Added Tax) number of clients on all invoices. Currently under CUSTOMERS (MAINTAIN/NEW) I use the Resale License Number tab to fill in the VAT number.
Is there a way that I can change this is the code to read: VAT NO. on the screen instead of RESALE LICENSE NUMBER?
Currently we work around the problem through the form builder by including a TEXT FIELD, which then displays VAT NO. and calls the RESALE LICENSE NUMBER we specify when creating a cutomer, ex. 123456789. The output the displays as:
VAT No. 123456789 on the generated/printed document.
Therefore this question is not critical, but might be helpful on my quest to convert the entire South Africa to PhreeBooks.
Regards
|
|
 |
|
 |
|
dave
|
Post subject: Re: Changing default customer tab/field Posted: Mon Jun 14, 2010 3:48 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
To convert a single text translation I have a hook for global overrides. This will change the text but will not be affected when upgrades are installed. Add a file: /my_files/custom/extra_defines/extra_globals.php and in it replace the constant with what you want it to say, in this case add (with the appropriate php tags: Code: <php define('ACT_C_ID_NUMBER','VAT Number'); ?> Use ACT_V_ID_NUMBER for Vendor overrides. Dave
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Wed Jun 16, 2010 1:44 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Dave,
I have created the php file as instructed. Logged out and in of Phreebooks, but it still says RESALE LICENSE NUMBER. I also get various errors when I now use phreebooks and this forced me to delete the created folders and the php file.
I have attached a screenshot after I added the file.
Regards.
| Attachments: |

resalenumber.jpg [ 7.08 KiB | Viewed 654 times ]
|
_________________ ________________________ tanoISP - See More.Do more www.tano.co.za
|
|
 |
|
 |
|
dave
|
Post subject: Re: Changing default customer tab/field Posted: Wed Jun 16, 2010 3:50 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
then change the trunk file: /modules/accounts/language/en_us/language.php around line 100 to: Code: define('ACT_C_ID_NUMBER','VAT Number');
Dave
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Mon Jul 19, 2010 11:46 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
DAVE, DAVE, DAVE,
It worked like a charm, but then again... Anything you advised me on thus far, worked! Thanx a million.
Regards,
|
|
 |
|
 |
|
richardl
|
Post subject: Re: Changing default customer tab/field Posted: Fri Oct 15, 2010 8:36 am |
|
Joined: Fri Oct 15, 2010 8:31 am Posts: 29
|
Hi, missing ? in opening php tag. Code: <?php define('ACT_C_ID_NUMBER','VAT Number'); ?> and the override works fine.
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Tue Feb 08, 2011 11:18 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Dave,
How do I implement this in the version3 ?
Thanx Nino
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Tue Feb 08, 2011 11:29 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
Dave, Found it: books\modules\contacts\language\en_us\language.php Changed on line 84 
|
|
 |
|
 |
|
dave
|
Post subject: Re: Changing default customer tab/field Posted: Tue Feb 08, 2011 4:56 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
It's better to use a custom hook so that you won't have to change every time you update. Create a file: /modules/phreedom/custom/language/en_us/language.php and add the line: Code: define('ACT_C_ID_NUMBER','VAT No.');
This will override the standard define. Dave
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Wed Feb 09, 2011 9:42 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
Nice one Dave, and I thought I was getting clever...  I like your option of a hook way better. Thanx. PS. Getting good feedback here in South Africa from the people I introduced to PhreeBooks, but I will send you a mail soon.
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Mon Feb 28, 2011 11:04 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Dave,
Hoping this is the final question in terms of my custom field as described above.
I'm busy setting up a bunch of reports and forms and according to our South African trade law, we need to print the VAT number of the customer on all documents. How can I get the VAT number to display on the reports/forms.
I've changed the TEXT-PAYMENT REFERENCE field to show VAT NUMBER, now I need it to display the VAT number as changed in the previous posts.
I then tried to insert a DATA line anywhere on the report, but don't find any reference to the VAT in the options available under the DATA LINE. I've selected a few of the options available, but nothing displays.
How do I go about doing this? Thanx in advance...
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Mon Feb 28, 2011 12:39 pm |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
Dave, Ok, here's an update. I chose the quote report and made an add to the BILL TO ADDRESS and included contact.gov_id_number and the VAT number displays, but as part of the Bill to Address. I must also add that this is a DATA BLOCK. When I do the same on an invoice report (as indicated at the yellow stars) it does not display. I select to insert a DATA LINE and the positioning is 100% Attachment:
Vat_insert.jpg [ 35.72 KiB | Viewed 472 times ]
|
|
 |
|
 |
|
dave
|
Post subject: Re: Changing default customer tab/field Posted: Tue Mar 01, 2011 11:11 am |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Are you saying the title doesn't show up or the data field is blank? I have fixed some bugs regarding adding fields to reports in the Phreeform module. You may be seeing some of them trying to add fields.
Dave
|
|
 |
|
 |
|
tanoinc
|
Post subject: Re: Changing default customer tab/field Posted: Tue Mar 01, 2011 11:31 am |
|
Joined: Mon Apr 19, 2010 3:18 pm Posts: 105
|
|
Dave,
The title shows, as indicated by the screenshot, but the DATA LINE does not show. If I choose another option under data line, example.... the client zip code, it shows up.
Nino
|
|
 |
|
 |
|
dave
|
Post subject: Re: Changing default customer tab/field Posted: Tue Mar 01, 2011 12:17 pm |
|
Joined: Fri Oct 26, 2007 3:55 pm Posts: 3499 Location: Colorado, US
|
|
Are you modifying selection the Data - Gov ID Number field on the Builder Field Setup tab? There was a bug in the entry_builder form that may be causing the read error. Dave
|
|
 |
|
 |
|