5,351

(13 replies, posted in FA Modifications)

1. Export existing company and view the sql and note the table prefix - say ("0_")
2. Create new company and mote it's table prefix to be say ("1_")
3. Edit the sql from step 1 above and replace the table prefix with that of the newly created company
4. Restore the edited sql into the newly created comapny
5. Restore the sql/en_US-new.sql file into the default first company and change the admin password
6. Set the $hide_inaccessible_menu_items = 1; in config.php

Use the newly created company as your real company.
Use the default company as the control company.

How did it become negative? FA requires that the Cash/Checking account always be positive.

5,353

(3 replies, posted in Setup)

User based Account restriction is not implemented in FA as yet. I do not think it should be done since then the users may not be able to see transactions that involve the checking account.

You had installed the Dashboard Theme.
You need to install the Dashboard Module as well and then activate it. Only afterwards, you should choose the Dashboard theme for the user.

Hence:
1. Choose some other theme (default)
2. Install Dashboard Module from default company
3. Activate the Dashboard Theme for the target (maybe even current one if so needed) company
4. Login to the target company (if different from default one)
5. Change theme to Dashboard theme for logged in user
6. You may need to logout and then login and possibly clear browser cache and server cache (company/*/js/*.js)

Go ahead - paste the Morroccan CoA data here. Use the code tags within square brackets see how to use BBCode.

5,356

(15 replies, posted in Installation)

The said extension's files are available at:
https://github.com/apmuthu/frontaccounting/tree/master/extensions/Extensions/import_multijournalentries

@kfrance: Please notify which files had the null characters in their names.

5,357

(4 replies, posted in Setup)

A trigger can be setup in the database that runs when a certain condition is met. This trigger can auto populate the interest records.

5,358

(19 replies, posted in Accounts Payable)

If you create a new currency make sure the company currency and the supplier currency be what they should be and that the exchange rates be set anew with "1" being the rate of the company default currency. Logout then and clear cache - possibly even the company cache (company/*/js/*.js) and then see if it persists.

5,359

(14 replies, posted in Setup)

If a computer hung when using FA, then the session would become stale in time, but the user can just reboot at once and then login again, otherwise the stale session would lock out any login if based on existing valid sessions being alive.

Hence, keep passwords safe and make and get staff to use separate usernames for audit trail.

Social engineering / hacking (looking for passwords over the user's shoulder as they are being typed) and looking thru CCTV footage should by now be well understood as they have been shown in movies / TV serials quite commonly.

access/login.php
access/logout.php

5,361

(1 replies, posted in Installation)

Create a file called faillog.php in the webroot's tmp folder and make the file writeable by the webserver user.

5,362

(1 replies, posted in Accounts Receivable)

Approval process in FA needs to be made as a separate module for each context it is desired to be in. In this case, the return reference would be the return entry's voucher number.

Cash Account should always be in debt to every account who provided it the cash in the first place. Hence in FA, is debit balance shown as positive?

Thanks Janusz for the clarification:

Maybe the temporary variable name $void_entry is misleading, but the
codelogic is right. The voiding action is abandoned if the selected
transaction has been voided before.

Janusz

In the file admin/void_transaction.php, lines 271-302 are:

function handle_void_transaction()
{
    if (check_valid_entries()==true) 
    {
        $void_entry = get_voided_entry($_POST['filterType'], $_POST['trans_no']);
        if ($void_entry != null) 
        {
            display_error(_("The selected transaction has already been voided."), true);
            unset($_POST['trans_no']);
            unset($_POST['memo_']);
            unset($_POST['date_']);
            set_focus('trans_no');
            return;
        }

        $ret = void_transaction($_POST['filterType'], $_POST['trans_no'],
            $_POST['date_'], $_POST['memo_']);

        if ($ret) 
        {
            display_notification_centered(_("Selected transaction has been voided."));
            unset($_POST['trans_no']);
            unset($_POST['memo_']);
            unset($_POST['date_']);
        }
        else {
            display_error(_("The entered transaction does not exist or cannot be voided."));
            set_focus('trans_no');

        }
    }
}

Shouldn't the second if condition have it's logic inverted?
The line above:

        if ($void_entry != null) 

will probably need to become

        if ($void_entry == null) 

This should actually mean that unless there are entries to be voided, do not attempt to void any (since none exist).

However, in @dedode's case, he must find out why a "missing" transaction was sought to be voided in the first place! Possibly attempting to void an already voided transaction - using the back button in the browser and re-submitting it or some browser cache issue.......

5,366

(18 replies, posted in Setup)

A slightly rehashed Italian SQL (need to choose the accounts for setup defaults) that you can start with.

5,367

(4 replies, posted in Reporting)

Thanks Joe, your fixes 1 and 2 do the job.

5,368

(18 replies, posted in Setup)

Hope you are not using Lira.....

Since Euro is used by most EU countries, take any of their Chart of Accounts from the repo and translate the head of accounts.....

All Extensions/Languages/Themes/Charts are expanded out and placed in my unofficial GitHub Repo. Place the resultant translated file by naming it like chart_it_IT-general-2.3.18-1.sql and place it in the sql folder.

Void Invoice and then make a new one.

or

Make sales orders instead of direct invoices and then let the staff edit them and proceed to convert them into delivery orders and invoices thereafter.

5,370

(13 replies, posted in FA Modifications)

The installed_extensions.php determines the default company - do not make the default company the active company for real accounts.

Also hide links in config file setting for inaccessible menu items.

5,371

(1 replies, posted in Report Bugs here)

Any change in browser / browser version since it last worked?

The link was provided only for an insight into what it does. Yes, as Elax says, install from within FA unless you follow the wiki to manually install it.

5,373

(5 replies, posted in Installation)

Use different table prefixes if you want to install into the same database. Since you are running WAMP in your own machine, you can choose to install FA on different databases for each instance. If both the Apache2 and MySQL are on the same machine, then the hostname can remain localhost or sometimes 127.0.0.1

You can create a new company only from the default company - see installed_extensions.php file in the root folder.

The said function that does the job is in sales/includes/db/cust_trans_db.inc

function get_customer_trans_version($type, $trans_no) {
    if (!is_array($trans_no))
        $trans_no = array( $trans_no );

    $sql= 'SELECT trans_no, version FROM '.TB_PREF. 'debtor_trans
            WHERE type='.db_escape($type).' AND (';

    foreach ($trans_no as $key=>$trans)
        $trans_no[$key] =     'trans_no='.db_escape($trans_no[$key]);

    $sql .= implode(' OR ', $trans_no) . ')';

    $res = db_query($sql, 'document version retreival');
    
    $vers = array();
    while($mysql=db_fetch($res)) {
        $vers[$mysql['trans_no']] = $mysql['version'];
    }
    return $vers;
}

If there are no transaction or just one transaction only then what would happen to the orphaned OR?

Also, there may be a typo in the field name 'type' being 'tpe' since both exist. The table definition is:

CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
  `trans_no` int(11) unsigned NOT NULL default '0',
  `type` smallint(6) unsigned NOT NULL default '0',
  `version` tinyint(1) unsigned NOT NULL default '0',
  `debtor_no` int(11) unsigned default NULL,
  `branch_code` int(11) NOT NULL default '-1',
  `tran_date` date NOT NULL default '0000-00-00',
  `due_date` date NOT NULL default '0000-00-00',
  `reference` varchar(60) NOT NULL default '',
  `tpe` int(11) NOT NULL default '0',
  `order_` int(11) NOT NULL default '0',
  `ov_amount` double NOT NULL default '0',
  `ov_gst` double NOT NULL default '0',
  `ov_freight` double NOT NULL default '0',
  `ov_freight_tax` double NOT NULL default '0',
  `ov_discount` double NOT NULL default '0',
  `alloc` double NOT NULL default '0',
  `rate` double NOT NULL default '1',
  `ship_via` int(11) default NULL,
  `dimension_id` int(11) NOT NULL default '0',
  `dimension2_id` int(11) NOT NULL default '0',
  `payment_terms` int(11) default NULL,
  PRIMARY KEY  (`type`,`trans_no`),
  KEY `debtor_no` (`debtor_no`,`branch_code`),
  KEY `tran_date` (`tran_date`)
) ENGINE=InnoDB;

Should the line:

        $trans_no[$key] =     'trans_no='.db_escape($trans_no[$key]);

be

        $trans_no[$key] =     'trans_no='.db_escape($value);

?