Somehow I got some solution by Changing some lines in the function exception_handler()
Whole function is mentioned below

function exception_handler($exception)
{
    $trace = $exception->getTrace();
    $str_trace = "";
    foreach ($trace as $line){
        $str_trace .= $line['file']." at Line ".$line['line'] . "<br>";
    }

    error_handler(
        E_ERROR,
        sprintf(_("Unhandled exception [%s]: %s. %s."), $exception->getCode(), $exception->getMessage(), $str_trace),
        $exception->getFile(),
        $exception->getLine()
    );
    end_page();
}

Adding Comparative Bug Display for PHP 7.4 vs PHP 8.1+

https://postimg.cc/HrzNvY5K/b73f5e8d

This is not helpful for Debugging the problem because it is not pin pointing the file from where the problem is aroused.

In PHP 7.4 it gives error like this

DATABASE ERROR : The sales area could not be updated error code : 1054 error message : Unknown column 'descriptio' in 'field list' sql that failed was : UPDATE 0_areas SET descriptio='Global' WHERE area_code = '1' /home/sites/39b/7/7d21587bd2/public_html/dev/includes/errors.inc:235: trigger_error('DATABASE ERROR : The sales area could not be updated error code : 1054 error message : Unknown column 'descriptio' in 'field list' sql that failed was : UPDATE 0_areas SET descriptio='Global' WHERE area_code = '1' ','256') /home/sites/39b/7/7d21587bd2/public_html/dev/includes/errors.inc:261: display_db_error('The sales area could not be updated','UPDATE 0_areas SET descriptio='Global' WHERE area_code = '1'','') /home/sites/39b/7/7d21587bd2/public_html/dev/includes/db/connect_db_mysqli.inc:103: check_db_error('The sales area could not be updated','UPDATE 0_areas SET descriptio='Global' WHERE area_code = '1'','1') /home/sites/39b/7/7d21587bd2/public_html/dev/sales/includes/db/sales_groups_db.inc:71: db_query('UPDATE 0_areas SET descriptio='Global' WHERE area_code = '1'','The sales area could not be updated') /home/sites/39b/7/7d21587bd2/public_html/dev/sales/manage/sales_areas.php:38: update_sales_area('1','Global')

but in php 8.1+ it does not show Backtrace

Unhandled exception [1054]: Unknown column 'descriptio' in 'field list'. in file: /home/sites/39b/7/7d21587bd2/public_html/dev/includes/db/connect_db_mysqli.inc at line 80 exception_handler((mysqli_sql_exception Object))

How to Fix?

I want to print Arabic Customer Name On Invoice.
I don't want full Arabic with RTL Font.
I am using dejavusans font.
It is showing Arabic But it showing it LTR so breaking all characters of Arabic in LTR.

How to Fix this?

Screenshot
https://postimg.cc/6TP2QTWV/179e47e5

6

(2 replies, posted in Report Bugs here)

Please change the go_debug = 2 in config.php and then check

7

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

I think No

I have re bundled module to fetch price of each item upon scan and few other improvements and unnecessary code removed.

8

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

Here is a small module that adds items in the Cart using Bar Code Scan

Can you manually approve this account

10

(6 replies, posted in Report Bugs here)

Nothing in spam

https://imgur.com/a/WaU5452

I advised my junior to join forum.
But he is not receiving confirmation link email.

https://imgur.com/a/9r7dDJr

Requested email is

huzaziz1@gmail.com

Average Cost Calculation at FA

1. 10 pcs of Item A purchased at $15
2. 6 pcs are sold
3. 15 pcs of Item A purchased at $18

avg cost = ((15*18)+(4*15)) / 19 = 17.36

This is the formula of Avg Cost

However the problem at FA is that if you even Stock IN it calculates the Avg Cost. Even if you do Stock Transfer it calculates Avg Cost. Even the Voding Stock Moves affects the Average Cost

I have some modifications and conditions applied in

function void_stock_move()

if (!in_array ($type ,array(ST_LOCTRANSFER))) //condition added by faisal
            if(!get_company_pref ('controlled_avg_cost') || in_array ($type, array(ST_WORKORDER, ST_MANURECEIVE, ST_SUPPRECEIVE)))
               update_average_material_cost($row["supplier_id"], $row["stock_id"],
                     $unit_cost, -$row["qty"], sql2date($row["tran_date"]), false, "Void Stock Move # $type_no and type = ".$systypes_array[$type]);

This function also is modified but the idea is to limit it on all Transaction Types

13

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

@tom this extension will access the wordpress database directly hence needed to be on the same server. Right?

Great work

In session.inc comment out following lines

function preventHijacking()
    {
        if (!isset($_SESSION['IPaddress']) || !isset($_SESSION['userAgent']))
            return false;

        // if ($_SESSION['IPaddress'] != $_SERVER['REMOTE_ADDR'])
        //     return false;
    
        // if ( $_SESSION['userAgent'] != @$_SERVER['HTTP_USER_AGENT'])
        //     return false;

        return true;
    }

16

(1 replies, posted in Setup)

Yes you can use Foreign Keys.
FA uses Foreign Keys but not at DB Level.
The referential Integrity is maintained through Code

https://github.com/FrontAccountingERP/FA/commit/6c40a3be4a79826087d7abbdd11b483f19decc2a

This latest commit is returning Ajax Failure on Add Item.

I tested this on one of my installations where some clients have more that 1000 sales orders.

This updated query is taking too long to return stk_code and hence the Ajax is failing and Add Items not working.

18

(2 replies, posted in Accounts Payable)

Hello brothers,

Does anyone else face same issue?

The Ajax call reloads the page and all data is lost.

One of my client he transfers stock in bulk to another store. May be 50 plus items.

After 10-15 items the page reloads due to Ajax call when we add item

19

(2 replies, posted in Accounts Payable)

At one of my installations I am facing a severe issue.
My client's Purchase Invoice contains a lot of Line Items.
Its happening that sometimes maybe (1 out of 10) when he enter any line item or when he press Process Invoice upon Ajax Call the Page gets refresh without saving the data. Hence the whole cart vanishes and it creates a lot of frustration with users.

Has anyone else faced this issue.

How to rescue this?

Actually modules are not the part of core releases. They are maintained in non official repos. Just check BraathWate repo on Github

Thanks

Why are you not using multiple deliveries against sales order and then merge deliveries on sales invoice?

23

(3 replies, posted in Wish List)

Thanks
Keep sharing

I think it is built on react technology so the guy needs to access the API through browser. The CORS error is specific with browser and not with POSTMAN.

Your second point I couln't get. The above mentioned gihub link for module for API is on SLIM3 or SLIM4 I couldn't ge this?

purchasing/includes/db/invoice_db.inc
Line # 276

The 3rd arugment is 0 but it should be $supp_trans->tax_group_id. Therefore it should be look like

 $line_tax = get_full_price_for_item($entered_grn->item_code,
            $entered_grn->this_quantity_inv * $entered_grn->chg_price, $supp_trans->tax_group_id, $supp_trans->tax_included) - $taxfree_line;

Otherwise the unit_tax is not calcuated correctly because

finally the function get_tax_group_rates is not reurning the rates to calculated the full_price_of_item() on above mentioned line.