Invoice list now currency sensitive, too
This commit is contained in:
@@ -301,6 +301,22 @@ namespace Swarmops.Logic.Financial
|
||||
}
|
||||
}
|
||||
|
||||
public string DisplayAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HasNativeCurrency)
|
||||
{
|
||||
Money money = NativeCurrencyAmount;
|
||||
return money.Currency.DisplayCode + " " + (money.Cents/100.0).ToString("N2");
|
||||
}
|
||||
else
|
||||
{
|
||||
return (AmountCents/100.0).ToString("N2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasNativeCurrency
|
||||
{
|
||||
get
|
||||
|
||||
@@ -68,7 +68,7 @@ public partial class Pages_v5_Finance_Json_ListInvoicesInbound : DataV5Base
|
||||
JsonSanitize(invoice.DueDate.ToString(invoice.DueDate < dueDateFormatBreakDate ? "yyyy-MMM" : "MMM-dd")),
|
||||
JsonSanitize(invoice.Supplier),
|
||||
JsonSanitize(invoice.Budget.Name),
|
||||
JsonSanitize((invoice.AmountCents/100.0).ToString("N2")),
|
||||
JsonSanitize(invoice.DisplayAmount),
|
||||
GetProgressTicks(invoice),
|
||||
invoice.Identity); // Item #6 is only present in hasDoxString above
|
||||
result.Append("},");
|
||||
|
||||
Reference in New Issue
Block a user