today, something fantastic happened : we forecasted an expense (with planned value etc ...) for some components and we should have paid for it ... but the manufacturer gave it to us, as demonstration/testing samples (wooohooo \o/ )
So I wanted to fill the real expense cost : 0€ ... but Projeqtor sees it as a null value.
This is annoying because it’s not null, it is precisely 0. The expense isn’t cancelled and has been properly filled (null necessarily stands for « this data still has no value »).
I savagely modified the database (setting a 0 value and the realDate) : the gui properly updates, but when I click «save», it brings back the null value (and updates the DB with null).
Yes,
It is due to PHP 7.2 compatibility, since in PHP 7.2 :
Before PHP 7.2
1 + null = 1
Since PHP 7.2
1 + null => RAISE ERROR
So all our consolidations failed and we had to replace all null numeric values with zero.
That why now null and zero is the same for numeric values.
I'm afraid we won't be able to change this.
I suggest you just don't enter a real date : there was no bill, so no bill date, so no expense real date.
And possibly move the expense to a specific stauts, closed but not cancelled.
many thanks for your answer.
For my better understanding, can you tell me how to start looking for it in the code ?
to be perfectly honest, I would like to understand why a null coalescing operator could not solve the issue, is it to maintain same code with several versions of PHP ? another reason ?
... I am not a PHP developper, so I am just trying to understand.
For my better understanding, can you tell me how to start looking for it in the code ?
everywhere...
ad every operation with object fields (additions, substractions,multiplications or others)
I would like to understand why a null coalescing operator could not solve the issue
Of course a coalescing operator could solve the issue,
but whould require to change al the code, with major regression risks.
So solution was applied at the persistence framework to replace null witj zero for numeric, without any other impact and no risk of regression.
En poursuivant votre navigation, vous acceptez le dépôt de cookies tiers destinés au bon fonctionnement et à la sécurisation du site (gestion de session, reCaptcha) et à une analyse statistique anonymisée des accès sur notre site (Google Analytics). Si vous vous inscrivez, les informations que vous fournirez ne seront jamais divulguées à un tiers sous quelque forme que ce soit. En savoir plus
Cookies settings
×
Functional Cookies
Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.
Session
Please login to see yours activities!
Other cookies
Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.