JasonKaufman
Programmer
I am using the following formula for all sales orders within a group of the same item number (for all item numbers) and am wanting to take the OnHand qty minus each individual Sales Order Qty and then take that total and use it for the next sales order # qty.
This formula seems to work for the first and 2nd sales order #, but fails afterwards.
if previousisnull ({SO2_SOEntryDetailLine.ItemNumber}) then
{IM2_InventoryItemWhseDetl.QtyOnHand} - {SO2_SOEntryDetailLine.QtyOrdered}
else
if {SO2_SOEntryDetailLine.ItemNumber} = previous ({SO2_SOEntryDetailLine.ItemNumber})
then
{IM2_InventoryItemWhseDetl.QtyOnHand} - previous ({SO2_SOEntryDetailLine.QtyOrdered}) - {SO2_SOEntryDetailLine.QtyOrdered}
else
{IM2_InventoryItemWhseDetl.QtyOnHand} - {SO2_SOEntryDetailLine.QtyOrdered}
I know there has got to be a better way to write this as well as making it work, but at the moment i am stymied.
Any help would be greatly appreciated.
This formula seems to work for the first and 2nd sales order #, but fails afterwards.
if previousisnull ({SO2_SOEntryDetailLine.ItemNumber}) then
{IM2_InventoryItemWhseDetl.QtyOnHand} - {SO2_SOEntryDetailLine.QtyOrdered}
else
if {SO2_SOEntryDetailLine.ItemNumber} = previous ({SO2_SOEntryDetailLine.ItemNumber})
then
{IM2_InventoryItemWhseDetl.QtyOnHand} - previous ({SO2_SOEntryDetailLine.QtyOrdered}) - {SO2_SOEntryDetailLine.QtyOrdered}
else
{IM2_InventoryItemWhseDetl.QtyOnHand} - {SO2_SOEntryDetailLine.QtyOrdered}
I know there has got to be a better way to write this as well as making it work, but at the moment i am stymied.
Any help would be greatly appreciated.