The actual value of TB_PREF is in the $db_connections[#]['tbpref'] array element in config_db.php's  that pertains to the company (#) logged in.

802

(18 replies, posted in Setup)

Whilst a onetime cleanup using a journal adjustment entry is in order, the real solution going forward will be to increase the precision in php.ini from default 14 to 17.

An interesting discussion on this topic is here:
https://stackoverflow.com/questions/145 … oint-issue.

Whilst at it, please fix the "PM Link" for the moderator login in the top horizontal menu.

@paul: highlighting the the two similar lines will expose trailing spaces in the one to be removed.

The way to do is listed in this post and it is upto the ingenuity of the deployer to do it as they deem fit.

806

(12 replies, posted in Fixed Assets)

@joe: is this a real solution?

807

(12 replies, posted in Reporting)

It most certainly does. See attachment.
Which version of FA are you using?
FA 2.4.7 has been released in June 2019 and several fixes to it has been made as well till date.
This is a very old (> 2 years) issue that has been fixed.

808

(6 replies, posted in Reporting)

The same construct is seen in

reporting/rep107.php
reporting/rep110.php
reporting/rep113.php
includes/ui/ui_view.inc

@joe: Do any of these reports or file show the same effect?

@joe: Maybe put in this fix after checking if PHP version >= 7.

The chr(32) is to specify Ascii instead of any other collation like utf-8, etc. that would occur if a mere space was put in place of it.

810

(6 replies, posted in Reporting)

@joe: what should change and where (earlier or later) - should this be committed?

Where is the Development Forum?
@joe: any secret forum....?

The inserted line in the proposed solution is:

$this->from = $parts[1];

There is no "else" in the current codebase nor thru from FA v2.2.1.
It is not there even in @FreeMan's  cloned repo as of 4 years ago.

Wonder which version of FA is being used.

Thanks @joe.

Whilst we are on this, we might as well optimise the sql in the last function in sales/includes/db/sales_order_db.inc with:

--- sales/includes/db/sales_order_db.inc    Tue Jan 14 05:30:15 2020
+++ sales/includes/db/sales_order_db.inc    Tue Jan 14 05:42:21 2020
@@ -632,11 +632,9 @@
 {
         $sql = "SELECT $field
             FROM ".TB_PREF."sales_order_details d
-            WHERE order_no =
-            (SELECT order_no FROM ".TB_PREF."sales_orders o
+            LEFT JOIN " .TB_PREF."sales_orders o on d.order_no=o.order_no
             WHERE debtor_no=" . db_escape($order->customer_id) . "
-            ORDER BY order_no DESC LIMIT 1)
-            ORDER BY d.id DESC LIMIT 1";        
+            ORDER BY d.id DESC LIMIT 1";
 
         $last_query=db_query($sql, "Could not retrieve last order detail");
         $row = db_fetch_row($last_query);

@joe: is this necessary?

https://github.com/apmuthu/FA24extensions/tree/master/Extensions/rep_cash_flow_statement

@joe: can this be incorporated into the core?

@joe: There should be a Maintenance Mode  where only one Administrator can login on one terminal - this can be done by setting a sys_prefs table variable that is company specific in the Company Settings where the existing sessions will need to be cut (gracefully) off like timing out the logins of all non Admin users assuming that there is just one Super Admin for the Company.

Short of this, a physical disconnect of the network for all other users is the only option.

@joe: Please correct the website - error as per attachment

819

(6 replies, posted in Reporting)

If you wish to proceed the way you want then FA is not for you.

If you wish to accomodate your request within FA, then make sure you have an account from which monies come out and go into.

When you start a fresh company in FA with no opening balances, then where did the Bank's Opening balance come from and whom should it be repaid to when the said bank account is closed?

Make a list of all opening balances you wish to transfer into FA and make a journal entry for all of them with the balance appropriated to the cash account. Make sure that the cash account balance is in debit as it should be returned to the shareholders and other stakeholders should the company close. Otherwise make a cash receipt entry from someone who has loaned you the amount to balance your books.

Please learn Double Entry Book Accounting or take professional Accountant's advice before attempting FA - there are some good tutorial links in the Wiki too.

820

(6 replies, posted in Reporting)

FA is a double entry accounting system that accomodates single entry forms where the contra entry can be the cash account.

821

(4 replies, posted in Setup)

Since you are creating a new FA installation, make a copy of the sql/en_US-new.sql file and edit it to remove what accounts you do not want and inject new ones taking care to ensure that any references to the old account code in the sys_prefs table is properly accounted for and then use this new sql to create your company.

Opening balances must necessarily be entered as journals from your old balance sheet and / or by credit/debit notes.

822

(4 replies, posted in Setup)

Do not delete such ledger accounts as there will be an audit trail and next reference records associated with it besides subsequent account codes thereafter.

823

(6 replies, posted in Reporting)

When such a bank balance is available it will be part of the balance sheet that came from the period just before you started on FA. Place all balance sheet entries in one Journal entry and they should contra one another. If you are doing it in parts, then use an intermediary "Suspense Account" which will zero itself out when all such balance sheet entries are imported in. In case allocations need to be done, use Debit Note / Credit Note for such bank / cash balances for the apportioned amounts.

824

(7 replies, posted in Reporting)

@sewkar: Just kidding. If you can afford it, kindly contribute to the project. It will in part pay for the hosting, and other expenses. Thanks for the feature request - that is what makes Open Source worth pursuing and preserving - peer group vetted best way forward.

We can explore where else the "All" can be implemented.

825

(7 replies, posted in Reporting)

Possibly an option in the PARAM_0 to have ALL might be all that is necessary without having a new report altogether.
Also the page numbers caveat should be noted - all pages are in sequence with no page reset when account changes.