Show deleted items in Receiving receipt (#904)

This commit is contained in:
FrancescoUK
2016-10-17 08:32:03 +01:00
parent 20a6c6ec0a
commit 2d8bd2d307
2 changed files with 10 additions and 8 deletions

View File

@@ -273,7 +273,7 @@ class Sale_lib
public function add_item($item_id, $quantity = 1, $item_location, $discount = 0, $price = NULL, $description = NULL, $serialnumber = NULL, $include_deleted = FALSE)
{
//make sure item exists
if($this->_validate_item($item_id, $include_deleted) === FALSE)
if($this->_validate_item($item_id, $include_deleted) == FALSE)
{
return FALSE;
}
@@ -485,7 +485,7 @@ class Sale_lib
foreach($this->CI->Sale->get_sale_items($sale_id)->result() as $row)
{
$this->add_item($row->item_id, -$row->quantity_purchased, $row->item_location, $row->discount_percent, $row->item_unit_price, $row->description, $row->serialnumber, TRUE);
}
$this->set_customer($this->CI->Sale->get_customer($sale_id)->person_id);
}