RunJS Sum in field values - is incorrect

Install type: docker
nocobase version : v2.2.11

subTable(Inline Editing) fields
qty , unit_price,
subTotal (= qty * unit_price) <= fieldType is formula
MainTable fields
total_amount

field: total_amount value: const items = await ctx.getVar('ctx.formValues.test_sub_key.sub_total'); return ctx.libs.formula.SUM(items) ;

result: is not correct

I apologize for my impolite post.
This function was working fine before I tried checking it.

Very sorry! this is not bug.

I apologize for the confusion. I misunderstood the situation.
I’m sorry, I panicked and posted this because it stopped working.
I should have configured it in the field linkage rules instead of the field values.