@joe: Done and committed in my FAMods - can port it to both cores.

3,402

(11 replies, posted in FA Modifications)

Make sure you have removed redundant indexes and have some needed indexes in place. Also, some reports are cycled through in php on a per sql query basis instead of being acquired in a single sql query possibly as atomic requests use less memory.

Which reports slow you down? Has your MySQL been "tuned and defragmented" ?

3,403

(18 replies, posted in Reporting)

View the tax table relationships in the EDR in the Wiki. You probably have not attached the tax to the tax group  / tax instance.

Attached your file here as well.

Which table, which field? Is your table and field utf-8? When you read back from the field in FA do you see the normal apostrophe?

Ref: http://stackoverflow.com/questions/3574609/php-html-decoding-help-converting-a-039quote039-is-bbold-b

html_entity_decode('A &#039;quote&#039; is <b>bold</b>', ENT_QUOTES);

should work.

mb_convert_encoding($string, "UTF-8", "HTML-ENTITIES");

replacing UTF-8 with your charset should work.

3,405

(1 replies, posted in Reporting)

Read the wiki - there are pointers there and study the existing reports in reporting/repXXX.php files.

https://frontaccounting.com/fawiki/index.php?n=Main.BuildYourOwnFAReports
https://frontaccounting.com/fawiki/index.php?n=Main.AnatomyOfAHeader2TemplatedReport
https://frontaccounting.com/fawiki/index.php?n=Help.ReportsAndAnalysis
https://frontaccounting.com/punbb/viewtopic.php?id=5541

Mohd Pats, your company ( GoSoft ) is supporting a modified version of FA v2.3.19 for your client. We need to take this off board as any fixes to it here would only confuse the forum users. PM-ed you.

Forum users would however benefit from the following way FA has been used for a Vehicle Maintenance Company:
Customer Branch is treated as "Make / Model of Vehicle" where the details would have the Vehicle Registration number. Some unnecessary mandatory fields (Addresses) have their validation for presence turned off. The local terms (VAT => GST, etc) have been hardcoded into the scripts all over the place - this can be replaced with a single translated en_NZ.po and re-compiled en_NZ.mo file. Unnecessary modules and menu items hidden / not loaded.

So my FA 2.3 GitHub FAMods folder grows.... Soon it will be the defacto v2.3 of choice due to lack of backports into 2.3's official repo for whatever reason - for those who wish to remain at 2.3.

Line in reporting/includes/header2.inc:

        $this->LineTo($right, $iline2 ,$right, $iline4);

is redundant and can be removed as it is already executed in the preceding loop.

@joe: please do the needful.

Solved. Changes to 8 php files and some minor db changes will fix it for good. The field width is not of any great significance here as the widths move the vertical bar along with the "Discount %" text.

I am unable to see what you want. The invoices print properly. See the original and some tweaks in the attachment.

3,411

(0 replies, posted in Setup)

The Wiki has been updated with MySQL table Defragmentation methods.

Over a period of time, FrontAccounting's MySQL tables accumulate a lot of deleted records. Purging the "marked for deletion" records will shrink the table space, re-index / defragment it and make it faster in operation.

This is important for those running FA having a lot of data and for those running several companies in one FA server. - especially so when a fiscal year is closed and then deleted.

When only 1 currency is used, a session flag variable can hide the currency filter in all report forms including extension reports.

A config variable / sys_prefs record to suppress the display of the Dimensions, Manufacturing and Inventory menus would be useful too.

Adding extra fields into FA tables is generally not advisable as it will surely break upgradeability. Some extensions have been known to extend FA tables and the FA extension framework actually allows for this.

That said, we can still live within the FA schema whilst simulating the presence of the extra field. A common grouse of an unfulfilled need in FA is that of Bin Locations within the warehouse. This "extra field" has been accommodated within an existing text field and illustrated in the Wiki.

Changing code too in FA will lead to a need to update again after any upgrade occurs especially for company specific reports. Maintaining your own GitHub like repo (or any Source version control) will mitigate it to some extent. Submitting the code changes back to the project makes it possible to have it incorporated into the core codebase avoiding the need for maintaining such repos.

PM me the details and I'll see if it is interesting and if I have the time for it - no NDAs, no responsibilities. For your regular FA scripting needs refer the FA Support page. Scouring the forum would show up many eager FA enthusiasts would work for $$$.

3,414

(0 replies, posted in Setup)

After deleting all fiscal years except the current one, we see all opening balances pertaining to only the current fiscal year appended to the gl_trans table. Attempting to query thus:

SELECT * FROM `gl_trans` WHERE ABS(amount) < .001 AND amount <> 0;

we find that there is one (chart_class.cid=2 => Liabilities) entry that has a very tiny amount balance, ie., 2.27373675443232e-13. There are over 100 entries whose absolute gl_trans.amount value is under 0.01. How do we eliminate these opening balance entries - where does the contra go if we delete these GL entries?

Place your request details here with a link to an image of your target output and what you are willing to pay. It is possible some forum user will give you the solution FOC as well. You were assisted before in a similar manner and have not yet provided any feedback or even thanked the solution provider.

3,416

(0 replies, posted in Installation)

The standard sql_trail reports the sql error message if any.

Using this commit in my GtHub repo, the following will appear prefixed to the message in the msg field.

  • For INSERT statements, the AUTO_INCREMENT field's last inserted id value prefixed with an I

  • For UPDATE / REPLACE statements, the number of affected rows prefixed with M

Wiki-ed.

@joe: want to include in the core or extend the table with another field for it in FA 2.4?

1. Open a "Bank" Account for the client.
2. Whenever the client is given an advance, treat it as if money was deposited into the above "Bank" Account.
3. During settlement, allocate from the said "Bank" Account.

1. Take backup 1
2. Do your operations that result in a wrong state
3. Take backup 2
4. Restore backup 1
5. Do your operations that make it to the desired state.
6. Take backup 3
7. diff "backup 2" "backup 3"

This will then need to be compared with the state at backup 2 after trying to make it right through FA standard operations.

3,419

(5 replies, posted in Report Bugs here)

This mod needs to be used with caution on a case by case basis as you do not want the mail recipients to get confused with mail appearing from some third party hosted FA which might point to a different domain than desired.

Anyway, thanks to your attention  to detail for sharing the fruits of your perseverance , we have one more issue "solved".

@joe: may need a re-run for FA v2.4 RC1.

3,421

(0 replies, posted in Setup)

1. If you have more than one company in a single database and
2. for one of them you choose to have no table prefix, then,
3. when backing up that company, all tables in the database (including other companies tables in it) will get backed up and
4. sometimes resulting in a timeout!

This has been documented in the Wiki now and is thanks to lines 506-513 in admin/db/maintenance_db.inc.

3,422

(0 replies, posted in Setup)

The config.php and Data Locations in FA pages in the Wiki have been updated and provided herein for offline use.

Entry as "Loans provided" with appropriate journal entries when an earning is credited.

3,424

(18 replies, posted in Items and Inventory)

Is it possible that the said report ignores invoices not in the period of 3/4 months? Can you provide a small backup where you can show - how it is - and - how it should be - scenarios - preferably in the en_US-demo.sql instance of a Training Co.?

The gl_trans table has the dimensions data that is displayed in the GL view. The function get_gl_trans() in the file gl/includes/db/gl_db_trans.inc is the source of the displayed field contents of which the dimension data is a part - ie., line 50 in gl/iew/gl_trans_view.php:

$result = get_gl_trans($_GET['type_id'], $_GET['trans_no']);

In the case of the Invoice View, the $supp_trans gets passed by reference through line 36 in purchasing/view/view_supp_invoice.php:

read_supp_invoice($trans_no, ST_SUPPINVOICE, $supp_trans);

The function read_supp_invoice() is in purchasing/includes/db/invoice_db.inc and it does not have any dimension data and hence the absence of values in the dimension columns in the Invoice View!

Also, for each sales invoice item line, all entries pertaining to the gl_trans table will get pulled in if it is joined and records taken. Otherwise, the default value of dimension data in the suppliers table get sucked in erroneously if taken from there.

Sample sql taken from the function read_supp_invoice() and modified to join the gl_trans table :

SELECT supp_trans.*, supp_name, gl.dimension_id, gl.dimension2_id
FROM 1_supp_trans supp_trans LEFT JOIN 1_suppliers USING (supplier_id)
    LEFT JOIN 1_gl_trans gl ON (supp_trans.type=gl.type AND supp_trans.trans_no=gl.type_no)
WHERE supp_trans.trans_no = 11 AND supp_trans.type = 20;

will erroneously produce multiple records for each line item entry of the sales invoice display.

Hence the Dimension column in the Sales Invoice View should be removed - pictures 07 and 08 in the attachment illustrate it.