mirror of
https://github.com/bitwarden/server.git
synced 2025-02-17 02:01:53 +01:00
use item plan name if no description
This commit is contained in:
parent
04cd4cded4
commit
78b28061b2
@ -55,7 +55,18 @@ namespace Bit.Api.Models
|
||||
public Item(StripeInvoiceLineItem item)
|
||||
{
|
||||
Amount = (item.Amount / 100).ToString("F");
|
||||
Description = item.Description ?? "--";
|
||||
if(!string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
Description = item.Description;
|
||||
}
|
||||
else if(!string.IsNullOrWhiteSpace(item.Plan?.Name) && item.Quantity.GetValueOrDefault() > 0)
|
||||
{
|
||||
Description = $"{item.Quantity} x {item.Plan.Name}";
|
||||
}
|
||||
else
|
||||
{
|
||||
Description = "--";
|
||||
}
|
||||
}
|
||||
|
||||
public string Description { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user