Dynamic calculation –

QuestionsDynamic calculation –
Kissima Sambakhe asked 10 years ago

Hi All,

I'm building a stock management application and I would like to do some dynamic calculation.

I have Attached my PHPGRID

http://i57.tinypic.com/1sxhcy.png

As you can see I have 4 Columns
– Qty Selected
– Qty Available
– Qty in Bin
– Qty Reserved

I Would like to do an automatic calculation between those 4 columns.

I want that when the user chose an amount that will be deducted from the amount in Bin and the same time be able to know how many are reserved and how many are available.

I am very confused by this feature

Thank you for your help.

cordially

3 Answers
Abu Ghufran answered 10 years ago

If your columns are editable, you can do it using JS callback function on blur event.
Refer faq: How to populate other column, based on previous columns?

How-Tos & FAQs

You can also manage the calculation just before insert / update in database. For that you will need to use custom event handler functions which gives you control to change the query values before execution.
Refer demo code; demos/editing/custom-events.php (this is supported in full package)

pierre mata answered 9 years ago

Hello Abu, talking about this feature, i want something similar, at the moment of capture the field, other field is filled with a calculation based in the capture, before save.
I thought see an example in the demos, but now i don't find it, can you tell me what demo is? or show me how do this???

Your Answer

2 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?