Skip to content

Commit

Permalink
fix: Change return type to decimal when dividing Money by Money
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-dudarev committed Nov 15, 2024
1 parent 41b932b commit 9af9116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VirtoCommerce.CoreModule.Core/Currency/Money.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public decimal TruncatedAmount
public static Money operator *(Money first, Money second)
=> new Money(first.InternalAmount * second.ConvertTo(first.Currency).InternalAmount, first.Currency);

public static Money operator /(Money first, Money second)
=> new Money(first.InternalAmount / second.ConvertTo(first.Currency).InternalAmount, first.Currency);
public static decimal operator /(Money first, Money second)
=> first.InternalAmount / second.ConvertTo(first.Currency).InternalAmount;

public static bool operator ==(Money money, long value) => !(money is null) && money.InternalAmount == value;

Expand Down

0 comments on commit 9af9116

Please sign in to comment.