1 (edited by apmuthu 12/10/2014 01:24:15 pm)

Topic: FA v2.4 development

@joe: Please open a separate section for this.

Tried installing v2.4 and found quite a few errors that was possibly stalling others from testing it. Attached is one such screenshot of an issue that has been solved today.

The SF Hg Repo of the Unstable v2.4 branch was last synched at FA v2.3.21 in May 2014 and later patched in Sep 2014.

I have opened a new Unofficial GitHub Repo for FrontAc v2.4.

The following commits are currently needed to get it working:

SQL Fixes

Code Fixes

Anyone using v2.4 in production?

Post's attachments

fa24_setup-co-setup-error.png 6.1 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

The 2.4 is not yet ready to testing. Needs an internal testing first.

Joe

3 (edited by apmuthu 12/10/2014 05:46:45 pm)

Re: FA v2.4 development

It has been in internal testing for years now and to speedup delivery let us involve the community into doing so. It just needs a separate forum section to collimate it.

I have now completed the new company config_db.php updation fix as well for the new MySQLi driver.

A rudimentary GitHub Wiki with Installation and Menus Screenshots has been uploaded.

4 (edited by apmuthu 12/11/2014 01:43:39 pm)

Re: FA v2.4 development

Redundant Indexes removed in FA v2.4 in my unofficial GitHub Repo and shown for v2.3 in attachment.

Post's attachments

FA_Redundant_Index_Tables.png 64.1 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

Janusz and I will use the between days in the holidays to eliminate the most common bugs.
So just after the New Year we will skip the Beta version.

Joe

Re: FA v2.4 development

Spending your Christmas / New Year holidays working for a brand new FA release version is indeed a fine gift to the FA Community.

Thankyou indeed!

This will hopefully avoid having to support multiple versions and focus resources in maintaining just one really good version going forward.

7 (edited by apmuthu 12/28/2014 07:27:36 pm)

Re: FA v2.4 development

Fantastic progress in FA v2.4 on the Hg Repo indeed.

Notes to extension maintainers:
Fix extensions based on the following changes of variables being replaced with functions consequent on them being moved from the config.php file to either the users table as extra fields (4) or into the sys_prefs table as records (8):

FA v2.3.22+ ==> FA v2.4
$alternative_tax_include_on_docs ==> $SysPrefs->alternative_tax_include_on_docs()
$no_zero_lines_amount ==> $SysPrefs->no_zero_lines_amount()
$print_invoice_no ==> $SysPrefs->print_invoice_no()
$print_item_images_on_quote ==> $SysPrefs->print_item_images_on_quote()
$show_po_item_codes ==> $SysPrefs->show_po_item_codes()
$suppress_tax_rates ==> $SysPrefs->suppress_tax_rates()

$allow_negative_prices ==> $SysPrefs->allow_negative_prices()
global $loc_notification ==> global $SysPrefs

$loc_notification ==> $SysPrefs->loc_notification()
$def_print_destination ==> user_def_print_destination()
$def_print_orientation ==> user_def_print_orientation()
$save_report_selections ==> user_save_report_selections()
$use_date_picker ==> user_use_date_picker()

Re: FA v2.4 development

The version of FA 2.4 as on date is now installable (only fresh installs) without any errors.

Re: FA v2.4 development

Thank you. Your efforts are most appreciated. As are those of Joe and Janusz, of course.

I'll install it tonight. I shouldn't need any of the fancier features, so hopefully it's good enough for production use. (I presume it's still beta grade, but I'll take my chances.)

Have we done away with the non-UTF encodings yet?

Re: FA v2.4 development

Please take it a Little cool going live. We are still not releasing the Beta. Maybe in a couple of Days. Let's hope so.

/Hoe

11 (edited by apmuthu 01/05/2015 05:51:40 pm)

Re: FA v2.4 development

FA v2.4 changes:

most $_POST['xxx'] => get+post('xxx')
some $_POST['xxx'] => check_value('xxx')
blank strings => ALL_TEXT

All MyISAM tables now InnoDB
All closing php tags removed

Quite a few blank strings will need the ALL_TEXT replacements for easy readability. Some are single quoted and others are double quoted. Some are preceeded by == and others by !=.

Like most of the constants, ALL_TEXT is defined as a blank string in includes/types.inc file.
function check_value() is in includes/ui/ui_input.inc and checks if the $_POST element has been set (isset()).
function get_post() is in includes/ui/ui_controls.inc and retrieves the $_POST element's value if it exists or returns the second argument if it exists or a blank string.

Some good constructs like:

    if (isset($order_number) && $order_number != "") 

have got changed to

    if ($order_number != "") 

This snapshot has been tested to install correctly both for the en_US-new.sql and the en_US-demo.sql CoAs. A few of the reports have been tested and appear to be working (sample attached).

Post's attachments

DemoCoA.pdf 5 kb, 15 downloads since 2015-01-05 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

Work on FA v2.4 is progressing steadily.

Some minor fixes have been backported into my GitHub Reop's FAMods folder.

Kindly note that any changes to the FA v2.3 sql (CoA) using my mods will break auto migration to FA v2.4 - the tables will then have to be manually updated for the differences using tools like db schema synch as in SQLyog.

Here is a lowdown on the developmental changes in FA v2.4 today:

A stub for db_profiling has been created.

Line 12 has been inserted in includes/db/connect_db_mysqli.inc (This will need to be taken care of when directly importing date fields values into tables)::

define('SQL_MODE', 'STRICT_ALL_TABLES,NO_ZERO_IN_DATE');

includes/ui/ui_input.inc [function edit_trans_link()]

is changed to

includes/ui/ui_view.inc [function trans_editor_link()]

This simplifies links like in manufacturing/search_work_orders.php necessitating an extra field sorder.trans_type in the sql in the function get_sql_for_sales_orders_view()

A minor fix to JsHttpRequest now includes a check for existence of array key in $_SERVER['QUERY_STRING'] before using it.

Transfers between bank accounts is now editable qualified by check and update bank transfer functions.

includes/date_functions.inc now has sql_date_comp() and date_comp() helper compare functions.

13 (edited by apmuthu 01/10/2015 02:50:33 pm)

Re: FA v2.4 development

Administrator Access permissions in the default CoAs for FA v2.4 for "Closing GL transactions" stands disabled as of now.

The others like the following remain disabled by default and are same as in FA v2.3:
1. Allow entry on non closed Fiscal years
2. Revenue / Cost Accruals

Post's attachments

Default_FA24_Admin_Perms.png 105.6 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

14 (edited by apmuthu 01/12/2015 08:54:58 pm)

Re: FA v2.4 development

The following changes in config.php (config.default.php) are there in FA v2.4 compared to the FA v2.3:

New Variables

 // Server time zone. If leaved empty the time zone set in php init file will be used.
 // If timezone is not set in this file nor in php.ini, Europe/Berlin' is used as defualt.
 $server_time_zone = '';

 /* allow reopening closed transactions */
 $allow_gl_reopen = 0;

Defaults changed from 0 in FA 2.3 to 1 in FA 2.4

 /* Show menu category icons in core themes */
 $show_menu_category_icons = 1;

Variables moved to sys_prefs or users table

 /* Do not print zero lines amount of 0.00 in Sales Documents if service item. 1 = do not */
 $no_zero_lines_amount = 1;

 /* Save Report selections (a value > 0 means days to save. 0 = no save) */
 $save_report_selections = 0;

 /* use date picker for all date fields */
 $use_date_picker = 1;

 /* show item codes on purchase order */
 $show_po_item_codes = 0;

 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
 $accounts_alpha = 0;

 /* email stock location if order below reorder-level */
 /* Remember to set an email on the Location(s). */
 $loc_notification = 0;

 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
 $print_invoice_no = 0;

 /* 1 = print Subtotal tax excluded, tax and Total tax included */
 $alternative_tax_include_on_docs = 0;

 /* suppress tax rates on documents. 0 = no, 1 = yes. */
 $suppress_tax_rates = 0;
 
 /* Allow negative prices for dummy/service items. To be moved to GL db settings */
 $allow_negative_prices = 1;

    /* Print Item Images on Sales Quotations. Set to 1 if so. */
    $print_item_images_on_quote = 0;

Available in per report basis selectors and hence removed

/* default print destination. 0 = PDF/Printer, 1 = Excel */
 $def_print_destination = 0;

 /* default print orientation. 0 = Portrait, 1 = Landscape */
 $def_print_orientation = 0;

15 (edited by apmuthu 01/13/2015 07:55:02 pm)

Re: FA v2.4 development

FA v2.4 commits today

More arguments in functions some moved from being a global variable:

function item_settings(&$stock_id, $new_id)
The old global $new_id is now an argument to the function (there are quite a few similar ones for can_process() as well)

Variables referenced from $SysPrefs array

$use_popup_windows => $SysPrefs->use_popup_windows)
$max_image_size => $SysPrefs->max_image_size
$pic_height => $SysPrefs->pic_height
$show_menu_category_icons => $SysPrefs->show_menu_category_icons
$help_base_url => $SysPrefs->help_base_url
$power_url => $SysPrefs->power_url
$power_by => $SysPrefs->power_by
$use_oldstyle_convert => $SysPrefs->use_oldstyle_convert
$date_system => $SysPrefs->date_system
$allow_gl_reopen => $SysPrefs->allow_gl_reopen
$login_delay => $SysPrefs->login_delay
$login_max_attempts => $SysPrefs->login_max_attempts
$allow_password_reset => $SysPrefs->allow_password_reset
$allow_demo_mode => $SysPrefs->allow_demo_mode
$app_title => $SysPrefs->app_title
$hide_inaccessible_menu_items => $SysPrefs->hide_inaccessible_menu_items
$comp_path => $SysPrefs->comp_path
$error_logfile => $SysPrefs->error_logfile
$old_style_help => $SysPrefs->old_style_help
$use_icon_for_editkey => $SysPrefs->use_icon_for_editkey
$dateformats => $SysPrefs->dateformats
$pagesizes => $SysPrefs->pagesizes
$xr_provider_authoritative => $SysPrefs->xr_provider_authoritative
$dflt_date_sep => $SysPrefs->dflt_date_sep
$dflt_date_fmt => $SysPrefs->dflt_date_fmt
$go_debug => $SysPrefs->go_debug
$show_sql => $SysPrefs->show_sql
$sql_trail => $SysPrefs->sql_trail
$pdf_debug => $SysPrefs->pdf_debug
$graph_skin => $SysPrefs->graph_skin
$build_version => $SysPrefs->build_version
$text_company_selection => $SysPrefs->text_company_selection
$xr_providers => $SysPrefs->xr_providers
$dflt_xr_provider => $SysPrefs->dflt_xr_provider
$UTF8_fontfile => $SysPrefs->UTF8_fontfile
$use_costed_values => $SysPrefs->use_costed_values
$clear_trial_balance_opening => $SysPregs->clear_trial_balance_opening
$show_users_online => $SysPrefs->show_users_online

Variables in config.php now properties in class sys_prefs

$this->config_allocation_settled_allowance
$this->time_zone
$this->allow_negative_stock => accessed thru method allow_negative_stock()
(Too many values wrapped by methods to be listed here)

Arrays referenced from $SysPrefs array

$dateseps => $SysPrefs->dateseps (actual index in array being taken from user_date_sep() function or $this->date_sep)
$thoseps => $SysPrefs->thoseps
$decseps => $SysPrefs->decseps

Variables now defined as Constants
(removed need to declare as global everywhere)

$db_duplicate_error_code => DB_DUPLICATE_ERROR (constant)
$_search_button => SEARCH_BUTTON
$_select_button => SELECT_BUTTON
$db_duplicate_error_code => DB_DUPLICATE_ERROR (Error Code 1062)
$table_style => TABLESTYLE
$table_style2 => TABLESTYLE2
BACKUP_PATH now defined in admin/backups.php
In sql split/formation: $all_items => ALL_TEXT (ie., blank string)

Notes:

  • All variables in config.default.php are now indented consistently. Beware lax "sed" hard coding in auto install scripts.

  • All standard themes renderer.php if $allow_demo_mode check to display SF logo removed url: https:/sourceforge.net/sflogo.php?group … amp;type=5

  • NULL arguments in functions being replaced with blank string

  • $SysPrefs now declared global for reports in doctext.inc (Author and Creator in pdf_reports.inc)

  • $SysPrefs needs to be declared global in the functions where it is used as is done now.

  • $_SESSION array element values in functions like
      $_SESSION["wa_current_user"]->prefs->transaction_days() => user_transaction_days()
      $_SESSION["wa_current_user"]->company => user_company()

  • js paths and file list array snippet moved from config.php to includes/main.inc

  • php.ini settings for error_reporting also moved from config.php to includes/main.inc

  • SQL_MODE (pending evaluation) set to blank string for now instead of the STRICT_ALL_TABLES,NO_ZERO_IN_DATE

Re: FA v2.4 development

Today's developments in FA v2.4:

The config.default.php in FA 2.4 will now be holding all the defaults and only changes in the variable values need to be stored in the config.php unlike the monolithic config.php in earlier versions.

Re: FA v2.4 development

Thank you, really!

Thanks to all FA contributors smile
Asghar

18 (edited by apmuthu 01/21/2015 08:43:53 am)

Re: FA v2.4 development

The current unstable FA 2.4 snapshot will install with some errors and will need fixes to the includes/current_user.inc attached herein.

--- includes/current_user.inc Mon Jan 19 16:57:39 2015
+++ includes/current_user.inc Wed Jan 21 03:15:25 2015
@@ -448,17 +448,26 @@
 
 function user_price_dec()
 {
- return $_SESSION["wa_current_user"]->prefs->price_dec();
+  global $SysPrefs;
+
+ return isset($_SESSION["wa_current_user"]) ? 
+   $_SESSION["wa_current_user"]->prefs->price_dec() : $SysPrefs->prices_dec;
 }
 
 function user_exrate_dec()
 {
- return $_SESSION["wa_current_user"]->prefs->exrate_dec();
+  global $SysPrefs;
+
+ return isset($_SESSION["wa_current_user"]) ? 
+   $_SESSION["wa_current_user"]->prefs->exrate_dec() : $SysPrefs->rates_dec;
 }
 
 function user_percent_dec()
 {
- return $_SESSION["wa_current_user"]->prefs->percent_dec();
+  global $SysPrefs;
+
+ return isset($_SESSION["wa_current_user"]) ? 
+   $_SESSION["wa_current_user"]->prefs->percent_dec() : $SysPrefs->percent_dec;
 }
 
 function user_show_gl_info()
@@ -481,15 +490,36 @@
 
 function user_date_display()
 {
-  global $SysPrefs;
-
- return isset($_SESSION["wa_current_user"]) ?
-   $_SESSION["wa_current_user"]->prefs->date_display() : $SysPres->dflt_date_sep;
+ $fmt ='m/d/Y';
+ if (isset($_SESSION["wa_current_user"])) {
+  $fmt = $_SESSION["wa_current_user"]->prefs->date_display();
+ } else {
+  $sep = user_date_sep();
+  $user_date_fmt = user_date_format();
+  switch ($user_date_fmt) {
+   case 0:
+    $fmt = "m".$sep."d".$sep."Y"; break;
+   case 1:
+    $fmt = "d".$sep."m".$sep."Y"; break;
+   case 2:
+    $fmt = "Y".$sep."m".$sep."d"; break;
+   case 3:
+    $fmt = "M".$sep."j".$sep."Y"; break;
+   case 4:
+    $fmt = "j".$sep."M".$sep."Y"; break;
+   default:
+    $fmt = "Y".$sep."M".$sep."j";
+  }
+ }
+ return $fmt;
 }
 
 function user_date_sep()
 {
- return $_SESSION["wa_current_user"]->prefs->date_sep();
+  global $SysPrefs;
+
+ return isset($_SESSION["wa_current_user"]) ?
+   $_SESSION["wa_current_user"]->prefs->date_sep() : $SysPrefs->dflt_date_sep;
 }
 
 function user_tho_sep()

SysPrefs is wrongly spelt as $SysPres one instance above. The switch case may be converted to an array whose index can choose the format string.

Post's attachments

install_error_FA24_fix.zip 25.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

Cleaned up and pushed to 2.4 repository.
There is a type in the push header:
Should read; Cleanup according to Apmuthu's list wink

Some of the user_date adds are not included. Will have to discuss this with Janusz.

Joe

20 (edited by apmuthu 01/25/2015 10:06:52 pm)

Re: FA v2.4 development

The current snapshot installs correctly.

Current progress in FA 2.4:

Installs without errors.
Report Headers2 now have SetCommonData variables available for use.
All session current_user data now have safe fallbacks on no user.

In FA 2.3, the js cache for the company was in:
./company/0/js_cache/
but now in FA 2.4 it is in
./company/0/js_cache/1,
./company/0/js_cache/2,
..


This is to have separate folders ($user_id) for each user so that date format and other specifics will not overwrite / constrain one another.

The files generally in the /tmp folder - faillog.php, errors.log, etc are to be placed above the webroot and hence are not in the release / repo and get generated on usage based on settings in the config.php file.

21 (edited by apmuthu 01/22/2015 06:15:26 pm)

Re: FA v2.4 development

Non Field DB Data inclusion into reports and data entry forms for FA 2.3 is in my GitHub FAMods repo.

The enablers for it ported for FA 2.4 have been submitted to the devs and attached herein.

The actual implementation will vary across implementations and hence the devs may not want the specifics in my FAMods to be ported.

In FA 2.4, the function get_supplier_details_to_order() is in purchasing/includes/db/po_db.inc whereas in FA 2.3 it was in purchasing/includes/ui/po_ui.inc. Form customisations should still be made in the latter.

Post's attachments

FA24_NonFieldDBdata_inclusions.zip 51.3 kb, 1 downloads since 2015-01-22 

You don't have the permssions to download the attachments of this post.

22 (edited by apmuthu 04/25/2015 04:57:04 pm)

Re: FA v2.4 development

Today's snapshot of FA 2.4 installs correctly but reports will not display correctly unless line 759 of includes/current_user.inc - function company_path() is changed from:

return ($comp_path[0]=='.' ? $path_to_root.'/'.basename($comp_path) : $comp_path);

to

return $path_to_root.'/'.(in_array($comp_path[0], Array('.', '/')) ? $comp_path : basename($comp_path));

(devs have been notified)

In FA 2.3, in config.php:
$comp_path = $path_to_root.'/company';

In FA 2.4, in config.php:
$comp_path = dirname(__FILE__).'/company';
Now relative paths too can be used. If they are outside the webroot, either an apache conf alias or a symlink may be used.
The equivalent of the default for reporting purposes is:
$comp_path = '../company';
and  if it is to be reporting/company:
$comp_path = './company';
and if at the webroot:
$comp_path = '/company';

The use of relative addressing was generally fraught with various path value consequences but now that a wrapper function is used, all should be well.

All upgrades will now have a log file at tmp/upgrade.#.log where # is the company number. (Attached screenshot).
Logs can now be viewed from within FA - themes may need to accommodate it if hardcoded.

A new patch class has been made and the upgrade php files now use it.

Default utf-8 collation of the database changed from general to unicode.

Post's attachments

FA_Upgrade_Log_UI.png 30.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

The standard Charts of Accounts have redundant indices. A cleaned up set is attached for incorporation into the current Hg repo.

Post's attachments

FA24_rendundant_keys.zip 55.9 kb, 2 downloads since 2015-01-26 

You don't have the permssions to download the attachments of this post.

Re: FA v2.4 development

I see the extension repo in 2.4 still points to the old 2.3 files. Could we get a 2.4 directory on the repo server with UTF versions of the charts, translations etc?

25 (edited by apmuthu 02/04/2015 06:28:40 am)

Re: FA v2.4 development

The immediate priority is to get everything in 2.4 working for all functionality that exists in 2.3 and hence the retention of the 2.3 repo. Many fixes to the standard CoAs too are yet to get into the core and rely on "initial auto upgrades" for now. Subsequent fixes to 2.3 have yet to be merged into 2.4 as well. All updated extension files are available in my GitHub repo including ones not in the official pkg repo.

As a short term measure, it may be okay to clone the 2.3 repo (or symlink it) and make the changes in the core to point to it.

In fact as on date, no updates have occurred to the 2.3 repo itself since 28th Dec, 2014, though many contributions have been received into the official mailbox as stated in the forums since then.