‎2009 Oct 26 6:13 AM
Hi experts..
I have one value, which user will enter from interface screen.
I want to divide that value in proportion of the gross weight of selected delivery items.
can u tell me plz..How can i get proportinate value of entered value.
thanks..
‎2009 Oct 26 7:06 AM
Hello
Home task on mathematician ?
Try this logic:
Let we have 5 items with gross weigth:
1 - 10
2 - 20
3 - 30
4 - 40
and user enter value 50 in interface screen.
1. Sum all weigths (102030+40 = 100)
2. Divide value by total (50/100 = 0,5)
3. Multiple result (0,5) by all gross weigth. You will have:
1 - 10 - 5
2 - 20 - 10
3 - 30 - 15
4 - 40 - 20
So, value 50 will be divided pro rata: 5, 10, 15, 20
‎2009 Oct 26 7:06 AM
Hello
Home task on mathematician ?
Try this logic:
Let we have 5 items with gross weigth:
1 - 10
2 - 20
3 - 30
4 - 40
and user enter value 50 in interface screen.
1. Sum all weigths (102030+40 = 100)
2. Divide value by total (50/100 = 0,5)
3. Multiple result (0,5) by all gross weigth. You will have:
1 - 10 - 5
2 - 20 - 10
3 - 30 - 15
4 - 40 - 20
So, value 50 will be divided pro rata: 5, 10, 15, 20