Example :
I added two custom fields in the purchase invoice item table fat and snf.
if I add 10 qty of milk. that milk fat is 3.2 and snf value is 7.6 note this is 1 qty of fat and snf. now I want to automatically change the rate and amount value. rate value is 24.24 and the amount value is 242.4. The field name is “qty”, “snf”, “fat”, “rate”, and “amount” .
how to write a client script?