Hello everyone,
I am trying to upgrade an old version 3.8.4 to the current release (on Windows). I was able to run the updater without errors all the way to version 4.11.3 (with a Postgres upgrade from 8.4 to 9.6 with the database at 4.4.0).
Upon opening the “sales menu” - “sales orders” - “list open” I do get an error message now:
Sat May 19 15:10:37 2018 Debug: Looking FOR a script "openSalesOrders"
Sat May 19 15:10:37 2018 ERROR: stack depth LIMIT exceeded
HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
CONTEXT: PL/pgSQL function "currtocurr" line 13 at IF
SQL statement "SELECT
ROUND((_x.taxrate_percent * pAmount + currToCurr(_x.curr_id, pCurrId, _x.taxrate_amount, pDate)), 6)"
PL/pgSQL function "calculatesubtax" line 32 at SQL statement
PL/pgSQL function "calculatesubtax" line 53 at FOR over SELECT rows
PL/pgSQL function "calculatesubtax" line 53 at FOR over SELECT rows
PL/pgSQL function "calculatesubtax" line 53 at FOR over SELECT rows
PL/pgSQL function "calculatesubtax" line 53 at FOR over SELECT rows
long version here: https://pastebin.com/VaT22qqv
I redid the upgrade and found that the problem is introduced on the upgrade from 4.2.0 to 4.3.0 (Postgres at 8.4).
Does anyone have an idea what I can do to fix this?