29 lines
647 B
Go
29 lines
647 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"sort"
|
|
|
|
"git.dumerain.org/alban/paycheck/internal/profiles"
|
|
)
|
|
|
|
func main() {
|
|
repo, rules, err := profiles.NewEmbeddedRepo()
|
|
if err != nil {
|
|
log.Fatalf("Erreur chargement profils: %v", err)
|
|
}
|
|
items, _ := repo.List()
|
|
fmt.Printf("OK: %d profil(s) charge(s) - forfait=%.2f\n", len(items), rules.ForfaitDimFerie)
|
|
|
|
keys := make([]string, 0, len(items))
|
|
for _, it := range items {
|
|
keys = append(keys, it.ID)
|
|
}
|
|
sort.Strings(keys)
|
|
for _, id := range keys {
|
|
p, _ := repo.Get(id)
|
|
fmt.Printf("- %s: label=%q t456=%.2f t458=%.2f t459=%.2f t471=%.2f\n", id, p.Label, p.T456, p.T458, p.T459, p.T471)
|
|
}
|
|
}
|