26 (edited by apmuthu 03/08/2015 06:48:28 am)

Re: FA v2.4 development

A bunch of changes have been pushed from the dev's repos to the FA 2.4 Unstable Hg repo a few days ago.

The reports display error on Windows listed in the 22nd post (has fix there as well) in this thread still exists. The devs have been informed.

The current snapshot of FA v2.4 does not install out of the box for the demo CoA since in the sql/en_US-demo.sql there is an Error in field type change in it's line 836:

`type_no` `type_no` int(11) NOT NULL default '0',

which should be:

`type_no` int(11) NOT NULL default '0',

The Devs have been informed.

Here is a short list of changes in the Unstable FA 2.4 codebase since my last reporting post:

  • Changes in db schema gl_trans.type_no optimized to int, changed lock_stock.reorder_level type to double.

  • Added dimension edition on purchase invoice entry.

Files affected

purchasing/includes/ui/invoice_ui.inc
purchasing/includes/ui/po_ui.inc
purchasing/includes/db/invoice_db.inc
purchasing/includes/db/invoice_items_db.inc
purchasing/includes/supp_trans_class.inc
purchasing/includes/po_class.inc
purchasing/includes/purchasing_db.inc

sql/en_US-new.sql

Field Type changes:
0_gl_trans.type_no bigint(16) default 1 => int(11) default 0
0_loc_stock.reorder_level bigint(20) => int(11)

Appended 2 new fields to 0_supp_invoice_items:
  `dimension_id` int(11) NOT NULL DEFAULT '0',
  `dimension2_id` int(11) NOT NULL DEFAULT '0',

sql/en_US-demo.sql

Same as above.
Demo data INSERT statements extended with 0 values for the 2 new fields in 0_supp_invoice_items

sql/alter2.4.sql: UPDATE and ALTER statements for the above changes

reporting/includes/class.mail.inc: Cleanup and preparing for XLS extension
gl/manage/bank_accounts.php: Better Error Message when trying to use GL Accounts with transactions
reporting/includes/reporting.inc: Wrong no. of parameters for Invoice (rep107)
includes/ui/ui_controls.inc: $timeout parameter added to function meta_forward()
includes/db/inventory_db.inc
: Removed unused function update_stock_move_pid()
purchasing/includes/db/invoice_db.inc
: Removed commented out function update_stock_move_pid() usage

Fixed initialization of company specific settings in SysPrefs:

includes/prefs/sysprefs.inc: New function refresh_company_prefs() added
(Devs: spelling mistakes in a few places for the word 'preferences')
$_SESSION['SysPrefs']->db_ok becomes $SysPrefs->db_ok in

  • includes/session.inc

  • sales/sales_order_entry.php

  • admin/db/company_db.inc

Added mysql query retry after database deadlock detection.

includes/db/connect_db.inc: New constant MAX_DEADLOCK_RETRY defined
The 2 db driver files use it:
includes/db/connect_db_mysqli.inc
includes/db/connect_db_mysql.inc

Small cleanup to branch name length in input form and printouts.

Affected files - can be backported:

Attachments were not moved to new transaction after edition for some document types.

admin/db/attachments_db.inc: New function move_trans_attachments() added
Used in:

  • gl/includes/db/gl_db_banking.inc

  • sales/includes/db/sales_invoice_db.inc

  • sales/includes/db/sales_delivery_db.inc

  • purchasing/includes/db/invoice_db.inc

includes/access_levels.inc: Additional access control related ui helpers added - check_edit_access, access_post, access_num

27 (edited by apmuthu 03/24/2015 11:22:45 am)

Re: FA v2.4 development

FA v2.3.23 stable has been released and it's updates have been merged into FA v2.4 dev repo and some more fixes incorporated into the latter.

28 (edited by apmuthu 03/26/2015 06:14:51 am)

Re: FA v2.4 development

Developments to the Unstable branch FA v2.4 have now been synched with changes from the Stable FA v2.3 on the release of FA v2.3.23. Further changes have been committed to the Unstable branch. This set of changes discerned since last reported pertain to this Hg snapshot.

The error reported in the 22nd post in this thread is still present in this snapshot.

The error in the sql/en_US-demo.sql for field definition is now rectified and the demo CoA installs correctly. The CoAs still have redundant indices - the devs have been informed.

Typos:
jiurnal
=> journal in comment on line 156 in sql/alter2.4.sql
multiply
=> multiple in comment on line 195 in sql/alter2.4.sql
hiddn
=> hidden in comment in line 96 in includes/ui/ui_input.inc

SQL Changes:
Improved journal trans: added currency support, tax and source document date and allow multiple customer/supplier allocations to single journal transaction:

New table 0_journal added - full support for any journal transaction
- no demo CoA entries as yet
- populate with:

INSERT INTO `0_journal` (`type`, `trans_no`, `tran_date`, `reference`, `event_date`,`doc_date`,`currency`,`amount`)
 SELECT `gl`.`type`, `gl`.`type_no`, `gl`.`tran_date`, `ref`.`reference`, `gl`.`tran_date`,
   `gl`.`tran_date`, `sys_curr`.`value`, SUM(IF(`gl`.`amount`>0,`gl`.`amount`,0))
 FROM `0_gl_trans` gl LEFT JOIN `0_refs` ref ON gl.type = ref.type AND gl.type_no=ref.id
 LEFT JOIN `0_sys_prefs` sys_curr ON `sys_curr`.`name`='curr_default'
 WHERE `gl`.`type` IN(0, 35)
 GROUP BY `type`,`type_no`;

0_cust_allocations.person_id field added and made part of unique key
0_debtor_trans.debtor_no populated into 0_cust_allocations.person_id

0_supp_allocations.person_id field added and made part of unique key
0_supp_trans.supplier_id populated into 0_supp_allocations.person_id

Added memo, usage fields to Quick Entries:
0_quick_entries.usage field added as a description field to denote where it should be used
0_quick_entry_lines.memo field added as a description field

Tax algorithm handling on supplier side is reverted as impractical:
0_suppliers.tax_algorithm field removed
0_supp_trans.tax_algorithm field removed

0_sys_prefs has a tax_algorithm entry default for customers only
includes/sysnames.inc has:

$tax_algorithms = array( 
 TCA_LINES => _("Sum per line taxes"), 
 TCA_TOTALS => _("Taxes from totals")
);

and is used in function get_tax_for_items() defined in taxes/tax_calc.inc

0_trans_tax_details.reg_type TINYINT added (0, 1 or NULL in the demo CoA data) and is populated with:

UPDATE `0_trans_tax_details` reg
 SET reg.reg_type=1
 WHERE reg.trans_type IN(20, 21); -- ST_SUPPINVOICE, ST_SUPPCREDIT

UPDATE `0_trans_tax_details` reg
 SET reg.reg_type=0
 WHERE reg.trans_type IN(10, 11); -- ST_SALESINVOICE, ST_CUSTCREDIT

New defines in includes/types.inc:

// tax register type
define('TR_OUTPUT', 0); // sales
define('TR_INPUT', 1); // purchase

0_gl_trans.type_no field definition in sql/en_US-demo.sql now stands corrected

Theme and cleanup changes:
Code cleanup for standard themes ported from FA 2.3 but inter-theme renderer.php files do not yet have their whitespace synched.
General code cleanup and HTML 4.01 compliance ported from FA 2.3 - some tag endings "/>" now become ">" whilst certain tag attribute values are quoted.
Improved error messages in transaction voiding
Sales invoice voiding is blocked when sales credit was issued against the invoice.

Class sys_prefs Method renamed:
$SysPrefs->refresh_company_prefs() => $SysPrefs->refresh()

New functions in UI:
tab_opened($name, $tab)
tab_closed($name, $tab)
tab_visible($name, $tab)
display_caption($msg) to display in <caption> tag added

//Confirm dialog to be used optionally in final form checking routine.
//Displays warning conditionally unless it was displayed
display_confirmation($msg)

New gl function for counter party name:
get_subaccount_data($code_id, $person_id)

Functions moved:
function write_journal_entries(&$cart) moved from gl/includes/db/gl_db_trans.inc to gl/includes/db/gl_journal.inc with single argument
function void_journal_trans($type, $type_no, $use_transaction=true) moved from includes/db/gl_db_trans.inc to new file gl/includes/db/gl_journal.inc

New file gl/includes/db/gl_journal.inc added

Now officially part of 0_sys_prefs table in CoA:
bcc_email
alternative_tax_include_on_docs
suppress_tax_rates

grn_clearing_act
default_receival_required
default_quote_valid_days
no_zero_lines_amount
show_po_item_codes
accounts_alpha
loc_notification
print_invoice_no
allow_negative_prices
print_item_images_on_quote

Theme fix for cool and default themes that still refer to the now defunct variable $allow_demo_mode along with white space synch is attached herein. The devs have been notified to make the necessary change.

Post's attachments

FA24_renderer_patch.zip 17.3 kb, file has never been downloaded. 

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

29 (edited by apmuthu 03/29/2015 01:38:21 pm)

Re: FA v2.4 development

FA 2.4 development moved to Git on Sourceforge. Official FA Unstable 2.4 repo is at GitHub.

The error reported in the 22nd post in this thread is still present in this snapshot.

$allow_demo_mode fixed in renderer.php files all themes but whitespace not synched between them as yet - patched files for whitespace synch attached.

Post's attachments

fa24_renderers_2015-03-29_patch.zip 18.2 kb, 1 downloads since 2015-03-29 

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

30 (edited by apmuthu 04/02/2015 05:00:12 am)

Re: FA v2.4 development

The version 2.4's CoAs seem to have an extra area (permission) for practically all roles - 775 (Edit other users transactions).
Is this intended?
This is appended to the end of the areas field value.

31 (edited by apmuthu 04/07/2015 05:35:23 pm)

Re: FA v2.4 development

All changes in the unstable FA 2.4 branch on and after 2015-03-31 till and including 2015-04-06 have been checked out and committed to my Unofficial GitHub Repo.

The error reported in the 22nd post in this thread is still present in this snapshot.

The Security Role fix has yet to be ported in from FA 2.3.

Here is a summary of changes:

Foreign language characters in password now allowed
0_sys_prefs.value changed from tinytext in FA 2.3 to TEXT NOT NULL default ''
demo data fiscal year and transactions moved from 2013-2014 to 2014-2015

Prices adjusted for discount directly from form field
Existing entries adjusted with:

UPDATE `0_stock_moves` SET + price = price*(1-discount_percent);

Removed fields:

  • stock_moves.visible,

  • stock_moves.discount_percent

API functions and CoAs adjusted accordingly.

  • Sales Kits: 3rd parameter in function update_component($kit_code, $selected_item) dropped

  • function get_mb_flag($stock_id) moved from includes/db/manufacturing_db.inc to includes/db/inventory_db.inc

  • Adjusted file includes accordingly everywhere

  • Renamed includes/manufacturing.inc to includes\inventory.inc

32 (edited by apmuthu 04/09/2015 01:02:06 pm)

Re: FA v2.4 development

Changes in the FA 2.4 Unstable branch till 2015-04-08:

The error reported in the 22nd post in this thread is still present in this snapshot.

The Security Role fix has yet to be ported in from FA 2.3.

1. Removed $type in argument of function add_stock_transfer()
2. $line_item->qty from form field used instead of $increase from POST in Inventory Adjustments
3. Reorganised many SQLs to have table aliases
4. Field stock_move.person_id now no longer in rep3xx.php Inventory Reports and stock movements inquiry
5. function get_stock_movements() moved from inventory/includes/db/movement_types_db.inc to inventory/includes/inventory_db.inc
6. Removed Inventory &Movement Types Menu item from Inventory menu
7. Moved Inventory &Locations Menu link from left side to right side.
8. Removed files inventory/includes/db/movement_types_db.inc
9. Removed inventory/manage/movement_types.php
10. Removed stock_movement functions
11. item cart is now updated directly from the form field's $line_item->stock_id

Removed stock_move.person_id field

ALTER TABLE `0_stock_moves` DROP COLUMN `person_id`;

Removed 0_movement_types table

DROP TABLE IF EXISTS `0_movement_types`;

Re: FA v2.4 development

I have a few small bugs and a bunch of questions. I'm doing a virgin install of 2.4 based on apmuthu's git repo, which I've forked on GitHub.

The demo data doesn't install thanks to a SQL error.

core\sql\en_US-demo.sql line 2022 has a "default ''" on a text field, which is illegal. The same is true for
core\sql\en_US-new.sql line 1776.

I'm likely to find a few more things like this along the way. At some point I'm likely to start hacking on some of the code in a bigger way, mostly refactoring stuff. That said I don't want to have an unmaintainable orphan on my hands, so I'm not sure where the best place to send push requests is, apmuthu's repo or the git repo on Sourceforge.

Also:
- Is there a policy on PHP support? Can we code to 5.4?
- My IDE is complaining about ANSI encoding in various files. Is there a problem with converting them to UTF?

Re: FA v2.4 development

FA 2.4 is heading towards PHP 5.4 and UTF-8 fully. Use "UTF-8 without BOM" in your IDE.

Is default '' illegal for text fields?

See if there have been changes in the latest FA 2.4 build.

I see you have forked the official FA Unstable as well - that is the way to go - not a fork of my frontac24.

Re: FA v2.4 development

Changes in FA 2.4 unstable till 2015-04-21:

The error reported in the 22nd post in this thread is still present in this snapshot.

DB Schema Changes:

ALTER TABLE `0_cust_branch` DROP KEY `branch_code`;
ALTER TABLE `0_supp_trans` DROP KEY `SupplierID_2`;
ALTER TABLE `0_supp_trans` DROP KEY `type`;
  • Ported all fixes in FA v2.3.24 to the FA 2.4 stream.

  • Collation settable in Company Creation / Installer.

  • Option to preserve security roles during import of CoA.

36 (edited by apmuthu 04/28/2015 06:08:33 pm)

Re: FA v2.4 development

FA v2.4 is now fully installable and the reports display with correct paths in Windows thanks to Joe's commit reverting to FA v2.3 config variable $comp_path assignment.

The above commit now means that relative path addressing listed in the 22nd post in this thread is no longer valid.

Re: FA v2.4 development

The changes in the master FA 2.3 branch have now been merged into the FA 2.4 branch and a separate PKG repo branch has been created for v2.4 and set in the current FA 2.4 snapshot.

The set of PKGs available in the FA 2.4 Repo are shown in the screenshots in my FA24 Unofficial GitHub Repo's Issues Page.

38 (edited by apmuthu 07/26/2015 06:23:04 pm)

Re: FA v2.4 development

Screenshots of FA 2.4 Beta - Install, Usage and Extensions available.

FA v2.4 beta can be installed after incorporating the fix detailed in this post.

sys_types and movement_types tables are still present in en_US-demo.sql while being absent in en_US-new.sql - not used in FA 2.4.

journal, reflines and wo_costing are the new tables introduced in FA v2.4.

If you have installed the en_US-demo.sql, then update the currency symbols with:

UPDATE `0_currencies` SET `curr_symbol`='£' WHERE `curr_abrev`='GBP'; 
UPDATE `0_currencies` SET `curr_symbol`='€' WHERE `curr_abrev`='EUR'; 

The demo data has been pruned and computer images (items) have been replaced with the more contemporary cell phone images.

PDFs render well in windows without any cludge fixes anymore.

rep709.php fix in FA v2.3 not ported to FA 2.4 as yet.

demouser is no longer in the en_US-demo.sql

The $src_version variable is now "2.4 beta" and is different from the $db_version which is "2.4.0" in version.php.


Anyone using it in production?

39 (edited by apmuthu 07/30/2015 07:26:39 am)

Re: FA v2.4 development

apmuthu wrote:

FA v2.4 beta can be installed after incorporating the fix detailed in this post.

sys_types and movement_types tables are still present in en_US-demo.sql while being absent in en_US-new.sql - not used in FA 2.4.

journal, reflines and wo_costing are the new tables introduced in FA v2.4.

If you have installed the en_US-demo.sql, then update the currency symbols with:

UPDATE `0_currencies` SET `curr_symbol`='£' WHERE `curr_abrev`='GBP'; 
UPDATE `0_currencies` SET `curr_symbol`='€' WHERE `curr_abrev`='EUR'; 

The above have now been set right in the FA Repo commits 1 and 2.

Screenshots of FA 2.4 Beta - Install, Usage, Extensions available and Themes.

Re: FA v2.4 development

FA 2.4 Official Repo PKGs as available today within the FA application as screenshots are posted in the wiki in my unofficial GitHub.

41 (edited by apmuthu 08/31/2015 03:22:43 pm)

Re: FA v2.4 development

Ref: Recent commit into the FA 2.4 branch:
PDF documents sent by email have now meaningful names.

Remove erroneous line 134 inreporting/includes/class.email.inc - stands removed in commit.

            for ($i = 0; $i < $max; $i++)

In order to use this functionality for download as well (insecure), lines 972 to 975 in  reporting/includes/pdf_report.inc:

//            if ($email == 1)
//                $fname = $dir.'/'.$this->filename;
//            else    
            $fname = $dir.'/'.uniqid('').'.pdf';

should be uncommented as:

            if ($email == 1)
                $fname = $dir.'/'.$this->filename;
            else    
                $fname = $dir.'/'.uniqid('').'.pdf';

It is better to have some switch flag in the company preferences to do this instead if desired.

This feature can be safely backported into FA 2.3 if needed.

The other two commits too can be backported to FA 2.3:
Void a Transaction: fixed GRN voiding.
Fixed sparse js dialog when canceling sales document entry.

42 (edited by apmuthu 09/02/2015 09:11:26 pm)

Re: FA v2.4 development

The FA 2.4 Config.php page has been put up in the wiki. Please go through the contents and suggest / make changes as required.

The following variables are no longer there in the config.php file:

$no_zero_lines_amount = 1;
$save_report_selections = 0;
$use_date_picker = 1;
$show_po_item_codes = 0;
$def_print_destination = 0;
$def_print_orientation = 0;
$accounts_alpha = 0;
$loc_notification = 0;
$print_invoice_no = 0;
$alternative_tax_include_on_docs = 0;
$suppress_tax_rates = 0;
$allow_negative_prices = 1;
$print_item_images_on_quote = 0;
$js_path = $path_to_root.'/js/';'''
$js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
$js_lib = $js_userlib = array();

Many of the above variables are still referred to in the code in files like header.inc and needs to be verified with it's counterpart now being in the sys_prefs table.

43 (edited by apmuthu 12/06/2015 08:46:37 am)

Re: FA v2.4 development

FA 2.4 now has a Fixed Asset application which provides for a new mb_flag value of 'F' for Fixed Asset along with a new table stock_fa_class and a few new fields in stock_master table and an extra field in locations table with appropriate extended security roles. All Charts will need to be updated accordingly.

Two new sys_prefs have been added as well: default_loss_on_asset_disposal_act account code and depreciation_period flag (1 = Yearly, 0 = Monthly defined in includes/types.inc). The $depreciation_methods array is defined in includes/sysnames.inc (D - Declining balance, S - Straight line, O - One-time).

The assets_register extension (obsolete for FA v2.4 now) uses the SA_ASSETS security descriptor whilst this new application uses the singular SA_ASSET security descriptor.

The attachments are screenshots with default roles and enabled roles for this application.

Post's attachments

FA_FixedAssets.zip 25.9 kb, 1 downloads since 2015-12-04 

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

44 (edited by apmuthu 12/11/2015 03:54:05 pm)

Re: FA v2.4 development

Additional fixes to the last set of commits in the FA 2.4 branch can be taken from my unofficial FA 2.4 repo:

Fixed es_MX installer translation files

Fixed typo in en_US-new.sql: Finsihed => Finished

*** As of 2015-12-11, the above fixes have been incorporated into the Official FA 2.4 core.

45 (edited by apmuthu 12/08/2015 10:54:22 am)

Re: FA v2.4 development

Fixed Assets application has been extended and debugged in commits yesterday and today.

Some icons for login and others have been changed for the standard themes.

There are some ERD issues as in the attachment that need to be sorted out.

The $depreciation_methods array is defined in includes/sysnames.inc (D - Declining balance, S - Straight line, N -  Sum of the Year Digits, O - One-time) has now been extended to include sum-of-the-year digits method, fixed declining balance method.

The version seems to have been bumped to 2.4.1 in the upgrade file sql/alter2.4rc1.php, but the version.php file and the sys_prefs table still show 2.4.0 in the en_US-new.sql and en_US-demo.sql files:

INSERT INTO `0_sys_prefs` VALUES ('version_id', 'system', 'varchar', 11, '2.4.0');

.

Post's attachments

FA_2.4_anomalies.png 48.6 kb, 2 downloads since 2015-12-08 

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

46 (edited by apmuthu 12/12/2015 05:15:49 am)

Re: FA v2.4 development

The ERD Anomalies in the previous post have been addressed in today's commits along with the typo fix in en_US.new.sql in the 44th post.

The FA version number will be updated during release of FA v2.4rc1 as also the *.mo files in the install/lang language folders along with all translations in the core.

Company level configurable sys_prefs (company.setup) options to be able to hide the Fixed Assets and Manufacturing applications are now available in today's commit - use_manufacturing and use_fixed_assets.

Two new config file options have been introduced - $use_popup_search and $max_rows_in_search - enabling popup search in Customers, branches, suppliers, inventory, fixed assets and GL Accounts.

Some 14px icons have been replaced by 16px icons but the css is retained to display them as 14px icons.

A small fix to the upgrade scriptis in my repo. Committed in the official core now.

stock_fa_class table field widths and form field widths for Fixed Assets Classes form is attached for review and correction.

Post's attachments

FA_2.4_Fixed_Assets_Classes.png 27 kb, file has never been downloaded. 

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

47 (edited by apmuthu 12/12/2015 06:04:06 am)

Re: FA v2.4 development

Todays commits have removed the popup search feature for Fixed Assets since there will be only a few in most accounting scenarios. The commits are:

Removed fixed assets from list item search and popup search.
and
Rerun of last non fixed assets search.

The above can be reverted for those who want it - use cases: Asset / Equipment / Building Leasing companies and large Fixed Asset companies.

48 (edited by apmuthu 12/13/2015 04:21:46 am)

Re: FA v2.4 development

Today's commits have brought on FA v2.4RC1 with most FA 2.3 bugfixes ported forward to FA 2.4.
The de_DE and pt_PT install language strings need to be fixed in the core. It is available from my unofficial FA 2.4 repo.

FA 2.4.x sports a new feature while restoring a backup - the default option of keeping existing security settings.

Post's attachments

FA_2.4_BackupRestore.png 12.5 kb, 1 downloads since 2015-12-13 

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

49 (edited by apmuthu 12/16/2015 07:54:48 am)

Re: FA v2.4 development

Today's commits have replaced aqua and cool standard themes with canvas and dropdown themes.

Dashboards can now be used in all themes with these new commits.

When we logout, the user session is completely destroyed and if the "login again" link is clicked, the previous session's username is not pre-populated in it's form field.

A small bugfixis necessary for thecanvastheme to show the graphic links and standscommitted in my unofficial repo. This has now been committed in the official repo.

The de_DE and pt_PT install lang files have yet to be corrected in the official repo. It stands committed in my unofficial repo.

Post's attachments

FA 2.4 Dashboard Link on default theme.png 12.7 kb, file has never been downloaded. 

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