Fix: Free items in the PoS were generating top-up invoices rather than settled invoices

This commit is contained in:
nicolas.dorier
2025-06-10 23:37:53 +09:00
committed by Andrew Camilleri (Kukks)
parent 886df54469
commit f52cb053fe
2 changed files with 13 additions and 2 deletions

View File

@@ -232,6 +232,7 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers
{
order.AddLine(new($"Custom Amount {i + 1}", 1, jposData.Amounts[i], settings.DefaultTaxRate));
}
foreach (var cartItem in jposData.Cart)
{
var itemChoice = choices.FirstOrDefault(item => item.Id == cartItem.Id);
@@ -322,7 +323,7 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers
var receiptData = new PosReceiptData();
var summary = order.Calculate();
bool isTopup = summary.PriceTaxIncludedWithTips == 0 && currentView == PosViewType.Static;
var isTopup = selectedChoices.FirstOrDefault().Price is null && currentView == PosViewType.Static;
if (!isTopup)
{
jposData.ItemsTotal = summary.ItemsTotal;