Skip to content

Commit

Permalink
fix: bill number edge case: (#673)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
ruuushhh and GitHub Actions authored Sep 25, 2024
1 parent bc4f082 commit 6591b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/quickbooks_online/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_bill_number(expense_group: ExpenseGroup):

bill_number = expense_group.expenses.first().__getattribute__(bill_number_field)

count = Bill.objects.filter(bill_number=bill_number, expense_group__workspace_id=expense_group.workspace.id).count()
count = Bill.objects.filter(bill_number__icontains=bill_number, expense_group__workspace_id=expense_group.workspace.id).count()
if count > 0:
bill_number = '{} - {}'.format(bill_number, count)
return bill_number
Expand Down

0 comments on commit 6591b5d

Please sign in to comment.