mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Fix: Free items in the PoS were generating top-up invoices rather than settled invoices
This commit is contained in:
committed by
Andrew Camilleri (Kukks)
parent
886df54469
commit
f52cb053fe
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user