4,601

(65 replies, posted in Setup)

You may even update the files in the package after installation but before activation / usage with the ones in my github repo.

All the FA repo language package *.mo files have been unformatted back into their constituent *.po files so as to enable translation of the remaining strings taken from the empty.po file.

The commit is in my unofficial GitHub repo.

It was done in DOS CLI using PoEdit:

mkdir done
FOR %a IN (*.mo) DO "C:\Program Files\Poedit\bin\msgunfmt" "%a" -o done/"%~na".po

4,603

(65 replies, posted in Setup)

Does the official extension "import_transactions" serve the purpose?

In the standard en_US-new.sql and en_US-demo.sql Charts of Accounts, there are many fields that should be varchar and not char.

Here are the set of SQL statements that can be safely executed in most recent FA v2.3 installs and can be ported to the FA v2.4 branch as well.

ALTER TABLE `0_bom` 
    CHANGE `parent` `parent` VARCHAR(20) DEFAULT '' NOT NULL, 
    CHANGE `component` `component` VARCHAR(20) DEFAULT '' NOT NULL, 
    DROP INDEX `parent`, 
    DROP PRIMARY KEY, ADD PRIMARY KEY (`parent`, `loc_code`, `component`, `workcentre_added`); 

ALTER TABLE `0_credit_status` CHANGE `reason_description` `reason_description` VARCHAR(100) DEFAULT '' NOT NULL;
ALTER TABLE `0_payment_terms` CHANGE `terms` `terms` VARCHAR(80) DEFAULT '' NOT NULL;

ALTER TABLE `0_purch_data` 
    CHANGE `suppliers_uom` `suppliers_uom` VARCHAR(50) DEFAULT '' NOT NULL, 
    CHANGE `supplier_description` `supplier_description` VARCHAR(50) DEFAULT '' NOT NULL;

ALTER TABLE `0_sales_types` CHANGE `sales_type` `sales_type` VARCHAR(50) DEFAULT '' NOT NULL;

ALTER TABLE `0_salesman` 
    CHANGE `salesman_name` `salesman_name` VARCHAR(60) DEFAULT '' NOT NULL, 
    CHANGE `salesman_phone` `salesman_phone` VARCHAR(30) DEFAULT '' NOT NULL, 
    CHANGE `salesman_fax` `salesman_fax` VARCHAR(30) DEFAULT '' NOT NULL;

ALTER TABLE `0_stock_moves` CHANGE `reference` `reference` VARCHAR(40) DEFAULT '' NOT NULL;

ALTER TABLE `0_workcentres` 
    CHANGE `name` `name` VARCHAR(40) DEFAULT '' NOT NULL, 
    CHANGE `description` `description` VARCHAR(50) DEFAULT '' NOT NULL;

ll these and more are available in my GitHub FAMods folder.

4,605

(6 replies, posted in Dimensions)

I already wiki-ed it. I wanted to know if there are any more caveats to it's use that needs to be documented.

4,606

(12 replies, posted in Installation)

That is nice feedback indeed and has been wiki-ed as another way to troubleshoot it and possibly incorporate these fixes in future versions of the extension/theme.

4,607

(12 replies, posted in Installation)

Check the entries in the sys_prefs table for any company wide defaults and in any of the installed_extensions.php files across the company subfolders.

4,608

(6 replies, posted in Dimensions)

Please elaborate it on the Wiki where this has been listed.

4,609

(7 replies, posted in Announcements)

All fixes since the release of FA v2.3.22 are attached herein. No DB schema changes.

Only critical backports will be done for v2.3.x henceforth.

For backports and mods visit FAMods in my unofficial GitHub folder.

FA v2.4 is now installable for new instances and development is rapidly progressing.

4,610

(65 replies, posted in Setup)

@joe: In fact a few posts earlier, we found that the thread evolved into a FA Setup Tips topic and I wikied it as such for want of some forum feature to fork a part of it as a separate topic... This new topic can begin with the 13th post in this thread onwards.

For those who partook of my fix in the 35th post in this thread can now update it with the superceeded commit.

4,611

(2 replies, posted in Reporting)

Refer Tips and Tricks in the Languages page in the FA Wiki and search the forums as well.

4,612

(2 replies, posted in Reporting)

Put all your custom reports in the company/#/reporting folder if you want it for a specific company alone. There will also be a need to put in form parameters for the report in the reports_main.inc file. Have a look at how the reports are made in the existing extensions expanded out in my GitHub repo.

4,613

(65 replies, posted in Setup)

Spot on! That's the right way for human readability. But... linux has a patch command to auto-magically traverse thru the folder tree and apply such "diffs" (can be generated from WinMerge - Unified Diff and adjusting for CRLF=>LF UnixDos differences in line endings).

Since there was one other key in the table that mimicked the first part of the proposed new re-arranged  Primary Key, we call it a redundant index and have it removed.

Making a new CoA from the en_US-new.sql will be the right way to proceed. The one in my updated FAMods folder has all the changes necessary. You need to change the order of currencies and their default id and rate value to 1 for the home currency making it the first one and the default currency in the users table and in the sys_prefs tables' data. If you add new account heads then space them numerically in steps of 10 or 5 and huddle them together logically for ease of sifting thru later. You may also want to adjust the fiscal_years table to suit your current and future installs.

4,614

(65 replies, posted in Setup)

You will nevertheless need the fixes in my previous post as the error in update_bom() will show up when used.

Study the backup file sql and compare it with the original and see where Navicat (that specific version/build) falters. It is possible that your Navicat install expects the keyword "FOREIGN KEY" instead of the plain and possibly ambiguous "KEY" or it is expecting the equivalent "INDEX", in which case it is likely to affect quite a few tables!

The entire fix is now in the FAMods in my GltHub repo.

4,615

(5 replies, posted in Manufactoring)

Please refer Forum Post and let us know if it fixed it for you.

The "id" field instead of the "component" field was being compared till now for "update_bom()" function!

4,616

(65 replies, posted in Setup)

Try making it:

  PRIMARY KEY  (`parent`,`loc_code`,`component`,`workcentre_added`),
  KEY `component` (`component`),
  KEY `id` (`id`),
  KEY `loc_code` (`loc_code`),
  KEY `workcentre_added` (`workcentre_added`)

to remove redundant indices but that is not the fix.


The fields parent and component refer to stock_id which is varchar(20) in the other tables and hence these two should be varchar(20) too but that should not generally be the cause of any problems except for type matching and index based joins.

The following sql will achieve the above changes:

ALTER TABLE `0_bom` 
    CHANGE `parent` `parent` VARCHAR(20) DEFAULT '' NOT NULL, 
    CHANGE `component` `component` VARCHAR(20) DEFAULT '' NOT NULL, 
    DROP INDEX `parent`, 
    DROP PRIMARY KEY, ADD PRIMARY KEY (`parent`, `loc_code`, `component`, `workcentre_added`); 

The file / function that is in error is:

includes/db/manufacturing_db.inc => update_bom()

function update_bom($selected_parent, $selected_component, $workcentre_added, $loc_code, $quantity)
{
    $sql = "UPDATE ".TB_PREF."bom SET workcentre_added=".db_escape($workcentre_added)
     . ",loc_code=".db_escape($loc_code) . ",
        quantity= " . $quantity . "
        WHERE parent=".db_escape($selected_parent) . "
        AND id=".db_escape($selected_component);
    check_db_error("Could not update this bom component", $sql);

    db_query($sql,"could not update bom");
}

should be

function update_bom($selected_parent, $selected_component, $workcentre_added, $loc_code, $quantity)
{
    $sql = "UPDATE ".TB_PREF."bom SET workcentre_added=".db_escape($workcentre_added)
     . ",loc_code=".db_escape($loc_code) . ",
        quantity= " . $quantity . "
        WHERE parent=".db_escape($selected_parent) . "
        AND component=".db_escape($selected_component);
    check_db_error("Could not update this bom component", $sql);

    db_query($sql,"could not update bom");
}

The only two functions there that use the id field in the 0_bom table are:

  • delete_bom()

  • get_component_from_bom()

*** The fix listed above for the file manufacturing_db.inc is not correct ***
It has been superceeded by a later commit in my GitHub Repo. - Thanks @itronics for pointing me in the right direction.

4,617

(12 replies, posted in Installation)

This has now been wiki-ed.

4,618

(65 replies, posted in Setup)

When you do some testing see if you want to try this patch which is a backport from FA v2.4 where some legacy bugs are aslo fixed.

--- old/sales/customer_payments.php    Mon Sep 29 21:21:28 2014
+++ new/sales/customer_payments.php    Wed Jan 07 00:24:14 2015
@@ -54,6 +54,7 @@
         if($inv) {
             $_SESSION['alloc']->person_id = $_POST['customer_id'] = $inv['debtor_no'];
             $_SESSION['alloc']->read();
+            $_POST['BranchID'] = $inv['branch_code'];
             $_POST['DateBanked'] = sql2date($inv['tran_date']);
             foreach($_SESSION['alloc']->allocs as $line => $trans) {
                 if ($trans->type == ST_SALESINVOICE && $trans->type_no == $_GET['SInvoice']) {
@@ -247,9 +248,6 @@
 //    unset($_POST['branch_id']);
     $Ajax->activate('BranchID');
 }
-//if (isset($_POST['_DateBanked_changed'])) {
-//  $Ajax->activate('_ex_rate');
-//}
 
 //----------------------------------------------------------------------------------------------
 

The progress of this thread exposes how much I took for granted that anyone would be able to adopt the full disclosures on my GitHub Repo inspite of the regular cross referencing of the wiki to the forum posts.

4,619

(13 replies, posted in Wish List)

@cambell: I understand your development convenience.

CSS files that need tweaking in one version will need to be "re-tweaked" in subsequent versions for end users and the locations in the concatenated css file will then have to be traced back to it's source fragment file each time. The alternative would be to include a file that includes all these files in turn. I have used such in-situ testing of CSS in FireFox's FireBug feature and found it cumbersome - YMMV.

Also if there are too many files that need tweaking in the core, see if they fit a pattern to be included from a single file. They could be functions and / or template code. See what is the easiest way to merge the two together so that we can work from a common core.

A sort of a $Is_Mobile_Theme variable ....
on the lines of RTL ...

4,620

(65 replies, posted in Setup)

Please be aware that some files should be uploaded together.

The ones in the company folder are not required if you do not want to use the extra info option (CID, BinLoc) which enables the printing of the Branch ID (either external lookup Branch ID in the notes field or in it's absence, the branch_code field)  and the Bin Location in the long_description field in the Packing List report. It is explained in the Wiki Page for Bin Location in FA.

The admin backups file is used to provide extended functionality for backup file renaming and for execution of various linux commands and outputting the results in the browser. It is discussed in this post.

There is also some code (header2.inc) to display a pretty PayPal link in the Invoice - discussed in this post and later updated in my repo.

Congrats. You are making exemplary progress indeed inspite of our "half way across the world timezone human latency".

4,621

(13 replies, posted in Wish List)

@cambell: Whilst the development of the theme will benefit from such splitups of more/less code, the releases for end user usage and feedback / troubleshooting / fixing code may prove to be cumbersome if it is needs to be back referenced to the original files that made up the file being investigated.

4,622

(1 replies, posted in FA Modifications)

Have you made any fixes to the code to achieve this that you would like to submit here in?

FA v2.4 is now installable for new instances. Follow it on this post.

4,624

(4 replies, posted in Dimensions)

Anyone can verify this claim?

You're right. Maybe we need a last document customer change option as most such errors are realised the moment we hit the enter button!

There are many ways an invoice can be entered. The most common place such an error would arise is in a Direct Invoice entry or in a Sales Order Entry since that is where a Customer is chosen and everywhere else it gets carried over from the parent document, we need to have:

1. Change Last Invoice Customer
2. Change Last Sales Order Customer

It should address the wrong defaults for address and other contacts and references that may have been entered.

... provided no payments / credit/debit notes have been made in the meanwhile!

If the said invoice/sales order got emailed to the wrong customer entered ......

There is an Invoice edit option ......