From a8895a28a69de27df61f12b6df67fa6e02973c3f Mon Sep 17 00:00:00 2001 From: huynguyenh Date: Mon, 13 Nov 2023 17:24:36 +0700 Subject: [PATCH] fix: fix query for accounting todo --- pkg/store/operationalservice/operational_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/store/operationalservice/operational_service.go b/pkg/store/operationalservice/operational_service.go index 90dcd1f5b..9cfc09694 100644 --- a/pkg/store/operationalservice/operational_service.go +++ b/pkg/store/operationalservice/operational_service.go @@ -17,7 +17,7 @@ func (s store) FindOperationByMonth(db *gorm.DB, month time.Month) ([]*model.Ope var res []*model.OperationalService query := db.Table("operational_services"). Preload("Currency"). - Where("is_active is true and date_part('month',register_date) = ?", month) + Where("is_active is true and type = 'monthly'") err := query.Find(&res).Error if err != nil && err != gorm.ErrRecordNotFound {