Export/Ebics: Add Tests to validate against schemas and fix issues

This commit is contained in:
2024-01-31 16:54:51 +01:00
parent 4daa6deb26
commit befe6a753b
4 changed files with 133 additions and 14 deletions

View File

@ -1,4 +1,5 @@
using Elwig.Models.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
@ -19,7 +20,7 @@ namespace Elwig.Models.Dtos {
.ToList();
}
public static string FormatAmountCent(long cents) => $"{cents / 100}.{cents % 100:00}";
public static string FormatAmountCent(long cents) => $"{cents / 100}.{Math.Abs(cents % 100):00}";
public static string FormatAmount(decimal amount) => FormatAmountCent((int)(amount * 100));
}