diff options
author | Riley L. <riley@e926.de> | 2024-11-04 12:31:32 +0100 |
---|---|---|
committer | Riley L. <riley@e926.de> | 2024-11-04 12:31:32 +0100 |
commit | 8643a7a303b02d15d5205e98ae184d3f0c6bfd09 (patch) | |
tree | 4bacfd1a4f7f55e4fda2b2d1c28bf358788dcaa3 /abrechenbarkeit.lua | |
parent | 3922bb59f5602f614927b69b8717245923f175ad (diff) | |
download | abrechenbarkeit-8643a7a303b02d15d5205e98ae184d3f0c6bfd09.tar abrechenbarkeit-8643a7a303b02d15d5205e98ae184d3f0c6bfd09.tar.bz2 abrechenbarkeit-8643a7a303b02d15d5205e98ae184d3f0c6bfd09.tar.zst |
fix doublechange of stock
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-x | abrechenbarkeit.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index 5db7337..ba12b7a 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -236,7 +236,7 @@ local function r_user_post(username) math.abs(pcount), p_name) powner_comment = string.format("%s %d %s %s %s", - pcount < 0 and "Sell" or "Restock", -- TOOD: look for name + pcount < 0 and "Sell" or "Restock", math.abs(pcount), p_name, pcount < 0 and "to" or "by", username) @@ -262,7 +262,8 @@ local function r_user_post(username) log:write(string.format("%d,%s,%d,%s,%s,%s\n", time, username, amount, pcode or "", pcount or "", comment)) -- add to owner if powner then - log:write(string.format("%d,%s,%d,%s,%s,%s\n", time, powner, -amount, pcode or "", pcount or "", powner_comment)) + -- count is always zero as doesn't affect stock + log:write(string.format("%d,%s,%d,%s,%s,%s\n", time, powner, -amount, pcode or "", "", powner_comment)) end log:flush() log:close() |