Fixed the find_order_holes() utility so that pseudo records does not count in the accounting application.

This commit is contained in:
依瑪貓 2020-08-05 09:36:09 +08:00
parent dd8b192913
commit b6111f0707

View File

@ -320,7 +320,8 @@ def find_order_holes(records):
.annotate(count=Count("pk"))
.filter(~Q(count=1))]
for record in records:
record.has_order_hole = record.transaction.date in holes
record.has_order_hole = record.pk is not None\
and record.transaction.date in holes
def get_summary_categories():