Fix
This commit is contained in:
parent
3a04990ec8
commit
91f51d129e
@ -137,8 +137,14 @@ func (p *AccountProcessorImpl) ListAccounts(ctx context.Context, req *models.Lis
|
||||
filterEntity := &entities.Account{
|
||||
OrganizationID: organizationID,
|
||||
OutletID: outletID,
|
||||
ChartOfAccountID: *req.ChartOfAccountID,
|
||||
AccountType: entities.AccountType(*req.AccountType),
|
||||
}
|
||||
|
||||
// Apply optional filters
|
||||
if req.ChartOfAccountID != nil {
|
||||
filterEntity.ChartOfAccountID = *req.ChartOfAccountID
|
||||
}
|
||||
if req.AccountType != nil {
|
||||
filterEntity.AccountType = entities.AccountType(*req.AccountType)
|
||||
}
|
||||
|
||||
entities, total, err := p.accountRepo.List(ctx, filterEntity)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user