I have these two if statements here. I know it is wrong because the workflow would not run.. But I can't figure out where I got it wrong. Any help will be appreciated!!
if !isnull([Route_ID])
then if [Route_ID] in (880939, 880934, 548800, 548799, 548798, 548797, 548796)
then if [Sum_ord_miles] > 2200
then ([Sum_ord_miles]-2200)*.88 + (2200*1.55)
else [Sum_ord_miles]*1.55
endif
elseif [Route_ID] not in (880939, 880934, 548800, 548799, 548798, 548797, 548796)
then if [Sum_ord_miles] > 2200
then ([Sum_ord_miles]-2200)*.99 + (2200*1.77)
else [Sum_ord_miles]*1.77
endif
else 0
end if
if !isnull([Route_ID])
then if [Route_ID] in (880939, 880934, 548800, 548799, 548798, 548797, 548796)
then if [weekly_mileage_charge] < (2200*1.55)
then (2200*1.55)-[weekly_mileage_charge]
else 0
endif
elseif [Route_ID] not in (880939, 880934, 548800, 548799, 548798, 548797, 548796)
then if [weekly_mileage_charge] < (2200*1.77)
then (2200*1.77)-[weekly_mileage_charge]
else 0
endif
else 0
endif