Description:
This guide explains why technicians using Wello might see incorrect stock values, what the sys_computed_eco_stock field really means, and how to trigger a stock recalculation properly. Learn how Wello's background service updates stock levels, how ERP sync affects quantities, and how to manually fix stock mismatches without editing computed fields directly.
Understanding the case
Sometimes customer sends this kind of message:
“The technician says he can't add this material to a work order. But the API shows he has available stocks.”
This can be confusing. Let’s break down why this happens and what we can do about it.
First, Understand the Field: sys_computed_eco_stock
This is the real usable stock.
It is read-only and computed automatically by the system.
Users cannot change it directly.
If the value looks wrong — don’t worry. It’s not stuck. It just needs time to recompute.
How to Trigger a Recompute (Without Touching sys_computed_eco_stock)
Let’s say the system shows 0 available, but in real life, you have 1 in stock. Here's what to do:
Go to the
article_stock_location_list.Update the
quantityfield with a new value. (Even updating to the same value is okay — it still helps.)For example, if current is 2, change it to 3.
Wait 5 minutes. The background service will recheck everything and update
sys_computed_eco_stock.
Important: Don’t panic if it doesn’t update immediately. It runs in the background every 5 minutes.
How the System Calculates Real Usable Stock
Let’s keep it simple:
The main quantity is in the
article_stock_location_list.quantity.From this, the system subtracts all parts used on open jobs.
It doesn’t subtract them forever — just until it gets a new stock update (from ERP or manual update).
What If a Job Is Still Open for a Long Time?
Here’s a real example:
A technician used 2 items from his van, but the job has been open for 1 year.
The ERP says the van has 6.
So do we say he has 4 left (6 - 2) or still 6?
There are two ways to handle this:
Option A: Always subtract, no matter how old the job — system says 4.
Option B: Ignore jobs older than, say, 1 week — system says 6.
In most cases, Wello gives a “validity period” for usage, so old open jobs don’t mess up current stock values.
Why Not Just Let Users Change sys_computed_eco_stock Directly?
The reason is: if someone makes a mistake or the system has a delay, the value would be wrong — and there would be no way to fix it properly.
So instead, the system always calculates it based on real data — safely and consistently.
When Does the System Recompute?
Every 5 minutes, Wello runs a background job that:
Picks rows where the last calculation is older than 24 hours.
Recalculates real usable stock.
Updates
sys_computed_eco_stockif needed.
It also updates the sys_lastdate_computed_eco_stock field to mark it as "recently checked".
Summary
Don’t try to change
sys_computed_eco_stock. It will update by itself.If the value seems off, just update the stock quantity in
article_stock_location_list.Wait 5 minutes for the system to catch up.
The system handles complex cases like long open jobs, refills, and ERP sync automatically.
If you still feel your stock quantity isn’t correct after following the steps — then it might be worth raising a support ticket. But in most cases, just updating the quantity and waiting a few minutes is enough.


