# price distribution

This topic is 6608 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

hi, ive got a little problem here. what i have is i want a price distributed among 3 fields (that means i have 4 fields, the price and the 3 other fields). these 3 fields are like interest/discounts/anything. for example, the 1st field has a maximum of let me say, just 0. the second, 350 and the third, 9,500. so when i pay 9,850, it should show the values of the 1st as 0, second 350 and third 9,500.

ok, now for some complications. for example i only pay 5,000. the 1st field must be 0, second, 350 and third, 4,650. so i still have a balance of 4,850 right? so the next time i pay, it must only add what i pay in the 3rd field. like when i only paid 1,000. 1st field = 0, 2nd = 350, 3rd = 5,650.

##### Share on other sites

just to clear some things, at first the 3 fields are all blank. the user inputs a price, then click a button. inside this button will be the function i need, which will look at another 3 fields which hold the max values for the three fields.

##### Share on other sites

This topic is 6608 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account