Hello,
I have a formula to calculate invoice total based on invoice line plus misc charges only if invoice code is one of the following 3 codes (which is a string): (3,7 or 8). The formula below works perfectly except when there is an instance of the misc charges occuring in more than one of the chosen codes, in which case it repeats the invoice and calculation for each instance. I think this should be simple, but I am at a loss...
if {InvcDtl.TotalMiscChrg}>0 then
Select {MiscChrg.MiscCode}
Case "3":
{InvcDtl.ExtPrice}+{MiscChrg.TotalMiscChrg}
Case "7":
{InvcDtl.ExtPrice}+{MiscChrg.TotalMiscChrg}
Case "8":
{InvcDtl.ExtPrice}+{InvcDtl.TotalMiscChrg}
Default:
{InvcDtl.ExtPrice} else
{InvcDtl.ExtPrice}
Any ideas?
thanks!
I have a formula to calculate invoice total based on invoice line plus misc charges only if invoice code is one of the following 3 codes (which is a string): (3,7 or 8). The formula below works perfectly except when there is an instance of the misc charges occuring in more than one of the chosen codes, in which case it repeats the invoice and calculation for each instance. I think this should be simple, but I am at a loss...
if {InvcDtl.TotalMiscChrg}>0 then
Select {MiscChrg.MiscCode}
Case "3":
{InvcDtl.ExtPrice}+{MiscChrg.TotalMiscChrg}
Case "7":
{InvcDtl.ExtPrice}+{MiscChrg.TotalMiscChrg}
Case "8":
{InvcDtl.ExtPrice}+{InvcDtl.TotalMiscChrg}
Default:
{InvcDtl.ExtPrice} else
{InvcDtl.ExtPrice}
Any ideas?
thanks!