Issue #23254:fix gain/loss calculation
Merge pull request #432 from garyhgohoos/23254-3

Issue #23254:fix gain/loss calculation
goes with https://github.com/xtuple/xtuple/pull/1732