question about doctype field in payables batch
if (_Account=”10-01-2006″ and _DEBIT<>0.00) then return “5” else
if( _Account=”10-01-2001″ and _DEBIT<>0.00) then return “5” else return “1”
Using the formula above – trying to get the doctype to show credit memo instead of invoice. Nothing seems to work – any suggestions?
if( _Account=”10-01-2001″ and _DEBIT<>0.00) then return “5” else return “1”
Using the formula above – trying to get the doctype to show credit memo instead of invoice. Nothing seems to work – any suggestions?
Answers
Deanne,
I assume that since you are creating a Payables Transaction, you have grouped for the Header section to get one document and multiple distribution lines. To me it seems as though you wouldn’t have the ability to look at 1 account and/or amount.
Either way, when writing the vb logic you need to make sure to use line separators and when comparing strings, be sure to remove extras spaces that may exist.
if _Account.Trim() = “10-01-2001” and _DEBIT <> 0.00 then
return 5
else
return 1
end if
I assume that since you are creating a Payables Transaction, you have grouped for the Header section to get one document and multiple distribution lines. To me it seems as though you wouldn’t have the ability to look at 1 account and/or amount.
Either way, when writing the vb logic you need to make sure to use line separators and when comparing strings, be sure to remove extras spaces that may exist.
if _Account.Trim() = “10-01-2001” and _DEBIT <> 0.00 then
return 5
else
return 1
end if