I am trying to make credit memo numbers return a negative amount and leave the all other doc types positive. This is the code I wrote and I cannot figure out how to get this to work correctly. Any help is appreciated.
=IIf([ARInvoice.DocType]='Credit Memo',(IIf([ARTaxTran.CuryTaxableAmt]<>Null Or [ARTaxTran.CuryTaxableAmt]<>0,-([ARInvoice.CuryDetailExtPriceTotal]-[ARTaxTran.CuryTaxableAmt]),0))),(IIf([ARTaxTran.CuryTaxableAmt]<>Null Or [ARTaxTran.CuryTaxableAmt]<>0,([ARInvoice.CuryDetailExtPriceTotal]-[ARTaxTran.CuryTaxableAmt]),0))

