Any reason why this formula doubles the Item Receipt lot number quantities but not the others? I am using this in a summary transaction saved search.
CASE WHEN {item.islotitem} = 'T' THEN CASE WHEN ({type} = 'Bill' AND {createdfrom} IS NULL) OR ({type} = 'Bill Credit' AND {createdfrom.type} != 'Vendor Return Authorization') THEN {serialnumberquantity} WHEN ({type} IN ('Invoice','Cash Sale') AND {createdfrom} IS NOT NULL) OR ({type} = 'Credit Memo' AND {createdfrom.type} = 'Return Authorization') OR ({type} = 'Bill' AND {appliedtotransaction.type} IS NOT NULL) OR ({type} = 'Bill Credit' AND {createdfrom.type} = 'Vendor Return Authorization') THEN 0 ELSE {serialnumberquantity} END ELSE {quantity} END