Discussions
Strange behaviour with server script on credit memos
I am trying to run a server script that takes all credit memos created today and writes the current sales rep (a.k.a. an account manager) onto the credit memos
I have successfully done this for invoices and POs but I am getting some strange behaviour for the credits.
When I run the script on the 3 credits that have been created today I get the following error:
Script: setMgrOnCreditMemosCreatedToday Error: TRANS_LINES_UNBALNCD Transaction is not in balance! Line item sum of $477.88 does not equal applied amount of $NaN
However, the applied amount in showing in the Credit Memo is 477.88 and so there shouldn't be an issue. I have tried unapplying the credit memo but i get a similar error.