Suspending Work Order lost work order number

This commit is contained in:
Steve Ireland
2017-09-17 09:24:52 -04:00
parent 7789675a55
commit d63446cdb8
2 changed files with 21 additions and 0 deletions

View File

@@ -958,6 +958,7 @@ class Sale_lib
$this->set_customer($this->CI->Sale->get_customer($sale_id)->person_id);
$this->set_employee($this->CI->Sale->get_employee($sale_id)->person_id);
$this->set_quote_number($this->CI->Sale->get_quote_number($sale_id));
$this->set_work_order_number($this->CI->Sale->get_work_order_number($sale_id));
$this->set_sale_type($this->CI->Sale->get_sale_type($sale_id));
$this->set_comment($this->CI->Sale->get_comment($sale_id));
$this->set_dinner_table($this->CI->Sale->get_dinner_table($sale_id));

View File

@@ -1310,6 +1310,26 @@ class Sale extends CI_Model
}
}
/**
* Gets the work order number for the selected sale
*/
public function get_work_order_number($sale_id)
{
$this->db->from('sales');
$this->db->where('sale_id', $sale_id);
$row = $this->db->get()->row();
if($row != NULL)
{
return $row->work_order_number;
}
else
{
return NULL;
}
}
/**
* Gets the quote_number for the selected sale
*/