Can anyone tell me why the heck this is giving me a blank result?
Sorry it's so messy but I've tried so many different combinations.
It also started out a lot shorter.
local numbervar tender;
local stringvar ttype;
tender:=0;
if {Invoice header.$Meth payment 1}>0 then tender:=tender+1;
if {Invoice header.$Meth payment 2}>0 then tender:=tender+2;
...
if {Invoice header.$Meth payment 10}>0 then tender:=tender+10;
if {Invoice header.$Meth payment 11}>0 then tender:=tender+11;
if tender=1 then ttype:="Cash"
else if tender=2 then ttype:="Cheque"
else if tender=3 then ttype:="Visa"
...
else if tender=10 then ttype:="Charge"
else ttype:="Other";
ttype
Sorry it's so messy but I've tried so many different combinations.
It also started out a lot shorter.
local numbervar tender;
local stringvar ttype;
tender:=0;
if {Invoice header.$Meth payment 1}>0 then tender:=tender+1;
if {Invoice header.$Meth payment 2}>0 then tender:=tender+2;
...
if {Invoice header.$Meth payment 10}>0 then tender:=tender+10;
if {Invoice header.$Meth payment 11}>0 then tender:=tender+11;
if tender=1 then ttype:="Cash"
else if tender=2 then ttype:="Cheque"
else if tender=3 then ttype:="Visa"
...
else if tender=10 then ttype:="Charge"
else ttype:="Other";
ttype