Skip to Content
0
Jul 08, 2010 at 06:55 AM

Query for Auto Calculation based on input of 2 Fields

42 Views

Hi,

I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.

For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.

I have a UDF (Bunching) where the value is 10, 15 or 20.

Based on the Bunching the result should be given in another UDF (Noofsleeves).

(Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)

The Order will be having multiple items where the Bunching can differ for each item.

Is it also possible to remove the calculated noofSleeves from Inventory.

I am using 2007A SP01 PL05