Wikied it.

3,877

(7 replies, posted in Setup)

When companies are deleted out of order as is in practice, finding a missing prefix in the array would clash with possible non numeric table prefixes and the possiblility of restoring from a deleted company into it's original prefix.

When a new company is created, an entry is made in the config_db.php table for it. This entry contains the prefix to be used and the key for the entry need not be the same as the prefix used.

1. Create your 3 companies anew so you have 0 (Default), 1,2,3 companies.
2. Note down the config_db.php entries (backup the file).
3. Delete company with prefix 1_.
4. The entry for the company "1" is removed from the config_db.php file
5. The value of the variable $tb_pref_counter in the config_db.php will signal the next prefix - alter it as needed even temporarily so as to create your company "1" again and then revert back.

The function save_next_reference defined in includes/db/references_db.inc just saves the given reference to the table without any increment using:

function save_next_reference($type, $reference)
{
    $sql = "UPDATE ".TB_PREF."sys_types SET next_reference=" . db_escape(trim($reference)) 
        . " WHERE type_id = ".db_escape($type);

    db_query($sql, "The next transaction ref for $type could not be updated");
}

The above function is called from admin/forms_setup.php to post the form variables just as is into the sys_types table.

The file includes/references.inc has defined the (class references) methods save() and restore_last() which first increment or decrement and then call the above function.

Hence in the file @kvvaradha referred to - manufacturing/includes/db/work_orders_db.inc - the save() method does not need any increment in the argument.

Furthermore, the import_transactions extension has a redundant line 250 in modules/import_transactions/import_transactions.php

           save_next_reference($type, $reference);

Hence nothing needs to be done in the FA codebase for now.

3,879

(7 replies, posted in Setup)

Are you trying to create all the companies using the same database? Only if you have a separate database for each company, can you choose whatever prefix you want for each company. Any companies you delete can also have them removed from the config_db.php file as well.

This has now been wikied.

3,881

(7 replies, posted in Setup)

In phpMyAdmin or SQLyog or any MySQL client, drop your FA database (or delete the 1_ prefixed tables in a shared db) for the said company. Recreate the database for the 1_ company. Now get your extracted sql file from your earlier backup and load it into the newly created database.

If you still have any problems, PM me with the access details and a link to your backup.

Kindly keep all FA 2.4 beta topics separate. Check your fileset as it could be erroneous.

Which report are you referring to - which repXXX.php file?
All parameters passed on to reports are defined in reporting/reports_main.php.

Dashboard theme and extension should be installed before being activated and chosen.

The file includes/ui/ui_input.inc does not contain the function text_input() and hence it could have been declared in it.

Which version of FrontAccounting are you using?

Only the file modules/dashboard/dashboard_ui.inc has the said function at lines 28 to 47:

function text_input($label, $name, $value=null, $size="", $max="", $title=false,
    $labparams="", $post_label="", $inparams="")
{
    global $Ajax;

    default_focus($name);
    if ($label != null)
        label_cell($label, $labparams);

    if ($value === null)
        $value = get_post($name);
    echo "<input $inparams type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"$value\""
        .($title ? " title='$title'" : '')
        .">";

    if ($post_label != "")
        echo " " . $post_label;

    $Ajax->addUpdate($name, $name, $value);
}

There could be others using your email id in Gujarat and Jaipur, Rajasthan:

Providing a bounty and expected timeframe would get you quick responses.

3,886

(4 replies, posted in Setup)

If you have installed the auth_ldap extension, the default is that it is enabled. It will come into action when the extension is activated for a specific company.

You may want to update the auth_ldap extension's files from my GitHub repo.

@omerabbas:

The file includes/menu.inc does not exist in both FA v2.3.x and FA v2.4.

The table 0_menu too does not exist in both versions.

It is possible you are using a very old or customised version of FA or it's fork or parent.

If you are using Drupal in the same folder and database you might encounter such an error.

3,888

(3 replies, posted in Items and Inventory)

Wikied it.

v2.4 is in beta. The stable one is v2.3.24+ snapshot?

It does not - but you could do a search and replace for those insert statements in the backup and then restore.

3,891

(40 replies, posted in Translations)

Check the wiki for abbreviations and then translate them as well for the wiki!

Post your translated .po file in the forum for peer review apart from sending it to the official email id for inclusion into the official repo.

Create a supplier invoice and then allocate a payment to the supplier invoice.

3,893

(2 replies, posted in Reporting)

CSS in PDF?

1. Take a backup of your existing FA from within the Web GUI.
2. Copy the admin username and password hash from the users yable in the backup.
3. Download the 4 or 5 digit CoA of your choice from the official repo or from my GitHb repo.
4. Copy the username and password into the users table data and make sure the table prefixes are matched.
5. Restore the 4 or 5 digit CoA from the repo into your FA.

3,895

(0 replies, posted in Reporting)

In reporting/includes folder, in the files pdf_reports.inc and excel_reports.inc, the function header3() has hardcoded subscripts of 3, 4 and 5 for dimension1, dimension2 and tags respectively  (tags not done yet in excel_reports.inc).

Hence in all reports that use dimensions and tags we need to make sure these are adhered to if header3 is used!

Hence no excel output for these documents - right?

3,897

(16 replies, posted in Reporting)

That would be rep108.php file along with form field entries coming from the reports_main.php file.

After backing up the files, overwrite the files in the reporting folder with the ones in the attachment and see if it is what you want.

rep108.php in it's function getTransactions() has an sql statement that refers to just 1 table where the fields can be written without the table name prefix.

3,898

(5 replies, posted in Reporting)

File Upload is controlled by the SysAdmin for the board.

The Customer's Reference will be different for each invoice and payment and hence it should be removed from this report in it's entirety.

Sales Person is not attached to any company - just to an Invoice or a Payment.

Hence Sales Person along with Our Order No and Delivery Date are also meaningless in this report and should be removed.

@joe: Some of the forms requesting reporting/repXXX.php to print reports do not have the "Destination" parameter. Is this by design?

These reports are:
107
108
109
110
111
112
113
209
210

3,900

(16 replies, posted in Reporting)

Which specific report (repXXX.php) are you referring to - maybe we can alter it's sql to include a dimension filter to get what you want. The Wiki has a list of reports and their screenshots.