I downloaded the git - master part and tested the change. It works.
@Joe: Thanks for the quick answer

I have an invoice with some GL items. This is a wrong entry and I want to delete these GL items from the invoice and add the received item to the invoice.

I cannot add the received item to the invoice.
With debugging on it gives an error (some in dutch language):

Onbehandelde uitzondering [0]: Unsupported operand types: string - string. in bestand: /var/www/home.vogelnestje.nl/secure1/frontaccountingTst/purchasing/supplier_invoice.php op regel288

On this line the variable called

$_POST['prev_quantity_inv'.$n]

As the item has no inventory (it is a general cost for the compay), the above variable is empty and the error is raised.
I solved this by adding a check on the empty variable by changing the line to:

if ($SysPrefs->check_qty_charged_vs_del_qty == true && ($_POST['qty_recd'.$n] != $_POST['prev_quantity_inv'.$n]) && !empty($_POST['prev_quantity_inv'.$n]) )

Now I can change the invoice as expected.

I tested this on 2.14, from the GIT (https://sourceforge.net/p/frontaccounting/git/ci/master/tree/)
Is there a moderator who can add this to the source of FA?
Or am I allowed to do this myself?

3

(1 replies, posted in Installation)

I just got a notice from Joe, there is a new FA version. 2.4.12, which solves some php8 issues,

Thanks Joe,

After coping the new files over the old one, the problem is gone.

I copied an older installation of FA to a new server, both files and database.
On the new server, I changed the language settings (See https://frontaccounting.com/punbb/viewtopic.php?id=9899).
A bunch of transactions is entered in FA on the new server, no problems.

But now I see, all journals are "closed", so I cannot edit them.
Also new entered journals are "closed".
Also journals, which where editable on the old server, are closed now

Information about my installation:
Container 1: Database: 10.8.3-MariaDB-1:10.8.3+maria~jammy - mariadb.org binary distribution
Container 2: Webserver: Apache/2.4.53 (Debian), Database client version: libmysql - mysqlnd 8.0.19, PHP extension: mysqli  curl  mbstring, PHP version: 8.0.19
Frontaccounting: 2.4.11

Anyone any idea how to solve this?

6

(17 replies, posted in Setup)

You are correct. I did not read the system requirement. Probably, I am too stupid to find it ;-)

All is working in a container, no errors.

Just for other readers:
I had one issue about the language. Inside the container I installed the dutch language pack. "locale -a" gives: "nl_NL.utf8". Other codings are not available.
I opened the PO file from the FA installation and saved it with PoEdit to UTF-8 format.
In "installed_languages.inc", I changed the encoding to "UTF-8". Now the dutch language is working in FA.

7

(17 replies, posted in Setup)

Euh.....

I am working with several containers.
In the PHP8 container, I did an install of php_mysqli. But after a restart of the container, these changes were lost and forgotten.

After installing php_mysqli again, FA seams to work. I see some minor warnings about deprecated things in PHP 8, but it works.
I did not yet tested everything.

I tried to kick myself on the head, fortunately, I am not flexible enough.

8

(17 replies, posted in Setup)

Hi,

FA is working on PHP 5.6.
FA is not working in PHP 7 or PHP 8.
Probably because there are calls to "mysql_connect", in stead of "mysqli_connect". The "mysql_connect" is removed in PHP 7.*. So also in not available in PHP 8.

If I translate all mysql to mysqli of all db calls, does FA work on PHP 8?
Or are there more things to change?

Or is the FA team already working on this?

9

(7 replies, posted in Fixed Assets)

I can confirm now the above
If under preferences the "Decimal Separator" is set to a comma, I cannot add a class
Changing the "Decimal Separator" to a point, I can add a class.

Looks like a bug to me.

10

(7 replies, posted in Fixed Assets)

No.
But..... When I open the preferences, click on "update" without changing something, it works.

Thanks for pointing me to the right direction!

11

(7 replies, posted in Fixed Assets)

I have a fresh install, logged in as "System administrator". In "Access Setup" all the rows are marked.

If I add a "Fixed Asset classes" with:
Parent class: rr
Fixed asset clarr: tt
Description: fafasdf
Log description: dfsdfsjkljkjlfsdsf
Basic Depreciation Rate: 20

No class is created.
With "$show_sql               = 1;" and "$go_debug               = 1;" it gives:

DATABASE ERROR : The fixed asset class could not be added
error code : 1265
error message : Data truncated for column 'depreciation_rate' at row 1
sql that failed was : INSERT INTO 0_stock_fa_class (fa_class_id, parent_id, description, long_description, depreciation_rate) VALUES ('tt', 'rr', 'fafasdf', 'dfsdfsjkljkjlfsdsf', '20,0')

Note the quotes arond 20.0.
In the database (mariadb), the table "0_stock_fa_class", row name "depreciation_rate" has type "double". If I change this to "text" I can add an "Assets class".

Is this a bug, or is there a CEBKAC?

12

(2 replies, posted in Accounts Receivable)

itronics wrote:

You have to '000001' item defined first.
Janusz

Hi Janusz,

It is defined.

13

(2 replies, posted in Accounts Receivable)

I am writing an extension on the Simple API to add "Add Direct Invoice" possibility. I want to call this from the Virtuemart webshop.

According to forum link I have the following code:

include_once($path_to_root . "/sales/includes/cart_class.inc");
// Create cart object
$_SESSION['Items'] = new cart(ST_SALESINVOICE, 0 );

// add customer
$br = get_branch(4); // Use a general customer with id=4
$_POST['customer_id'] = $br['debtor_no'];
$Ajax->activate('customer_id');

// Add items to cart
add_to_order($_SESSION['Items'], '000001', 1, 12, 0, '' );

But no items are added to the card.

Any tips to solve this?