diff --git a/barker/barker/routers/reports/sale_report.py b/barker/barker/routers/reports/sale_report.py index 303e579..9c448b3 100644 --- a/barker/barker/routers/reports/sale_report.py +++ b/barker/barker/routers/reports/sale_report.py @@ -70,6 +70,7 @@ def get_sale(s: date, f: date, db: Session) -> List[SaleReportItem]: Voucher.date >= start_date, Voucher.date <= finish_date, Voucher.voucher_type == VoucherType.REGULAR_BILL, + ~Voucher.settlements.any(Settlement.settled == SettleOption.UNSETTLED()), or_( ProductVersion.valid_from == None, # noqa: E711 ProductVersion.valid_from <= day,