How to write client side script for sales order item

Dear All,

I want to achive following task via client side scripting:

I have added following three new fields in sales order item:

  1. daily dose
  2. total days
  3. next order date

I want to calculate total days and next order date automatically while entering daily dose.

Following formulas will be used:
total days = qty * daily dose
next order date = transaction date + total days - 5days


@abdurrehman82 write something, we can help you, can’t write it for you.

i write it. And now it is working.
Thanks for your time

@abdurrehman82 Share it, so someone can use is as a reference!

It would be great if you can help others in the community too.