Fix bugs in ending sale, create sale report (ledger)