AnsweredAssumed Answered

Trouble with creating an invoice

Question asked by eaglebayoutlaw on Feb 19, 2018
Latest reply on Feb 22, 2018 by Daniel Farnan

I have an Invoice form on which I want to have six lines for ordering product from my inventory.  I created a relationship between my invoice and my inventory, Using a repetition of my inventory table for each line: Inventory, Inventory 2, Inventory 3, etc.

 

Item ID (inventory table)  =  Item (Invoice table)

 

On my invoice I created a calculation field that says   IF  the quantity is less than the Inventory then ship (fill) a quantity equal to the quantity field,  If it is NOT less then it should cause a result equal to the amount in inventory.  It will not give me either or. It seems only willing to give me one result.  Here is an example of my calculation field:

 

Shipped    Calculation   Unstored, = If(Quantity <Inventory::Quantity Available: Quantity; Inventory::Quantity Available)

 

Shipped    Calculation   Unstored, = If(Qty 2 <Inventory 2::Quantity Available: Qty 2; Inventory 2::Quantity Available)

 

If I have a quantity of 10 in my Inventory::Quantity Available and I order 8 (Quantity) it gives me the result of  10

If I have a quantity of 10 in my inventory and I order 12 it gives me the correct amount of 10

If I order 10 and I have 10 it gives me the result of 10

 

Why is it not giving me 8 on the first line ?

Outcomes