Fix: Sale Report won't add sales of printed but yet unsettled bills to Category wise sale.
This commit is contained in:
@ -70,6 +70,7 @@ def get_sale(s: date, f: date, db: Session) -> List[SaleReportItem]:
|
|||||||
Voucher.date >= start_date,
|
Voucher.date >= start_date,
|
||||||
Voucher.date <= finish_date,
|
Voucher.date <= finish_date,
|
||||||
Voucher.voucher_type == VoucherType.REGULAR_BILL,
|
Voucher.voucher_type == VoucherType.REGULAR_BILL,
|
||||||
|
~Voucher.settlements.any(Settlement.settled == SettleOption.UNSETTLED()),
|
||||||
or_(
|
or_(
|
||||||
ProductVersion.valid_from == None, # noqa: E711
|
ProductVersion.valid_from == None, # noqa: E711
|
||||||
ProductVersion.valid_from <= day,
|
ProductVersion.valid_from <= day,
|
||||||
|
|||||||
Reference in New Issue
Block a user