add expense_name

This commit is contained in:
2026-05-26 15:25:47 +07:00
parent 024d9ee637
commit a55a3f4ee2
10 changed files with 32 additions and 2 deletions
+2 -2
View File
@@ -67,8 +67,8 @@ func (r *ExpenseRepositoryImpl) List(ctx context.Context, organizationID uuid.UU
case "search":
if searchStr, ok := value.(string); ok && searchStr != "" {
searchPattern := "%" + strings.ToLower(searchStr) + "%"
query = query.Where("LOWER(receiver) LIKE ? OR LOWER(code_number) LIKE ? OR LOWER(description) LIKE ?",
searchPattern, searchPattern, searchPattern)
query = query.Where("LOWER(expense_name) LIKE ? OR LOWER(receiver) LIKE ? OR LOWER(code_number) LIKE ? OR LOWER(description) LIKE ?",
searchPattern, searchPattern, searchPattern, searchPattern)
}
case "outlet_id":
if outletID, ok := value.(uuid.UUID); ok {