Fix: Sale Report won't add sales of printed but yet unsettled bills to Category wise sale.

This commit is contained in:
Amritanshu Agrawal 2022-04-26 08:47:55 +05:30
parent 1eccd7f9d5
commit 7a2ccb7fb1

View File

@ -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,