Merge pull request #30854 from rmehta/fix-discount-accounting-patch

fix(minor): discount accounting patch