evcc-io/tariff/embed.go
2024-06-26 09:53:12 +02:00

10 lines
215 B
Go

package tariff
type embed struct {
Charges float64 `mapstructure:"charges"`
Tax float64 `mapstructure:"tax"`
}
func (t *embed) totalPrice(price float64) float64 {
return (price + t.Charges) * (1 + t.Tax)
}