btcpayserver/BTCPayServer/Services/Invoices/PosAppData.cs
d11n 13203c3e2b
Receipt improvements (#5077)
* Remove Order ID link

* Add separate print version for receipt

* Fix POS number handling and add keypad test

Fixes #5056.

* Add formatting function

* Remove OrderUrl for POS, bring back order link for receipt

* Update BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
2023-06-22 15:57:29 +09:00

58 lines
1.5 KiB
C#

using BTCPayServer.Plugins.PointOfSale.Models;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Invoices;
public class PosAppData
{
[JsonProperty(PropertyName = "cart")]
public PosAppCartItem[] Cart { get; set; }
[JsonProperty(PropertyName = "customAmount")]
public decimal CustomAmount { get; set; }
[JsonProperty(PropertyName = "discountPercentage")]
public decimal DiscountPercentage { get; set; }
[JsonProperty(PropertyName = "discountAmount")]
public decimal DiscountAmount { get; set; }
[JsonProperty(PropertyName = "tip")]
public decimal Tip { get; set; }
[JsonProperty(PropertyName = "subTotal")]
public decimal Subtotal { get; set; }
[JsonProperty(PropertyName = "total")]
public decimal Total { get; set; }
}
public class PosAppCartItem
{
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
[JsonProperty(PropertyName = "price")]
public decimal Price { get; set; }
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
[JsonProperty(PropertyName = "count")]
public int Count { get; set; }
[JsonProperty(PropertyName = "inventory")]
public int? Inventory { get; set; }
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
}
public class PosAppCartItemPrice
{
[JsonProperty(PropertyName = "formatted")]
public string Formatted { get; set; }
[JsonProperty(PropertyName = "type")]
public ViewPointOfSaleViewModel.ItemPriceType Type { get; set; }
}