mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Fixes removing the last item on an order on the cash register and quikpay. (#21558)
A small oversight from my cash register PR, this fixes that.
This commit is contained in:
@@ -294,7 +294,7 @@
|
||||
if(L["amount"] > 1)
|
||||
L["amount"]--
|
||||
else
|
||||
items.Cut(index, index+1)
|
||||
buying.Cut(index, index+1)
|
||||
. = TRUE
|
||||
|
||||
if("confirm")
|
||||
|
||||
@@ -179,12 +179,14 @@
|
||||
buying += list(list("name" = params["buying"], "amount" = params["amount"]))
|
||||
|
||||
if("removal")
|
||||
var/index = 0
|
||||
for(var/list/L in buying)
|
||||
index++
|
||||
if(L["name"] == params["removal"])
|
||||
if(L["amount"] > 1)
|
||||
L["amount"]--
|
||||
else
|
||||
buying -= L
|
||||
buying.Cut(index, index+1)
|
||||
. = TRUE
|
||||
|
||||
if("confirm")
|
||||
|
||||
Reference in New Issue
Block a user