mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-07 23:35:04 -04:00
Do not cast quantity change to int in sale delete (#2964)
This commit is contained in:
@@ -59,7 +59,7 @@ class Item_quantity extends CI_Model
|
||||
public function change_quantity($item_id, $location_id, $quantity_change)
|
||||
{
|
||||
$quantity_old = $this->get_item_quantity($item_id, $location_id);
|
||||
$quantity_new = $quantity_old->quantity + intval($quantity_change);
|
||||
$quantity_new = $quantity_old->quantity + $quantity_change;
|
||||
$location_detail = array('item_id' => $item_id, 'location_id' => $location_id, 'quantity' => $quantity_new);
|
||||
|
||||
return $this->save($location_detail, $item_id, $location_id);
|
||||
|
||||
Reference in New Issue
Block a user