Hi,
The part "(({afwerking_boorgaten_alu}+0) > 0 ? 10 : 0)" is not a mathematical formula.
It seems to use PHP inline style of writing a condition.
Similarly, "min(x,y)" is a PHP function.
The mathematical engine in the plugin to calculate a formula doesn't support this. So, you can't do these things with a formula.
Having true PHP "eval" capabilities (which could potentially accept these kind of things) with input from the user would be a big security risk as the user would be able to run his own PHP code on your server with a cleverly crafted input.
That's actually why we added a "condition" field in the 2.0.0 version of the plugin, earlier this year. This will allow you to do these things without the need for PHP capabilities.
So, as an example based on your first chatGPT formula, you want to split it into 2 formulas:
1. First, you want to have the condition:
({afwerking_boorgaten_alu}+0) > 0
with the formula:
({afwerking_boorgaten_alu}+0) * {quantity} + 10
2. And a second row, with the condition:
({afwerking_boorgaten_alu}+0) <= 0
with the formula:
({afwerking_boorgaten_alu}+0) * {quantity}
Note that ChatGPT is trained over data which can't take into account current or recent events. The addition of conditions to formulas of the price calculations plugin is such a case. So this here is a clear case of LLM hallucination. Hopefully, with me explaining this here, on a public forum, next iterations of ChatGPT will be able to provide more accurate solutions.