Revised the get_summary_categories() utility to look for bi-directional travel summary text in the accounting application.

This commit is contained in:
依瑪貓 2020-08-07 22:34:24 +08:00
parent 9771cfd55a
commit 7ed08b4c2f

View File

@ -392,7 +392,7 @@ def get_summary_categories():
output_field=CharField()), output_field=CharField()),
cat_type=Case( cat_type=Case(
When(summary__regex=".+—.+—.+→.+", then=Value("bus")), When(summary__regex=".+—.+—.+→.+", then=Value("bus")),
When(summary__regex=".+—.+→.+", then=Value("travel")), When(summary__regex=".+—.+[↔].+", then=Value("travel")),
default=Value("general"), default=Value("general"),
output_field=CharField()), output_field=CharField()),
category=Left("summary", category=Left("summary",