4,801

(5 replies, posted in Reporting)

You can still work your old 16/32 bit program in a virtual machine inside Win7 (VMWare Player, VirtualBox, QEMU/KVM, etc) on a (local) cloud.

Look at the invoice tables and you will see the invoice ids for filter ranges. Invoices must first exist.

4,802

(5 replies, posted in Reporting)

For your first question, the customer filter is to set up a range of customer codes to print in a batch.

For your second question, I am unable to find the string "Print Invoices" hard coded anywhere in FA.
The only place in the file you referred to is line 95:

$reports->addReport(RC_CUSTOMER, 107, _('Print &Invoices'),

This is to indicate that the Alt-I key combination can also be used to click the link.
Hence search for the string "Print &Invoices" in the appropriate translation file.

For your third question, you can hard code your strings in the code for a quick and dirty job.

1) Use a Service Item with unit "hr"
2) Some extension is being developed for syncing with some banks - see the wiki main page links
3) Dimensions are generally independent but in practice they are used for Areas/Departments, Stores/Shifts hierarchical models as well. This way we can look at all entries of a single department across all Areas and those of a single Shift across all stores as well!

Line 149 in inventory/manage/items.php states:

        display_error( _('The item code cannot contain any of the following characters -  & + OR a space OR quotes'));

Actually the hyphen / minus ("-") character is allowed in Item Codes (stock_id). Also allowed is the underscore character ("_").

4,805

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

The list of themes dished out of the FA repo does not include your "solution master" theme. See Attachment.

4,806

(1 replies, posted in Reporting)

Install the extension.
Update the files of the extension from my unofficial GitHub Repo. The changes proposed via this file set was not accepted as it was considered an unsafe extension - which is better - an unsafe extension which works but is listed as unsafe or an extension that does not work - you decide.
Activate the extension for the target company.
In the target company, enable the access roles for the Admin for this extension.

4,807

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

@Farhaj: Which dead link did I provided in this thread?
@Farhaj: Your themes, if shared with @itronics, has yet to be placed in the official repo - this is what comes of not providing it via a GitHub fork and the limitations of sending it to a project email link!
@Farhaj: no one will ever try to sell it if it is openly available like on Github.
@serbanc: Please fork on GitHub and include your patches to the HR Module to make it workable.

The theme grayred is being erroneously distributed in the repo as greyred. This was reported by the fork Chia-KY of my unofficial github fork where it has now been committed.

Come fork (and join the 41 forks in place already - screenshot attached) and contribute!

4,809

(2 replies, posted in Items and Inventory)

The Wiki has been updated with raw SQLs (use after editing for appropriate company # and other specifics) to bulk import Items into FrontAccounting manually.

Items like "Pipe 15 ft long" in the Item description displays fine. But if the abbreviation of feet as as an apostrophe / single quote is used, then it gets entered into the table as ' instead.

Hence the Item: "Pipe 15' long" now becomes "Pipe 15' long"

This is due to the way function db_escape() is programmed in includes/db/connect_db.inc.

function db_escape($value = "", $nullify = false)
{
    $value = @html_entity_decode($value, ENT_QUOTES, $_SESSION['language']->encoding);
    $value = @htmlspecialchars($value, ENT_QUOTES, $_SESSION['language']->encoding);

      //reset default if second parameter is skipped
    $nullify = ($nullify === null) ? (false) : ($nullify);

      //check for null/unset/empty strings
    if ((!isset($value)) || (is_null($value)) || ($value === "")) {
        $value = ($nullify) ? ("NULL") : ("''");
    } else {
        if (is_string($value)) {
              //value is a string and should be quoted; determine best method based on available extensions
            if (function_exists('mysql_real_escape_string')) {
                  $value = "'" . mysql_real_escape_string($value) . "'";
            } else {
              $value = "'" . mysql_escape_string($value) . "'";
            }
        } else if (!is_numeric($value)) {
            //value is not a string nor numeric
            display_error("ERROR: incorrect data type send to sql query");
            echo '<br><br>';
            exit();
        }
    }
    return $value;
}

MySQL now has an builtin QUOTE() function that can now dispense with quoting / cleaning up any string to be entered through SQL directly.

The use of htmlspecialchars() is dictated by certain PHP environment settings:

' " ' (double quote) becomes '&quot;' when ENT_NOQUOTES is not set. 
" ' " (single quote) becomes '&#039;' only when ENT_QUOTES is set. 

Thanks for the info Joe. That's a real time saver. When fields are considered redundant, we need to mention it in some place in the wiki.

4,812

(2 replies, posted in Setup)

Hence is it safe to ignore the type_no field in the #_sys_prefs table and assume the trans_no / type_no fields in invoices and other tables are independent of the value in the type_no field in the #_sys_prefs table?

Bin Location can be made as part of the Item Name but it will be subject to changes and will get reflected in the invoice. Even if it is part of the long_description field in the stock_master, it may possibly appear in some reports.
If the item_code field in the item_codes table is not used for UPC/EAN, then it can be used for Bin Location. This can be part of the foreign code naming then.

The field #_tax_group_items.rate does not seem to be used.
The field #_tax_types.rate seems to be used.

@joe please clarify.

4,815

(2 replies, posted in Setup)

The table #_sys_types has 3 fields, viz., type_id, type_no, next_reference.

The first one - type_id - serves to be the input form field suffix for the form textbox input element's name attribute in Setup => Forms Setup.

The last one - next_reference - serves to be the next ID number available for a new record in the appropriately related table.

All references in sql statements in FA refer to only these fields in the WHERE clauses.

In includes/db/references_db.inc:

function save_next_reference($type, $reference) => Updates the next_reference field
function get_next_reference($type) => Obtains the next_reference field

In includes/systypes.inc:
function get_systypes() => "SELECT * FROM ".TB_PREF."sys_types";

Where does the middle field "type_no" get used in?

The function get_systypes() gets called in the file admin/forms_setup.php only and that too once for displaying the form and then for saving the form values.

There appears to be nowhere that the field type_no is used.

Does the sys_prefs.type_no have anything to do with the type_no and trans_no in various related tables?

case 31 refers to the non existent "service_orders" table in function get_systype_db_info() in includes/systypes.inc.

Many Wiki pages may be outdated and / or lack sufficient screenshots and many are not filled in at all. Those users who implement FA afresh will go thru a learning curve which will be useful in remedying the lacunae / lack of information in the wiki.

Example of a page I have currently filled in is the Backup and Restore Wiki page for reference.

Culling out nuggets of information from the forum and appropriately cross referencing and placing them in the logical locations in the wiki will help everyone especially the newbies find the information easily instead of repeatedly asking for help in the forums.

Users are requested to volunteer for this huge effort that will also benefit from translations as well. This is a priceless contribution (beyond exchange rates based capability to pay) to the FA project that will surpass any donations in monetary terms that users provide (your monetary contributions are certainly valuable as it goes into sustaining the physical world costs of maintaining FA for all).

4,817

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

@itronics: The said project is not only stalled, the link is dead - returns a 404.
All new links have been updated in the wiki and the cache of your link is also provided for "last known" state. A Public Clone is available for forking as well.

Looks like @Farhaj is not quite done "covering basic expenses" since he has not released his code as yet, @itronics suggestion stands as the best GPL3 way forward.

4,818

(7 replies, posted in Installation)

Adjust Apache conf files in all VPS/KVMs:
* For Wheezy/Squeeze and earlier - http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html
* For Jessie and later - http://httpd.apache.org/docs/2.4/ssl/ssl_howto.html
* General - https://wiki.mozilla.org/Security/Server_Side_TLS

4,819

(7 replies, posted in Installation)

You will need a separate virtual host config stanza for it in the apache conf file with it's own ssl keys.
Otherwise you will have to access your FA as a subfolder of the main url and not as a subdomain.

Just finished updating the Create/Update Companies Wiki page with copy/paste-able sql code for removing all tables for a single company in one go.

4,821

(4 replies, posted in FA Modifications)

The wiki page for Ajax in FA is ready for updation.

4,822

(4 replies, posted in FA Modifications)

There appears to be a lack of documentation (even in the wiki) regarding Ajax as used in FrontAccounting. Before making a wiki page for it, those in the know can contribute to this thread from where it will be distilled into the wiki.

If on the change of value of any FA form element, some ajax work needs to be done (like other form elements getting updated or some function being executed), then a $_POST array element needs to be set and sent.

The $_POST array element must bear a name that embeds the ajax requesting element's name attribute as seen in Lines 300 to 307 in the function list_updated($name) in includes/ui/ui_lists.inc file:

/*
    Helper function.
    Returns true if selector $name is subject to update.
*/
function list_updated($name)
{
    return isset($_POST['_'.$name.'_update']) || isset($_POST['_'.$name.'_button']);
}

Hence if the ajax requesting form element is stock_id then the hidden form elemet that is sent over for an ajax call in FA would either be:
$_POST['_stock_id_update']
or
$_POST['_stock_id_button']
for the function list_updated($name) to trigger the ajax response.

To get the response inside a target form element, it's name attribute is passed on like $Ajax->activate('price').

This is seen for example in lines 506-511 in sales/includes/ui/sales_order_ui.inc:

        if (list_updated('stock_id')) {
                $Ajax->activate('price');
                $Ajax->activate('units');
                $Ajax->activate('qty');
                $Ajax->activate('line_total');
        }

All functions that assist ajax responses are in includes\ui\ui_lists.inc.

4,823

(7 replies, posted in Installation)

That must be configured in your WebServer config like in apache conf file. It has nothing to do with FA.

4,824

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

@Farhaj: What do you mean by "nothing in his code"?

4,825

(0 replies, posted in FA Modifications)

In the file inventory/prices.php lines 127 to 137 are:

if (list_updated('stock_id')) {
    $Ajax->activate('price_table');
    $Ajax->activate('price_details');
}
if (list_updated('stock_id') || isset($_POST['_curr_abrev_update']) || isset($_POST['_sales_type_id_update'])) {
    // after change of stock, currency or salestype selector
    // display default calculated price for new settings. 
    // If we have this price already in db it is overwritten later.
    unset($_POST['price']);
    $Ajax->activate('price_details');
}

We see that for the list_updated() is executed twice and the $Ajax->activate('price_details'); is also executed twice for it's being checked. Is this necessary?

Where is the code that manages the Ajax return functionality for the various trigger values such as 'price_details' ?