4,851

(21 replies, posted in Manufactoring)

@joe: I did not mean this code. I meant:

How is the work flow managed in FA when a single BoM is used to produce a set of products and not just one product.
How does the system handle the stock moves then?

4,852

(6 replies, posted in Accounts Payable)

Refer this post.

4,853

(21 replies, posted in Manufactoring)

Your flow is wrong.
There must be a stock transfer when you use a BoM to manufacture - whether it is one or more products. In your flow, you are preventing any stock transfer in the second sql if there is only one product - if the $nope is actually one or more products made.

@joe, how is this implemented in FA for now? Should he use kits in manufacture?

4,854

(21 replies, posted in Manufactoring)

The syntax is correct. The next statement is returning from the function with an array of fields from the first sql instead of an integer that should be the last insert id of the second sql. The calling script is expecting an integer in return.

4,855

(0 replies, posted in Report Bugs here)

Please fix the combo box selection css for the standard themes to accomodate the standard choices and stay within the width of the longest textarea and textbox widths.

--- old/themes/aqua/default.css    Mon Sep 29 21:21:28 2014
+++ new/themes/aqua/default.css    Tue Nov 18 18:19:02 2014
@@ -43,7 +43,7 @@
 }
 
 select {
-    max-width: 200px;
+    max-width: 230px;
 }
 
 option.inactive {
--- old/themes/cool/default.css    Mon Sep 29 21:21:28 2014
+++ new/themes/cool/default.css    Tue Nov 18 18:18:44 2014
@@ -43,7 +43,7 @@
 }
 
 select {
-    max-width: 200px;
+    max-width: 230px;
 }
 
 option.inactive {
--- old/themes/default/default.css    Mon Sep 29 21:21:28 2014
+++ new/themes/default/default.css    Tue Nov 18 18:17:32 2014
@@ -43,7 +43,7 @@
 }
 
 select {
-    max-width: 200px;
+    max-width: 230px;
 }
 
 option.inactive {

The before and after screenshots of MS Internet Explorer 6 (same in FF 33 as well) are in the attachments.

4,856

(21 replies, posted in Manufactoring)

Check which statement is causing the blank by commenting out your code block and then working in.

Is your test case passing into the initial if code block at all? If so, it will just return (that's what your code directs)  without doing anything since there is just 1 record.

4,857

(2 replies, posted in Accounts Payable)

Should you need to create Supplier for GRN items and another for the same Supplier for non GRN as well?

It is also possible to write off one time (Non GRN) expenses directly as a Journal Voucher with the Supplier name and other details in the description!

4,858

(21 replies, posted in Manufactoring)

The variable $nope is just the first record if it passes the initial single record if check when the second sql is attempted. Otherwise if there is only 1 record, the second sql will not be attempted at all. This variable is sought to fill in the discount_percent field.

What are you trying to do?

What happens if there are no results from the first sql? You will be assigning null to a not null field or boolean false to a integer field. The following may work after the initial single record if check fails.

$nope =  ($row[0] ? $row[0] : 0);

4,859

(21 replies, posted in Manufactoring)

What version of PHP / MySQL are you using?

Some of the later PHP versions expect that the first $result must be a resultset and not a boolean (false) for the next db_num_rows to work.

Try the function by just displaying the sqls and not executing them and then try to manually execute the sqls in phpmyadmin and you will see the error that arises.

4,860

(7 replies, posted in Announcements)

FA ERD subset updated on Wiki - Account Masters Relationship to POS.

Thanks @elax for your seasoned perspective. Using excessive stock or turning it into a service item may be the best for most instances after all!

4,862

(21 replies, posted in Manufactoring)

In file manufacturing/work_order_entry.php lines 264-266:

    $id = add_work_order($_POST['wo_ref'], $_POST['StockLocation'], input_num('quantity'),
        $_POST['stock_id'],  $_POST['type'], $_POST['date_'],
        $_POST['RequDate'], $_POST['memo_'], input_num('Costs'), $_POST['cr_acc'], input_num('Labour'), $_POST['cr_lab_acc']);

function add_work_order() above is defined in 3 files in manufacturing/includes/db folder =>
work_orders_db.inc,
work_orders_quick_db.inc and
work_order_issues_db.inc
all of which get added when manufacturing/manufacturing_db.inc is included - this will cause only the first occurrence of the function definition to be taken, viz., from work_orders_db.inc unless the preferred one is included earlier!

Search for the add_stock_move function call in any of them and work your way through.

Most certainly.

4,864

(21 replies, posted in Manufactoring)

function add_stock_move()
in
includes/db/inventory_db.inc

4,865

(2 replies, posted in Report Bugs here)

ECB Exchange rate provider (FA default 0) needs the following patch since the URL has been moved permanently and the IP has changed.

It is safe_mode setting that needed to be checked and not the non existent save_mode as listed.

--- old/gl/includes/db/gl_db_rates.inc    Mon Sep 29 21:21:28 2014
+++ new/gl/includes/db/gl_db_rates.inc    Sun Nov 16 20:31:15 2014
@@ -112,7 +112,7 @@
     if ($provider == 'ECB')
     {
         $filename = "/stats/eurofxref/eurofxref-daily.xml";
-        $site = "www.ecb.int";
+        $site = "www.ecb.europa.eu";
     }
     elseif ($provider == 'YAHOO')
     {
@@ -141,15 +141,15 @@
            curl_setopt ($ch, CURLOPT_COOKIEJAR, "$path_to_root/tmp/cookie.txt");
            curl_setopt ($ch, CURLOPT_HEADER, 0);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
-           // prevent warning while save_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
-           if (!ini_get('save_mode') && !ini_get('open_basedir'))
+           // prevent warning while safe_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
+           if (!ini_get('safe_mode') && !ini_get('open_basedir'))
                curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt ($ch, CURLOPT_TIMEOUT, 3);
            $contents = curl_exec ($ch);
            curl_close($ch);
             // due to resolver bug in some curl versions (e.g. 7.15.5) 
             // try again for constant IP.
-           $site="195.128.2.97";
+           $site="172.230.157.137";
        } while( ($contents == '') && $retry--);
        
     } else {

A default FA install comes with lang/en_US/LC_MESSAGES/en_US.mo file which is UTF-8 encoded. Therefore it must be included in the lang/installed_languages.inc file like:

<?php

/* How to make new entries here for non-packaged languages:

-- 'code' should match the name of the directory for the language under \lang
.-- 'name' is the name that will be displayed in the language selection list (in Users and Display Setup)
-- 'rtl' only needs to be set for right-to-left languages like Arabic and Hebrew
-- 'encoding' used in translation file
-- 'version' always set to '' for manually installed languages.
-- 'path' installation path related to FA root (e.g. 'lang/en_US').
*/


$installed_languages = array (
  0 => 
  array (
    'code' => 'C',
    'name' => 'English',
    'encoding' => 'iso-8859-1',
  ),
  1 => 
  array (
    'code' => 'en_US',
    'name' => 'English US UTF8',
    'encoding' => 'utf-8',
    'path' => 'lang/en_US',
    'version' => '',
  ),
);

$dflt_lang = 'C';
?>

Now when we install the en_US ISO 8859-1 version from the official repo, the new mo and po files with the version number as part of their filename get into the same folder along with the original en_US UTF-8 encoded file.

Now only the official ISO encoded en_US is available in the language choice drop down boxes.

When we now uninstall the official en_US ISO language, the whole en_US folder gets deleted including the original UTF-8 encoded mo file.

If the original path is changed from en_US to en_US_UTF8 to prevent such deletion, then it does not show up as part of the installed languages!

4,867

(8 replies, posted in Setup)

company/0/backup/
company/1/backup/
..
..

The path is set in the config.php file.

4,868

(12 replies, posted in Setup)

Tryyon and OpenERP are Python based and not PHP based.

If you use the stock empty.po you can translate the strings to Italian afresh, partaking of what may already exist.

If you use the same wiki engine, then probably Joe can provide you a last backup.
Otherwise create a separate Wiki on say Meidawiki base and use some sort code translator between them and then do the actual language translation / initial machine translation.

Just don't look at inventory and let inventory go negative. Later in one shot adjust all the inventory after the manufacturing is done. Very unprofessional but certainly quick and dirty.... Need to do some manual re-conciliation of the quantities where some thumb rules based on experience may be needed.

4,871

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

You can send it to the official FA email id for contributions and please mark a copy to me..... so i can directly update my GitHub repo....

4,872

(12 replies, posted in Setup)

All CoA's are used during company creation only. Any changes thereafter in the browser GUI will be reflected in your company's backup sql.

4,873

(3 replies, posted in FA Modifications)

You can also create a new table relating it to the customers table in a 1:1 manner and make a separate extension to achieve what you want and hack into it each time the core changes.

4,874

(3 replies, posted in FA Modifications)

The Description field is the best place for all of this.

4,875

(5 replies, posted in Report Bugs here)

Which browser and version and on what platform are you accessing FA from?
Also you can update your install by using the fixes since the release.