accept --cpi=FILE --cpiy=YEAR to translate money to target year
All checks were successful
cicd / ci (push) Successful in 1m30s
All checks were successful
cicd / ci (push) Successful in 1m30s
This commit is contained in:
@@ -135,7 +135,7 @@ func (router Router) APITransactions(w http.ResponseWriter, r *http.Request) {
|
||||
v := normalized[k]
|
||||
if v := math.Abs(v["$"]); v < biggest {
|
||||
normalizedDelta := biggest - v
|
||||
normalizedFactor := normalizer.NormalizeFactor(ledger.Delta{Name: k, Date: time.Now().Format("2006-01-02")})
|
||||
normalizedFactor := normalizer.NormalizeFactor(k, time.Now().Format("2006-01-02"))
|
||||
normalized[fmt.Sprintf(`(%s trailing $)`, k)] = ledger.Balance{"$": normalizedDelta * normalizedFactor}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user