Stock Adjustment on Profit and Loss Statement causing negative profit

Maybe this [discussion] Immutable Ledger - #29 by nabinhait may give some insight into your problem