Thanks @apmuthu, but all includes done at top. see below:

$page_security = 'SA_NEWLNKS';
$path_to_root  = '../../..';

$module_root = $path_to_root . "/modules/BatchControl";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($module_root  . "/includes/batches_db.inc");

add_access_extensions();

$js = "";
if ($SysPrefs->use_popup_windows)
    $js .= get_js_open_window(720, 640);
if (user_use_date_picker())
    $js .= get_js_date_picker();

page(_($help_context = "Batch Control"));

simple_page_mode(true);

$link_id   = '';
$batch_ref = '';
$trans_id  = '';
$target    = '';
$link      = '';
$noTab     = false;

I have used that function a number of times in three different modules, so I cannot understand why all the code below the call_to_write_new_database_record function is being skipped as it all resides within the same section.

Will try re-typing that section.

$go_debug = 2 and nothing in error logs or /tmp

Several lines of code are skipped after a successful call to write a new database record.

For example:

    call_to_write_new_database_record(.........);          // This completes successfully - no errors

    display_notification(_('New record successfully written'));     // This and the following lines do not execute
//
// other lines of code *
//
}

A blank page is now displayed.

* There are no errors in the other lines of code.

This script below is called by the following:

    new_links.php?link_id=KAD&batch_ref=2019-01-04%20PEYSON&trans_id=1901002

It displays correctly when called.

When the "Add new" is clicked it successfully calls the db function and creates a new record.
It also correctly shows the "display_notification" which follows.
It does not display the link that follows, but goes on to re-display the form and the"Transaction 1901002 will be added..." dialog.

If the "submit" is supposed to re-call the script, then the vars that initiate the form display should have been cleared.

Seems like I am missing something about the operation of the "submit" processing.

Any help appreciated.


<?php
/*===================================================================\
|                         FrontBatchProcessing                       |
|--------------------------------------------------------------------|
|  Copyright (C) 2019 NEH Systems                                    |
|  Date:  07-March-2019                                              |
|  Description: FrontAccounting Transaction Batch Control Module     |
|  Released under GNU GPL License.                                   |
|                                                                    |
\===================================================================*/

$page_security = 'SA_NEWLNKS';
$path_to_root  = '../../..';

$module_root = $path_to_root . "/modules/BatchControl";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($module_root  . "/includes/batches_db.inc");

add_access_extensions();

$js = "";
if ($SysPrefs->use_popup_windows)
    $js .= get_js_open_window(720, 640);
if (user_use_date_picker())
    $js .= get_js_date_picker();

page(_($help_context = "Batch Control"));

simple_page_mode(true);

$link_id   = '';
$batch_ref = '';
$trans_id  = '';
$target    = '';
$link      = '';

//-----------------------------------------------------------------------------

function can_process()
{
    global $selected_id;

    if (!isset($_POST['link_id']) || !isset($_POST['batch_ref']) 
                                    || !isset($_POST['trans_id']))
    {
        display_error(_("Your POST variables are not set!"), $center=true);
        return false;
    }

    if (isset($_POST['link_id']) && strlen($_POST['link_id']) < 3)
    {
        display_error(_("Invalid Link ID."));
        return false;
    }
    elseif (isset($_POST['batch_ref']) && strlen($_POST['batch_ref']) < 15)
    {
        display_error(_("Incomplete Batch Reference."));
        return false;
    }
    elseif (isset($_POST['trans_id']) && strlen($_POST['trans_id']) < 7)
    {
        display_error(_("Invalid Trans ID."));
        return false;
    }
    return true;
}

//-----------------------------------------------------------------------------

if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
{
    $_POST['link_id']   = $_SESSION['link_id'];    // recover post vars
    $_POST['batch_ref'] = $_SESSION['batch_ref'];
    $_POST['trans_id']  = $_SESSION['trans_id'];

    $_SESSION['link_id']   = NULL;            // clear session vars
    $_SESSION['batch_ref'] = NULL;
    $_SESSION['trans_id']  = NULL;


    if ($Mode=='ADD_ITEM' && can_process())
    {
        // function in BatchControl/includes
        create_new_link($_POST['link_id'], $_POST['batch_ref'], $_POST['trans_id']);

        display_notification(_('New transaction link ' . $_POST['trans_id'] . 
                                   ' added to selected batch ' . $_POST['link_id']));

        $link_id   = $_POST['link_id'];
        $batch_ref = $_POST['batch_ref'];

        $target = "<a href='view_links.php?link_id=$link&batch_ref=$batch_ref>";
        $link   = "View Links";

        $_GET['trans_id'] = NULL;            // kill so no tab after add

        $_POST['link_id']   = NULL;            // kill so no tab after add
        $_POST['batch_ref'] = NULL;            // after new link created
        $_POST['trans_id']  = NULL;

        echo "<center><td>";
        echo $target . $link . "</a>\n";
        echo "</center></td>\n";

        $Mode = 'RESET';
    }
    else
    {
        // will decide after consult whether editing and/or deletion allowed
    }
}

//-----------------------------------------------------------------------------
// detect if new_links was called from batch_control with trans_id.
// after adding a new transaction link this should not execute again.
//

if (isset($_GET['trans_id']) && !empty($_GET['trans_id']))
{
    $trans_id = $_GET['trans_id'];

    echo "Transaction ID: " . $trans_id . "<br />";    // testing on reload

    if (isset($_GET['batch_ref']) && !empty($_GET['batch_ref']))
        $batch_ref = $_GET['batch_ref'];

    if (isset($_GET['link_id']) && !empty($_GET['link_id']))
        $link_id = $_GET['link_id'];

    $_POST['link_id']   = $link_id;
    $_POST['batch_ref'] = $batch_ref;
    $_POST['trans_id']  = $trans_id;
}

//-----------------------------------------------------------------------------
// displays the table ONLY if new_links has been called from batch_control
// with a trans_id to be added to the batch_links table.
// after adding a new link this script should call view_links.php so that
// the updated batch_link entries can be displayed

if (isset($_POST['trans_id']) && !empty($_POST['trans_id']))
{
    start_form($multi=true);

    start_table(TABLESTYLE2);
 
    $th = array(_("Batch ID"), _("Reference"), _("Transaction ID"), "", "");

    inactive_control_column($th);
    table_header($th);

    start_row();
    echo "<td>" . $_POST['link_id'] . "</td><td>" . $_POST['batch_ref'] .
           "</td><td>" . $_POST['trans_id'] . "</td><td></td><td></td>";
    end_row();
    br(1);

    end_table(1);

    $msg = "Transaction " . $_POST['trans_id'] . " will be added to Batch " . 
                              $_POST['link_id'] .  " " . $_POST['batch_ref'];
    display_note($msg, 1, 1, "");

    $_SESSION['link_id']   = $_POST['link_id'];    // keep data in session
    $_SESSION['batch_ref'] = $_POST['batch_ref'];    // must unset after add
    $_SESSION['trans_id']  = $_POST['trans_id'];

    submit_add_or_update_center($selected_id == -1, '', 'both');

    end_form();

    end_page();
}

I am presuming after looking through the code of the 'submit_' functions in /includes/ui/ui_input.inc that if I changed the 'submit' line in my view_links.php to the following:

  `submit_add_or_update_center($selected_id == -1, '', 'false');`

That would cause a regular whole page refresh and not an Ajax one.

If this is true, then in the code that checks `if ($Mode=='ADD_ITEM' ||.....`, I add a line after the `create_new_link` function has been successful, to clear the `$_GET['trans_id']` then when the code to display the bottom table checks that `$_GET` variable, it should be empty.

But this does not occur as the bottom table still displays as if the script was called for the first time with that `$_GET` variable set.

Could you please clarify the process once such a submit is triggered.

OK apmuthu.

I have inserted the following lines before the submit line:

hidden('link_id',$link_id, 1);
hidden('batch_ref', $batch_ref, 1);
hidden('trans_id', $trans_id, 1);

The $_POST variables now come back correctly upon submit and the new record is inserted correctly into the database.

As a follow-up, since the script is recalled after the submit, the top table needs to reflect the link that was added and the bottom table no longer needs to be displayed. This does not occur and even clearing $_GET['link_id'] does not prevent the bottom table from displaying after the submit.  I imagine something more needs to be done as the display remains unchanged.

apmuthu, you were correct, the $_POST variables were not set at that point.

I inserted the following code in the can_process() function and it produced the error message:

    function can_process()
    {
        global $selected_id;

    if (!isset($_POST['link_id']) || !isset($_POST['batch_ref']) || !isset($_POST['trans_id']))
    {
        display_error(_("Your POST variables are not set!"), $center=true);
        return false;
    }

I guess I need to understand what takes place when the "submit_add_or_update_center($selected_id == -1, '', 'both');'" works when the "Add new" button is clicked.

I understand that this goes through an AJAX submission, but are all variables in the script, local or $_POST cleared or destroyed during that process? An explanation would be appreciated.

Thanks.

Tried with: start_form($multi=true);

Which generated:

<form enctype='multipart/form-data' method='post' action='/devfa/modules/BatchControl/manage/view_links.php' >

Same result:

New record written with no data other than auto-increment record id.

If the form action causes the view_links.php to be recalled so that:
1. The $Mode==ADD_ITEM can be sensed
2. Which in turn calls can_process() which throws NO errors using the same $_POST vars
3. How is it possible that those $_POST vars are empty when the create_new_link function is called?
4. Plus the fact that after "Add new" was clicked the display still shows the same data as before (same html code also).

Will try to debug using PhpStorm and update this topic.

When the script below is called with a transaction id (trans_id) as well as a link_id and a batch_ref, everything displays as it should.  Both top and bottom tables.

When "Add new" is clicked, the database table 0_batch_link should have the new link added.

Even though the new link variables display correctly in the bottom table, the added row in the database contains no data other than the auto-incremented record id.

I need a fresh pair of eyes to see what is missing.  Any assistance much appreciated.

neholtz

NOTE: I have tried with both the local variables and the $_POST variables with the same result.

<?php
/*===================================================================\
|                         FrontBatchProcessing                       |
|--------------------------------------------------------------------|
|  Copyright (C) 2019 NEH Systems                                    |
|  Date:  07-March-2019                                              |
|  Description: FrontAccounting Transaction Batch Control Module     |
|  Released under GNU GPL License.                                   |
|                                                                    |
\===================================================================*/

$page_security = 'SA_VIEWLNKS';
$path_to_root  = '../../..';

$module_root = $path_to_root . "/modules/BatchControl";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($module_root  . "/includes/batches_db.inc");

add_access_extensions();

$js = "";
if ($SysPrefs->use_popup_windows)
    $js .= get_js_open_window(720, 640);
if (user_use_date_picker())
    $js .= get_js_date_picker();

page(_($help_context = "Batch Control"));
simple_page_mode(true);

$link_id   = '';
$batch_ref = '';
$trans_id  = '';


//-----------------------------------------------------------------------------
// code to display items in batch_links table when called from batch_control
// the top table displays for both viewing links and also for adding new links
// if no items in the batch_links table, then display appropriate message

if (isset($_GET['link_id']) && !empty($_GET['link_id']))    // from batch_control
{
    $link_id = $_GET['link_id'];

    $result = get_links($link_id);    // function in BatchControl/includes

    if (!$result)
    {
        $msg = "No Linked Transactions Found.";    // new batch without links

        display_note($msg, 2, 2, "");

        hyperlink_back(1);
    }
    else
    {
        start_table(TABLESTYLE);

        $th = array(_("Batch ID"), _("Reference"), _("Transaction ID"), "", "");

        inactive_control_column($th);
        table_header($th);

        $i = 0;
        $k = 0;

        while($row = db_fetch($result))
        {
            alt_table_row_color($k);

            $i++;

            label_cell($row['link_id']);
            label_cell($row['batch_ref']);
            label_cell($row['trans_id']);

            edit_button_cell("Edit".$row["link_id"], _("Edit"));
            delete_button_cell("Delete".$row["link_id"], _("Delete"));

            end_row();
        }

        $num = count($row)-1;

        end_table(1);

        $msg = $i . " Linked Transactions Found.";

        display_note($msg, $br=1, $br2=1, $extra="");

        hyperlink_back(1);
    }
}

//-----------------------------------------------------------------------------
// displays the bottom table if view_links has been called from batch_control
// with a trans_id to be added to the batch_links table - new link is displayed
//

if (isset($_GET['trans_id']) && !empty($_GET['trans_id']))
{
    $trans_id = $_GET['trans_id'];

    if (isset($_GET['batch_ref']) && !empty($_GET['batch_ref']))
        $batch_ref = $_GET['batch_ref'];

    $_POST['link_id']   = $link_id;
    $_POST['batch_ref'] = $batch_ref;
    $_POST['trans_id']  = $trans_id;

    start_form();

    start_table(TABLESTYLE2);
 
    $th = array(_("Batch ID"), _("Reference"), _("Transaction ID"), "", "");

    inactive_control_column($th);
    table_header($th);

    start_row();
    echo "<td>" . $_POST['link_id'] . "</td><td>" . $_POST['batch_ref'] .
           "</td><td>" . $_POST['trans_id'] . "</td><td></td><td></td>";
    end_row();
    br(1);

    end_table(1);

    $msg = "Transaction " . $_POST['trans_id'] . " will be added to Batch " . 
                              $_POST['link_id'] .  " " . $_POST['batch_ref'];
    display_note($msg, 1, 1, "");

    submit_add_or_update_center($selected_id == -1, '', 'both');

    end_form();

    end_page();
}

//-----------------------------------------------------------------------------
// functions
//-----------------------------------------------------------------------------

function can_process()
{
    global $selected_id;

    if (isset($_POST['link_id']) && strlen($_POST['link_id']) < 3)
    {
        display_error(_("Invalid Link ID."));
        return false;
    }
    elseif (isset($_POST['batch_ref']) && strlen($_POST['batch_ref']) < 15)
    {
        display_error(_("Incomplete Batch Reference."));
        return false;
    }
    elseif (isset($_POST['trans_id']) && strlen($_POST['trans_id']) < 7)
    {
        display_error(_("Invalid Trans ID."));
        return false;
    }
    return true;
}

//-----------------------------------------------------------------------------

if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
{
    if ($Mode=='ADD_ITEM' && can_process())
    {
        // function in BatchControl/includes
        create_new_link($link_id, $batch_ref, $trans_id);

        display_notification(_('New transaction link added to selected batch'));        
        $Mode = 'RESET';
    }
    else
    {
        // will decide after consult whether editing and/or deletion allowed
    }
}

Update:

Changed the submit before the end_form (); to the following:

    submit_add_or_update_center($selected_id == -1, '', 'both');

Now I get no error, but a 'spinner' in the Preferences bar which spins for  6 or 7 seconds before becoming a yellow triangle with an exclamation mark.

I have sql debug on and also backtrace. Nothing erroneous displayed and no errors in /tmp.

Any thoughts?

Thanks.

Working on adding Batch Processing to FA:

I have two php scripts which have the identical includes (as below).
They are both located in the /batches/manage directory.
The first script calls two functions within the /batches/db/batches_db.inc file.
They both work without error.

The second script also calls two different functions also in the /batches/db/batches_db.inc file.
The first call to get_links($link_id) as seen below, works fine.
The second call to the function create_new_link() as seen below throws an error:
  Unhandled exception [0]: Call to undefined function
The error displayed shows that the script is trying to call that function from the /batches/manage directory.
The function exists correctly in the /batches/db/batches_db.inc file.

Any assistance appreciated.

//-------------------------------------------------------------

$path_to_root = "../..";

include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/batches/db/batches_db.inc");        // db handling functions for batches


link_id below comes from a another script calling this script:
//-------------------------------------------------------------

$link_id   = $_GET['link_id'];

// call to a function in /batches/db/batches.db.inc

$result = get_links($link_id);

// Results obtained without any problems.



NOTE: can_process() returns TRUE when the below is called.
//-------------------------------------------------------------------------------------

if ($Mode=='ADD_ITEM' && can_process())
{
    create_new_link($_POST['link_id'], $_POST['batch_ref'], $_POST['trans_id']);

    display_notification(_('New transaction link has been added to selected batch'));       
    $Mode = 'RESET';
}


routine to display the new link to be added
//------------------------------------------------------------

    if ($trans_id = $_GET['trans_id'])        // these come from calling script
    {
        $link_id   = $_GET['link_id'];
        $batch_ref = $_GET['batch_ref'];

        $_POST['link_id']   = $link_id;
        $_POST['batch_ref'] = $batch_ref;
        $_POST['trans_id']  = $trans_id;

        start_form($multi=false, $dummy=false, $action="POST", $name="newLink");

        start_table(TABLESTYLE2);

        $th = array(_("Batch ID"), _("Reference"), _("Transaction ID"), "", "");

        inactive_control_column($th);
        table_header($th);

        echo "<tr>";
        echo "<td>$link_id</td><td>$batch_ref</td><td>$trans_id</td><td></td><td></td>";
        echo "</tr>";
        echo "<br />";

        end_table(1);

        $msg = "Transaction " . $trans_id . " will be added to Batch " . $link_id . " " . $batch_ref;
        display_note($msg, 1, 1, "");

        submit_center('ADD_ITEM', _("Add"), true, '', 'default');

        end_form();

    }
//----------------------------------------------------------

12

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

@kvvaradha,

Hosting server currently running php 5.6.   The only move beyond that available is php 7.0.31.

I am awaiting a callback from Hosting's escalated tech support as the Level 1 was unable to shed any light on the matter.

I will post their comments if/when I have their response.

Until then.....

13

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

Downloaded, unzipped and uploaded apmuthu's unofficial version for PHP 5.3 to MY_FA_URL/modules/api24/.

Edited util.php with applicable credentials for my FA installation.

Tested on same Host with the following result for https://MY_FA_URL/modules/api/category:

MY_HOST_URL.com is currently unable to handle this request.
HTTP ERROR 500

I noticed the following:

1. There is no error.log generated under /modules/api/

2. In comparing the index.php from apmuthu's version to the June 26, 2018 one, apmuthu's had:

<?php
ini_set('html_errors', false);

include_once ('config_api.php');
foreach (glob("src/*.php") as $filename)
    include $filename;

use FAAPI\Inventory;
use FAAPI\InventoryLocations;
use FAAPI\Category;
use FAAPI\TaxTypes;
use FAAPI\TaxGroups;
use FAAPI\Customers;
use FAAPI\Suppliers;
use FAAPI\BankAccounts;
use FAAPI\GLAccounts;
use FAAPI\Currencies;
use FAAPI\InventoryCosts;
use FAAPI\Sales;
use FAAPI\Dimensions;
use FAAPI\Journal;
use FAAPI\Purchases;

Where the later version only had the use FAFPI\ namespaces.  In other words without the following:

ini_set('html_errors', false);

include_once ('config_api.php');
foreach (glob("src/*.php") as $filename)
    include $filename;

So neither version will run for me. 

It is important to note that my installed version of FA 2.4.4 is running perfectly fine on the same server with php 5.6.

Not sure of a path forward at this moment.

14

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

@kvvaradha, I will try apmuthu's version shortly.

I was trying to see why this version was not performing under php 5.6 which is the version selected on my host.

Here is the log error.log file under /modules/api/

Quoting:

[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/imagick.so' - /usr/php/56/usr/lib64/php/modules/imagick.so: undefined symbol: zend_new_interned_string in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/pdo_mysql.so' - /usr/php/56/usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20131226, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20131226, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20131226, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/mailparse.so' - /usr/php/56/usr/lib64/php/modules/mailparse.so: undefined symbol: zend_new_interned_string in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/oauth.so' - /usr/php/56/usr/lib64/php/modules/oauth.so: undefined symbol: zend_new_interned_string in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/oci8.so' - /usr/php/56/usr/lib64/php/modules/oci8.so: undefined symbol: zend_new_interned_string in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/uploadprogress.so' - /usr/php/56/usr/lib64/php/modules/uploadprogress.so: undefined symbol: zend_ini_string_ex in Unknown on line 0
[06-Sep-2018 11:38:38] PHP Parse error:  syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home2/finishl4/public_html/erp/modules/api/index.php on line 2

End of Quoting.

Tech support from my Host has been unable to explain why calls to php 5.6 library modules are unable to be found.  I am awaiting an escalated callback on the ticket.

Beyond that the question is if apmuthu's version for 5.3 will run under 5.6.  I will try it and post results here.

neholtz

15

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

Hosting Server php is 5.6

I also could not find anywhere within the api files where those namespaces were defined.

16

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

Downloaded and unzipped frontaccounting-2.4-api.module.1.7 as directed to /modules/api/ directory.

Changes variables in util.php to match my current test company.

Directed browser to : https://MY_FA_URL/modules/api/category/ as suggested.

Received a blank page with no results.

In the /modules/api/error.log file the following:

PHP Parse error:  syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /MY_FA_URL/modules/api/index.php on line 2

Stuck here.  Help or suggestions appreciated.

Note: 'MY_FA_URL' replaced with actual URL to site.

Thanks apmuthu.

Client had the last version before Denali and it was not on MS SQL.

I will look into your suggestions and see what we can do.

Version being used is CMS 18.1.  I believe it is the last version before Denali. It uses a proprietary filing system.

I researched open source EPR systems because the client does not wish to continue with CMS software.  They spent a lot of money to try to get Denali to work and Cougar was not having a lot of success converting their data to it.  On top of that Cougar no longer supports anything other than Denali and their support leaves more than a lot to be desired.  They would not even refund the client for what they spent trying to get Denali to work.

The client is running the legacy CMS 18.1 software on Windows 7 Pro 32 bit, but they are looking to the future because of limitations in the software and the ability to move to newer hardware when it becomes necessary.

As I mentioned before, I have been able to load the necessary FA database tables with data from their CMS system.  That includes their COA, etc.  They can test the on-line FA system for functionality at present, but would need to be able to do batch processing for all transactions, in particular Order Entry and POS (up to 4 registers) before they could fully transition to FA.

Importation of data into FA is not a problem for me.  Between SQL scripts, phpMyAdmin and MySQL Workbench I have that covered.

As an example of what they do now, let us take Order Entry:
  In CMS when the user goes to enter a new Order, the software allows them to create a new Batch, or use one that was created previously.  This may happen many times a day in different batches.  They do not want these batches posting through to the G/L until they are ready to do that.  Inventory items selected in a batch must appear as committed in the stock and removed once the batch is posted.  If any batch containing items is deleted then those items must be released back to stock.

With POS, each register would start a batch each day, be able to check it at the end of the day before posting it.

I worked my way through the first PDF describing how to do Modules/Extensions, but the second PDF with Security and the rest I could not find.  I believe that you were working on a translation from Spanish.

I will have to check what updates were applied to 2.4.4.  I believe I installed one, but not sure if it has the Git Master updates.

Thanks for the comeback apmuthu.

1. Cougar Mountain Software CMS - Last version before Denali.
    Will not run on any Windows beyond 7 Pro 32 bit.

2. CMS is currently on a MS Server 2012 in-house server supporting 10 workstations.

3. FA 2.4.4 is on client's web-server with SSL Cert.

4. I have extracted & imported the folllowing from CMS to FA:

  Vendor Master - (suppliers)
  Customer Master - (debtors_master)  Also SQL to Branches
  Inventory Master - (stock_master)  Also SQL to item_codes and prices
  item_categories, COA, taxes, etc.
 
Please elaborate on your thoughts.

Thank you.

Seeking experienced FA Developer to create a Batch Processing Extension for FA.

A Legacy Accounting client is desiring to use FA if Batch Processing can be implemented.

Project Requirements Outline:

1. A "Batch" tab on the main navigation with options below to:
   (a) Create a New Batch
   (b) Select an Existing Batch
   (c) Post a Batch
   (d) Delete a Batch

An auto-generated batch_id could be retrieved from Transaction References.
While a second user supplied description field would make the batch unique.
Date & Time data could be automatic or user entered.

2. These batch_ids would need to be selected when entering Sales or other types of transactions. This would require the addition of a drop-down selection for choosing the appropriate batch.

3. In Sales-> Order Entry e.g. there could be a number of batches depending upon purpose.

Inventory would need to be committed upon Order creation and removed once the batch is posted.

Similarly released if the batch is deleted.

4. POS would have unique batch_ids based upon register location/id.

5. Batch Listings would need to be run and corrected before any batch could be posted to the G/L.

6. Other considerations such as reporting, etc, to be determined.

Please submit your proposal detailing time-frame and cost in USD

This is a paying job and the client is willing to allow the successful project to be added to FA under Open Source License.

Thank you,

neholtz

21

(14 replies, posted in Setup)

Thank you @oakstreet1!

Finding my way around the guts of FA takes a little time.

Onward and upward!

22

(14 replies, posted in Setup)

RE: Batch Processing

apmuthu wrote:

Make a new extension for it.

Would it be better if this subject was moved to Modifications or Development?

Not getting much response under Setup.  Probably should have been submitted under Mods or Dev in the first case.

Just asking if anyone is interested in this or willing to share some insight about getting it done.

Appreciate any suggestions / comments.

Thanks,

bholtz / neholtz

23

(14 replies, posted in Setup)

Adding a link in /applications/setup.php to begin working on the Batch Processing project:
The batches directory and the batch_control.php script have been created with minimum interaction at present.

$this->add_lapp_function(0, _("&Batch Control"),
    "batches/batch_control.php?", 'SA_BATCHCONTROL', MENU_SETTINGS);

Displaying below Transaction References OK, but with errors:

Undefined index: SA_BATCHCONTROL in file: /home2/finishl4/public_html/erp/includes/current_user.inc at line 192
/home2/finishl4/public_html/erp/includes/current_user.inc:201:     (current_user Object)->can_access('SA_BATCHCONTROL')
/home2/finishl4/public_html/erp/themes/canvas/renderer.php:224:     (current_user Object)->can_access_page('SA_BATCHCONTROL')
/home2/finishl4/public_html/erp/frontaccounting.php:63:     (renderer Object)->display_applications((front_accounting Object))
/home2/finishl4/public_html/erp/index.php:25:     (front_accounting Object)->display()

A little help as to where to find the SA_ definitions would be appreciated.

24

(1 replies, posted in Setup)

Using en_US-demo.sql as a reference for the 0_prices database table, the field sales_price indicates '100' which should display in FA as 1.00 if preferences Decimals->Prices/Amounts is set to 2.

Data that was uploaded to the 0_prices table such as 1495 displays as 1,495.00 with decimals set to 2 and 1,495 with decimals set to 0.

What is necessary for this to display as 14.95?

Information appreciated.

Thanks.

bholtz / neholtz

25

(14 replies, posted in Setup)

Clients coming from legacy accounting systems that have batch processing and posting are wondering if FA could be adapted to process transactions in that manner.

Looking at it I see the following requirements:

1. A "Batch" tab on the main navigation with options below to:
   (a) Create a New Batch
   (b) Select an Existing Batch
   (c) Post a Batch
   (d) Delete a Batch

An auto-generated batch_id could be retrieved from Transaction References.
While a second user supplied description field would make the batch unique.
Date & Time data could be automatic or user entered.

2. These batch_ids would need to be selected when entering Sales or other types of transactions.
    This would require the addition of a drop-down selection for choosing the appropriate batch.

3. In Sales-> Order Entry e.g. there could be a number of batches depending upon purpose.
    Inventory would need to be committed upon Order creation and removed once the batch is posted.
    Similarly released if the batch is deleted.

4. POS would have unique batch_ids based upon register location/id.

5. Batch Listings would need to be run and corrected before any batch could be posted to the G/L.

6. Other considerations such as reporting, etc need to be determined.

I would appreciate comments from the Gurus concerning their thoughts on such an undertaking.

Thanks for your consideration.

bholtz / neholtz