Fix error message when searching for nonexistant supplier in receivings

(#430)
This commit is contained in:
jekkos committed 2016-03-29 17:41:16 +02:00
1 parent 51b776354a
commit 4d04cdd65f
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -30,7 +30,10 @@ class Receivings extends Secure_area
function select_supplier()
{
$supplier_id = $this->input->post('supplier');
$this->receiving_lib->set_supplier($supplier_id);
if ($this->Supplier->exists($supplier_id))
{
$this->receiving_lib->set_supplier($supplier_id);
}
$this->_reload();
}
+1 -1
View File
@@ -516,7 +516,7 @@ class Sales extends Secure_area
{
// substitute customer info
$customer_id = $this->sale_lib->get_customer();
if($customer_id != -1 && $cust_info != '' && $cust_info->last_name != '' && $cust_info->first_name != '')
if($customer_id != -1 && $cust_info != '')
{
$text = str_replace('$CU',$cust_info->first_name . ' ' . $cust_info->last_name,$text);
$words = preg_split("/\s+/", trim($cust_info->first_name . ' ' . $cust_info->last_name));