https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43345 --- Comment #1 from Andrii Nugged <nugged@gmail.com> --- Created attachment 203834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203834&action=edit Bug 43345: Exclude cancelled orders from active order filter The original patch on Bug 32928 added cancellation and outstanding quantity filters. Bug 36018 later added the quantity check, but the cancellation-date condition did not land. Historical orders may have datecancellationprinted set while orderstatus remains new, ordered or partial. Koha treats these records as obsolete, but filter_by_active still returns them through only_active. They can therefore appear under Pending orders even though they were cancelled. Require active orders to have no cancellation date. Test plan: These steps require an upgraded database containing an order with a cancellation date and status new, ordered or partial. Current Koha does not normally create this inconsistent state. Keep a normal outstanding order for the same vendor as a control. Before applying the patch: 1. Go to Acquisitions and find the vendor for the inconsistent order. 2. Click Receive shipments and create or open an invoice. 3. Confirm that the inconsistent cancelled order is incorrectly listed under Pending orders. Apply the patch. After applying the patch: 1. Repeat the same receiving flow for the vendor. 2. Confirm that the inconsistent cancelled order is no longer listed under Pending orders. 3. Confirm that the normal outstanding order is still listed and can be opened for receiving. Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.