J
jsccorps
Have 2 vendors. VendorA and VendorB. Want to use the lowest remit. Unless,
if VendorB is not active, then use VendorA remit. Example:
Date VendorA RemitA ActiveA VendorB RemitB ActiveB
6/1/09 11 4.5 Yes 22 6.3 Yes
6/2/09 11 9.0 No 22 8.6 Yes
6/3/09 11 6.2 Yes 22 5.00 No
6/4/09 11 4.5 Yes 22 3.8 Yes
6/5/09 11 8.5 Yes 22 7.5 No
1) Use minimum of RemitA and RemitB, except
2) If ActiveB= No, then use RemitA (even though VendorB might have the
lowest remit)
Desired result:
Date Vendor Remit
6/1/09 11 4.5
6/2/09 22 8.6
6/3/09 11 6.2
6/4/09 22 3.8
6/5/09 11 8.5
if VendorB is not active, then use VendorA remit. Example:
Date VendorA RemitA ActiveA VendorB RemitB ActiveB
6/1/09 11 4.5 Yes 22 6.3 Yes
6/2/09 11 9.0 No 22 8.6 Yes
6/3/09 11 6.2 Yes 22 5.00 No
6/4/09 11 4.5 Yes 22 3.8 Yes
6/5/09 11 8.5 Yes 22 7.5 No
1) Use minimum of RemitA and RemitB, except
2) If ActiveB= No, then use RemitA (even though VendorB might have the
lowest remit)
Desired result:
Date Vendor Remit
6/1/09 11 4.5
6/2/09 22 8.6
6/3/09 11 6.2
6/4/09 22 3.8
6/5/09 11 8.5