| average number from one item to many item in detail [message #215941] | 
			Wed, 24 January 2007 06:11   | 
		 
		
			
				
				
				
					
						
						Smith_X
						 Messages: 56 Registered: January 2007 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		hello, 
 
I have another calculation problem and it's very complicate. 
 
First of all in my header block, I have one text item which allow user to type the number of material he want to used (total_material_quantity). Next, my form will fetch the cost of those material per unit and calculate the total cost of material in another text item (total_material_cost). 
 
Next, in detail section.. User will choose the inventory from lov list, then he type the number of quantity of inventory he desire. Next, my form will allocate the Inventory_Material_Cost for each record of inventory automatically. Please see the example below, 
 
Assume that the Total Material Cost is 10000 
   Inventory#   Quantity   Inventory_Material_Cost
1  Inv#1        50           (10000/100)*50               
2  Inv#2        40           (10000/100)*40
3  Inv#3        10           (10000/100)*10
            Total 100
 
 
The problem is that I do not know where I should put the code 
 
How do I write a specific code for each record in turbular detail, please?
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 |