X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=assistants%2Fsell.inc.php;h=26f963150170a6a13b4130a04e3eaaa47d2d54a0;hb=274c2053a765e8b3cfecd046f60cc4b057971d35;hp=cb038d21d3151cd4bd726c0066792f9fb837d11b;hpb=5ef6c52f74756cfd5fc08f5af74b970d560b0293;p=mirrors%2FSokoMan.git diff --git a/assistants/sell.inc.php b/assistants/sell.inc.php index cb038d2..26f9631 100644 --- a/assistants/sell.inc.php +++ b/assistants/sell.inc.php @@ -25,6 +25,7 @@ switch($SUBPATH[0]) { $item_id = $this->db->map_unique('item_serial', $item_serial, 'item_id', 'item'); $current = $this->db->get_listing('item', $item_id, 1); + $current[$item_id]['item_author'] = $this->db->auth->get_user_id(); $forked_item = $current; $model_id = $this->db->map_unique('item_serial', $item_serial, 'model_id', 'item'); @@ -51,8 +52,8 @@ switch($SUBPATH[0]) { echo("Stock: ".$quantity_stored."
Disposing/Selling: ".$quantity_removed."
Keeping: ".$item_quantity); $current[$item_id]['item_quantity'] = $item_quantity; - $current[$item_id]['item_price_in'] = $item_quantity * $model_price_in; - $current[$item_id]['item_price_out'] = $item_quantity * $model_price_out; + $current[$item_id]['item_price_in'] -= $quantity_removed * $model_price_in; + $current[$item_id]['item_price_out'] -= $quantity_removed * $model_price_out; $forked_item[$item_id]['item_id'] = ''; $forked_item[$item_id]['item_serial'] .= '@'.time();