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

This commit is contained in:
lorenz.stechauner committed 2024-02-01 11:02:59 +01:00
1 parent 4daa6deb26
commit befe6a753b
4 files changed
+133 -14

No files matched your search

+2 -1
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));
}