feat: categoria is_tax exclui impostos do denominador do savings_pct
savings_pct = (receita - despesas) / (receita - impostos). Toggle IMPOSTO no CRUD de categorias; badge dourado na lista. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -32,14 +32,14 @@ func (s *CategoryService) Create(ctx context.Context, in model.CategoryInput) (*
|
||||
if err := validateInput(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.repo.Create(ctx, strings.TrimSpace(in.Name), in.Color)
|
||||
return s.repo.Create(ctx, strings.TrimSpace(in.Name), in.Color, in.IsTax)
|
||||
}
|
||||
|
||||
func (s *CategoryService) Update(ctx context.Context, id int, in model.CategoryInput) (*model.Category, error) {
|
||||
if err := validateInput(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.repo.Update(ctx, id, strings.TrimSpace(in.Name), in.Color)
|
||||
return s.repo.Update(ctx, id, strings.TrimSpace(in.Name), in.Color, in.IsTax)
|
||||
}
|
||||
|
||||
func (s *CategoryService) Delete(ctx context.Context, id int) error {
|
||||
|
||||
Reference in New Issue
Block a user