4,626

(65 replies, posted in Setup)

Install from the snapshot and then apply the mods and see what breaks - tmp/errors.log and apache error logs.

4,627

(1 replies, posted in Banking and General Ledger)

Check out Dimensions, Tagging and sub ledgers for addressing your needs. The FA Wiki is your friend and these forum posts are your treasure trove.

Void the invoice and create a new one - invoices change a whole lot of entries in various tables.

If you had taken a backup before and after the transaction then the diffs of the sqls can be used to change them.

Alternatively, take an sql backup before and after a new transaction and then study the differences and extrapolate it for the target invoice.

4,629

(65 replies, posted in Setup)

I have wiki-ed the discussions here starting from your first post here to help others taking their first steps in FA(iry) Land.

This appears specific to Canada - GIFI.

4,631

(48 replies, posted in Setup)

FA v2.4 changes:

most $_POST['xxx'] => get+post('xxx')
some $_POST['xxx'] => check_value('xxx')
blank strings => ALL_TEXT

All MyISAM tables now InnoDB
All closing php tags removed

Quite a few blank strings will need the ALL_TEXT replacements for easy readability. Some are single quoted and others are double quoted. Some are preceeded by == and others by !=.

Like most of the constants, ALL_TEXT is defined as a blank string in includes/types.inc file.
function check_value() is in includes/ui/ui_input.inc and checks if the $_POST element has been set (isset()).
function get_post() is in includes/ui/ui_controls.inc and retrieves the $_POST element's value if it exists or returns the second argument if it exists or a blank string.

Some good constructs like:

    if (isset($order_number) && $order_number != "") 

have got changed to

    if ($order_number != "") 

This snapshot has been tested to install correctly both for the en_US-new.sql and the en_US-demo.sql CoAs. A few of the reports have been tested and appear to be working (sample attached).

4,632

(48 replies, posted in Setup)

The version of FA 2.4 as on date is now installable (only fresh installs) without any errors.

4,633

(65 replies, posted in Setup)

1. Delete company/2 folder and reset your credentials in config_db.php so that the counter - $tb_pref_counter - is set back and the array element for the second company is removed.
2. Empty (not truncate or drop) the database used for the company 2.
3. It is best to use a separate database for each company
4. The database should already have been created, a user privileged for it and privileges flushed.
5. Now test your CoA sql that it has no create database and use database statements and conforms to the standard en_US-new.sql format. Manually executing it on the target database and then emptying it out on successful execution is one way to fish for errors.
6. Login to default company as admin
7. Create your second company all over again, logout and login to the second company and go ahead.

All companies by default have the same administrator username of "admin" on creation. The username can only be changed in the database - phpMyAdmin / SQLyog. Within the FA Web UI, another administrator roled user can be created and then logged in using that and then the original one deleted but I do not know what will happen if some stupid script was to assume that user id 1 should always be admin!

The company name given during company creation is the one in the dropdown list during login that determines which db and FA company will be used. This info is stored in the company's entry in config_db.php. For security reasons, there is a variable in config.php - $text_company_selection - that can be set to make the dropdown box to a text box for manual entry.

4,634

(4 replies, posted in Setup)

Yes, I have been wanting the devs to look at the db_escape() function and was at one time half way thru implementing a db_unescape() function but dorpped it because:
1. I found the multiple language issues and the way PHP functions perceive them differently too varied
2. The multitude of files in FA that use the $_POST / $_GET variables directly when receiving them
3. The way Ajax routines handle them (all such functions bear the same name) on the fly

Will check how the devs manage it in FA v2.4 when UTF-8 will become the standard.

One downside of using UTF-8 is that all PDF sizes will get bloated due to font embedding by default unless "changed" in TCPDF library.

The various posts were listed so that you can monitor them for any future solutions that may accrue there.

As a short term measure for Item Description field, where I needed single quote and double quote to represent feet and inches, I have manually imported them into the tables in SQLyog and expect not to edit them inside the FA UI - a tall order since it will have other data in their records that may need to be updated - there is no atomic editing of fields as available in vTigerCRM. My mod in the previous post was for preventing a change in the Description field by not allowing it to be a form field itself if it is set to be "Not Editable".

4,635

(65 replies, posted in Setup)

Yes, this thread has now become the "FA Install Tips" topic.....

Do not depend on Softaculous or any hosting service's backup facility for critical data - solely. Yes, it is convenient to start with, but deciphering which backup to revert to and what it's actual state was is to get lost in the maze. In fact, an uninstall in Softaculous will simply wipe out the entire FA and it's database!

Whenever you want to backup, FA has a nice feature within it's user interface - Setup => Backup and Restore - where you can put in a comment as to it's snapshot contents and state - and in my mod, rename it as well - and download it to your machine in gzipped form. This however requires you to take a backup of the company/# folder separately to match the sql backed up.

Assuming all my mods are good is indeed a vote of confidence - thanks - please provide feedback.

4,636

(65 replies, posted in Setup)

You may also partake of info in the CoA differences post.

As a sample, the en_GB-general v2.3.0-5 from the official repo was taken as of 2014-12-28.

Many CoA's suffer from similar issues including the Canadian CoA.

Here are a few of the changes required with respect to the Standard en_US-new CoA:

Position of field:
==================
0_stock-category.inactive
0_suppliers.supp_ref
0_cust_branch.branch_ref

Changes in Indexes:
===================
0_supp_trans
0_tax_types
0_cust_branch
0_debtor_trans

Field Type / Size / defaults changes:
=====================================
0_users.query_size
0_debtor_trans_details.src_id
0_cust_branch.notes
0_audit_trail.stamp

Optional
========
0_users.print_profile
0_users.startup_tab

Delete fields:
==============
0_bank_trans.bank_trans_type_id

New Fields:
===========
0_currencies.auto_update

Needless tables in default install:
===================================
0_dashboard_reminders
0_dashboard_widgets

New Account - GRN Clearing Account needs to be in the chart_master and also set in a record in the sys_prefs table.

Hence after installing your chosen CoA from the official repo, please compare it with the official en_US-new.sql one and partake of the changes in my FAMods sql folder as desired before creating a new company with it.

A sample en_GB-general CoA with only whitespace and table sequencing done (all 00xx account numbers made into 10xx) with all the errors in place but made for easy comparison with the standard en_US-new.sql has been made as an interim commit for others to make changes in similar CoAs.

Make sure that all tables with AUTO_INCREMENT fields are set to AUTO_INCREMENT=1 so that they will auto grab the correct value based on the number of records in them. Do this before the INSERT statements directly in the CREATE TABLE statement itself.

4,638

(65 replies, posted in Setup)

My FAMods are critical for me especially the db schema and the added indices and standardised field types and sizes and defaults.

Use a program like WinMerge to study differences between files and files in folders.

Use Excel (or any spreadsheet) to generate your SQL update / insert statements and then use a MySQL client like SQLyog to execute them.

4,639

(4 replies, posted in Setup)

What happens is that the $_POST info gets cleaned using the db_escape() function that does some scrubbing that may not be useful in your context. htmlspecialchars and url_decode and the state of some MySQL / PHP constants that change the way these functions work.

Some other posts in this forum that may be useful here are:

https://frontaccounting.com/punbb/viewtopic.php?id=3119
https://frontaccounting.com/punbb/viewtopic.php?id=5372
https://frontaccounting.com/punbb/viewtopic.php?id=5371
https://frontaccounting.com/punbb/viewtopic.php?id=4530

Study the changes between files in my FAMods with their counterparts in the core to see how you want to implement it.

4,640

(65 replies, posted in Setup)

Nice to see someone put their nose to the grind. Someday all of this will be useful to you in guiding newbies get on the FA bandwagon.

The core in my GitHub Repo is a verbatim copy of the stable snapshot (sometimes it is a tad delayed while I take my time to vet each change). You can fork the repo on GitHub whilst submitting patches back as well.

The files in the FAMods folder are to be used to over write their counterparts in the core. Take care when using those in the company folder and only do so if it satisfies your needs - some files will need to be used along with others whilst some others may be used alone. I use all of them. If you use all the FAMods files to overwrite the core ones, make sure you place the shcmds.sh (perms 4755, owner root or equivalent) above your webroot. It is used for some extra functionality in the Setup => Backup and Restore page.

The files in the extensions folder in the GitHub repo are to be used to overwrite their counterparts after installing from the official pkg repo. They are changes that have yet to make it to the official repo open to the public ($ read consultancy $).

The 0_cust_branch.contact_name field has been deprecated for quite a while and stands removed in FA v2.4. It is only logical that it is removed from any last vestiges of it's use (must remove from extensions as well). Currently, in FA v2.3.x, only rep103.php and rep106.php in the reporting folder use these fields.

I have attached a patch for these files in this post and committed to my list of mods in the FAMods folder in my GitHub Repo.

@joe: please include it in the core and update FA v2.4 as well as needed.

4,642

(65 replies, posted in Setup)

1. Overwrite your scriptaculous install with the latest stable snapshot and what mods you desire after taking in the credentials from the config.php and config_db.php files
2. Keep the default company installed with en_US-new.sql and let the default prefix be 0_.
3. Go thru the web install (newer config.php variables will also get in) with the credentials from the earlier config_db.php and config.php files.
4. Login as default company admin.
5. Install the en_CA Chart of Accounts and download and edit the sql file for Canada updating it with the end result of the changes done in the stable snapshot (and recommended from my GitHub repo only if wished and understood) hitherto and upload it.
6. Create a new company with the modified Canadian CoA
7. Logout of the default company
8. Login to the newly created Canadian CoA company.
9. Take a backup of the install and preserve for initial state.
10. Make changes in the Setup menu items to suit your specific install.
11. log out of the Canadian Company.
12. All Canadian company nfo are now in your company/1/ folder
13. Purge the js cache in the Canadian company (rm company/1/js/*.js)
14. Login to the Canadian Company and work along....

4,643

(65 replies, posted in Setup)

It is generally okay to install applications via Scriptaculous / Simple Scripts / Fantastico, and other one-click installers for testing and evaluation purposes and for long unsupported projects (later correct it and update it manually).

After the release of FA v2.3.22, several fixes have been added and these will not reflect in such installs.

Modifications that consultants use for their customers are rarely put out for public view. For my part, I have placed every single mod in the FAMods folder in my GitHub repo that I think will be of some use to any end user. This, I hope will provide for exhaustive testing and feedback - very little has come my way so far and is indicative of the closeness (euphemism for selfishness and possible malicious intent) with which most developers would like to keep critical code to themselves. The real value of a project is it's community and the trust it emanates to grow it's userbase.

Several of my mods have yet to make it to the core and extension repos for various reasons and all of them have been listed with a detailed changelog.

The change to the said sql file will be valid for new company creation only. All existing companies must be manually corrected with appropriate SQL statements.

If your system has been in jeopardy hitherto, be happy that you did not know it to be worried about it at least till now and were able to enjoy the Christmas and New Year celebrations whilst some of us at FA were busy saving everyone hassles in it's wake wink .

4,644

(65 replies, posted in Setup)

The standard Canadian Chart of Accounts too suffers from the field order issue. Check the position of the 0_cust_branch.branch_ref and 0_debtors_master.debtor_ref fields in the sql/en_US-new.sql and yours.

4,645

(0 replies, posted in Accounts Receivable)

In FA v2.3.x, all prices are stored in 0_prices table for each pricelist for each item. There is no date of last update field in the table.

In FA v2.4 atleast there should be price history feature to keep track of how vendors are marking up the prices over time.

Currently, only the sales invoices bear a semblence of price history for goods actually bought from the vendors.

4,646

(65 replies, posted in Setup)

Do not wait for v2.4 - it's been in the making for years now.

Just make the corrections to the tables for benefitting from speed and removing redundant indices and standardising field types and order of fields. There is just too much testing to be done in v2.4 before it can be relied upon - besides, it's schema will keep changing for a while.

All my fixes to the schema in v2.3 are now in my GitHub Repo.

Stating the country you are in (work with) in your profile, will help newbies contact you.

4,647

(4 replies, posted in Modules Add-on's)

This is now evident from the ERD at the Wiki.

Those who want to make the change can apply the following with the appropriate table prefix for each company:

ALTER TABLE `0_bank_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;
ALTER TABLE `0_budget_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;
ALTER TABLE `0_gl_trans` CHANGE `person_id` `person_id` INT(11) DEFAULT NULL;

4,648

(7 replies, posted in Translations)

lv_LV is the code to use for Latvian and you can generate your your own lang files from empty.po file.

ru_RU is the code for Russian and is already available in UTF-8 in the official pkg repo to install from inside FrontAccounting.

Default English used is in POSIX "C" language and is latin1 that is iso-8859-1 (it was possibly earlier in UTF-8)

msgid ""
msgstr ""
"Project-Id-Version: FrontAccounting\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-11-30 17:03+0100\n"
"PO-Revision-Date: 2009-11-30 17:04+0100\n"
"Last-Translator: Translation Team <info@frontaccounting.net>\n"
"Language-Team: Translators <info@frontaccounting.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: English\n"
"X-Poedit-Country: UNITED STATES\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
"X-Poedit-Basepath: c:/Apache2/htdocs/account22\n"
"X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: c:/Apache2/htdocs/account22\n"

msgid "Our VAT No."
msgstr "Our Tax Id."

msgid "TOTAL DELIVERY INCL. VAT"
msgstr "TOTAL DELIVERY INCL. TAX"

msgid "TOTAL ORDER EX VAT"
msgstr "TOTAL ORDER EX TAX"

msgid "TOTAL PO EX VAT"
msgstr "TOTAL PO EX TAX"

msgid "Your VAT no."
msgstr "Your Tax Id."

Yes it contains only 5 string translations and qualifies for a language addition in FA!

en_US English in the official pkg repo is also in iso-8859-1

I have made the po and the mo files for the UTF-8 equivalents for en_US and placed it in my GitHub Repo.

You can take the file at  FAMods/lang/en_US-UTF8/LC_MESSAGES/en_US-UTF8.mo, renaming it as en_US.mo and use it to overwrite the one in your FA installation at lang/en_US/LC_MESSAGES/en_US.mo.

You need to make the encoding change in your lang/installed_languages.inc file as well.

It is best to post each issue in a separate post.

4,649

(65 replies, posted in Setup)

It appears that you are not using the latest code. The ref and name fields were actually swapped while populating the table and the code was corrected in a commit on 2014-10-09. It would be best to use the stable snapshot.

Also, you seem to be using some non standard table prefix naming convention since FA usually uses numeric prefixes with an underscore but this will not be an issue here.

Furthermore, if you are using the en_GB Chart of Accounts from the official pkg repo then you will do well to do a line by line compare of the fields with the sql/en_US-new.sql in the db schema since in atleast 2 instances there are field order issues. As the devs are busy with getting FA v2.4 out, these remain in limbo.

FrontAccounting should generally work out of the box and if you want to support the project, then you can use the slightly older but more stable version hosted by the project devs for a small fee at http://my.frontaccounting.com . Unless you state what you are familiar with - computerese, academic accounting, shopfloor experience, banking, manual tax preparation, etc, you will find it difficult to find the right consultant. It boils down to what you want to accept online and what you wish to "possess" and what you want to offload to third parties - in short what is the level of trust you wish to delegate and whether you intend to work on making up your current lack of specific skills to take on the mantle of full responsibility sometime.

Once you have your Chart of Account setup (there is an AU CoA within FA and you can modify it with the help of your local CPA), you can fill in the Setup tab menu's various forms like Company Setup, etc after you create a new company for your business. Keep the default company (Company 0) as your control company and for all working purposes use a newly created one.

Then setup your customers, suppliers, items and manufacturing assembly kits. Import your last balance sheet (and inventory stock) values as a single journal voucher into the last day of the previous year and then close that year and start on your new active current year.

Several links in the wiki point to tutorials about accounting in general and FrontAccounting operations in particular. If there are any specifics you are unable to fathom, we can try to address it by explaining it better in the wiki. That way newbies in the future too can benefit from it.

Please search for any FA support group in your locality (where in AU?) and if you still cannot find one who is cost effective then checkout the nearest one in the support page in the wiki.