Home » Developer & Programmer » Forms » average number from one item to many item in detail
average number from one item to many item in detail [message #215941] Wed, 24 January 2007 06:11 Go to next message
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?
Re: average number from one item to many item in detail [message #216085 is a reply to message #215941] Wed, 24 January 2007 23:27 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you tried putting it into the When_Validate_Item of both the 'Inventory#' and 'Quantity'. Verify that they are both 'not null' and if so populate the 'Inventory_Material_Cost' value.

David
Re: average number from one item to many item in detail [message #218831 is a reply to message #215941] Sun, 11 February 2007 00:02 Go to previous message
Smith_X
Messages: 56
Registered: January 2007
Member
Oh, that's work perfectly.

Thank you very much.
Previous Topic: About Image
Next Topic: multiple records problem!
Goto Forum:
  


Current Time: Fri Sep 20 15:22:52 CDT 2024