mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2025-01-31 02:51:42 +00:00
fix doublechange of stock
This commit is contained in:
parent
3922bb59f5
commit
8643a7a303
1 changed files with 3 additions and 2 deletions
|
@ -236,7 +236,7 @@ local function r_user_post(username)
|
||||||
math.abs(pcount), p_name)
|
math.abs(pcount), p_name)
|
||||||
|
|
||||||
powner_comment = string.format("%s %d %s %s %s",
|
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,
|
math.abs(pcount), p_name,
|
||||||
pcount < 0 and "to" or "by",
|
pcount < 0 and "to" or "by",
|
||||||
username)
|
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))
|
log:write(string.format("%d,%s,%d,%s,%s,%s\n", time, username, amount, pcode or "", pcount or "", comment))
|
||||||
-- add to owner
|
-- add to owner
|
||||||
if powner then
|
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
|
end
|
||||||
log:flush()
|
log:flush()
|
||||||
log:close()
|
log:close()
|
||||||
|
|
Loading…
Add table
Reference in a new issue